mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +00:00
LibWeb: Merge CSS Parser's QualifiedStyleRule and AtStyleRule
AtStyleRule being a subclass of QualifiedStyleRule was causing problems when trying to distinguish between them. Combining them and then distinguishing between them with a Type enum makes that check simpler, and is in line with how similar checks are done elsewhere in the parser.
This commit is contained in:
parent
a6085e19ae
commit
82d12b170a
6 changed files with 47 additions and 71 deletions
|
@ -6,8 +6,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/CSS/Parser/AtStyleRule.h>
|
||||
#include <LibWeb/CSS/Parser/StyleDeclarationRule.h>
|
||||
#include <LibWeb/CSS/Parser/StyleRule.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
|
@ -15,7 +15,7 @@ class DeclarationOrAtRule {
|
|||
friend class Parser;
|
||||
|
||||
public:
|
||||
explicit DeclarationOrAtRule(RefPtr<AtStyleRule> at);
|
||||
explicit DeclarationOrAtRule(RefPtr<StyleRule> at);
|
||||
explicit DeclarationOrAtRule(StyleDeclarationRule declaration);
|
||||
~DeclarationOrAtRule();
|
||||
|
||||
|
@ -28,7 +28,7 @@ public:
|
|||
|
||||
private:
|
||||
DeclarationType m_type;
|
||||
RefPtr<AtStyleRule> m_at;
|
||||
RefPtr<StyleRule> m_at;
|
||||
StyleDeclarationRule m_declaration;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue