1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:57:45 +00:00

LibWeb: Add :not pseudoclass to the CSS parser

The selector given in the :not() is stored in the SimpleSelector as a
String.
This commit is contained in:
Tobias Christiansen 2021-05-23 20:59:26 +02:00 committed by Linus Groh
parent 78f3bad7e6
commit 1ab82afee6
3 changed files with 9 additions and 0 deletions

View file

@ -7,6 +7,7 @@
#pragma once
#include <AK/FlyString.h>
#include <AK/String.h>
#include <AK/Vector.h>
namespace Web::CSS {
@ -41,6 +42,7 @@ public:
Disabled,
Enabled,
Checked,
Not,
};
PseudoClass pseudo_class { PseudoClass::None };
@ -75,6 +77,7 @@ public:
// FIXME: We don't need this field on every single SimpleSelector, but it's also annoying to malloc it somewhere.
// Only used when "pseudo_class" is "NthChild" or "NthLastChild".
NthChildPattern nth_child_pattern;
String not_selector {};
};
struct ComplexSelector {