1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00

LibWeb: Parse :before and :after pseudo-elements

Note that this is the old CSS2 syntax, we don't support the CSS3 syntax
just yet. Also we don't actually implement the pseudo-elements, this is
really just to make the selectors distinct from the same ones without
these pseudo-elements.
This commit is contained in:
Andreas Kling 2020-12-01 15:40:20 +01:00
parent eef30bb05e
commit bbcc71fec4
3 changed files with 21 additions and 0 deletions

View file

@ -44,6 +44,14 @@ static bool matches_hover_pseudo_class(const DOM::Element& element)
static bool matches(const CSS::Selector::SimpleSelector& component, const DOM::Element& element)
{
switch (component.pseudo_element) {
case CSS::Selector::SimpleSelector::PseudoElement::None:
break;
default:
// FIXME: Implement pseudo-elements.
return false;
}
switch (component.pseudo_class) {
case CSS::Selector::SimpleSelector::PseudoClass::None:
break;