1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:37:43 +00:00

LibWeb: Make CSS selector parsing use StyleComponentValueRules

Also added some pseudo-classes that were handled in the deprecated
parser:
- :disabled
- :enabled
- :checked
- :nth-child
- :nth-last-child
- :not
This commit is contained in:
Sam Atkins 2021-06-30 16:27:37 +01:00 committed by Andreas Kling
parent f7c79de0c5
commit a558916e1f
5 changed files with 167 additions and 108 deletions

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020-2021, the SerenityOS developers.
* Copyright (c) 2021, Sam Atkins <atkinssj@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -18,6 +19,12 @@ 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(); }
Vector<String> const& values() const { return m_values; }
String to_string() const;
private: