mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:57:46 +00:00
LibWeb: Add direct StyleComponentValueRule constructors
Rather than passing a ComponentType, and then manually modifying the data fields, we now create them initialized. The constructor that takes a Token is intentionally left implicit, so that we can automatically convert when using the TokenStream later.
This commit is contained in:
parent
82d12b170a
commit
8671d79ba4
3 changed files with 22 additions and 20 deletions
|
@ -26,7 +26,9 @@ public:
|
|||
Block
|
||||
};
|
||||
|
||||
explicit StyleComponentValueRule(ComponentType);
|
||||
StyleComponentValueRule(Token);
|
||||
explicit StyleComponentValueRule(NonnullRefPtr<StyleFunctionRule>);
|
||||
explicit StyleComponentValueRule(NonnullRefPtr<StyleBlockRule>);
|
||||
~StyleComponentValueRule();
|
||||
|
||||
bool is_block() const { return m_type == ComponentType::Block; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue