mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 21:07:36 +00:00
LibWeb: Give CSS Token and StyleComponentValueRule matching is() funcs
The end goal here is to make the two classes mostly interchangeable, as the CSS spec requires that the various parser algorithms can take a stream of either class, and we want to have that functionality without needing to duplicate all of the code.
This commit is contained in:
parent
9c14504bbb
commit
6c03123b2d
5 changed files with 72 additions and 102 deletions
|
@ -21,9 +21,9 @@ public:
|
|||
StyleBlockRule();
|
||||
~StyleBlockRule();
|
||||
|
||||
bool is_curly() const { return m_token.is_open_curly(); }
|
||||
bool is_paren() const { return m_token.is_open_paren(); }
|
||||
bool is_square() const { return m_token.is_open_square(); }
|
||||
bool is_curly() const { return m_token.is(Token::Type::OpenCurly); }
|
||||
bool is_paren() const { return m_token.is(Token::Type::OpenParen); }
|
||||
bool is_square() const { return m_token.is(Token::Type::OpenSquare); }
|
||||
|
||||
Vector<StyleComponentValueRule> const& values() const { return m_values; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue