mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-05 09:52:54 +00:00
LibHTML: Add adjacent (+) and general (~) sibling combinators
This patch implements two more selector features: - "div + p" matches the <p> sibling immediately after a <div>. - "div ~ p" matches all <p> siblings after a <div>.
This commit is contained in:
parent
5a6c36dc91
commit
bedb00603c
Notes:
sideshowbarker
2024-07-19 11:46:38 +09:00
Author: https://github.com/awesomekling
Commit: bedb00603c
5 changed files with 53 additions and 2 deletions
|
@ -158,6 +158,12 @@ void dump_rule(const StyleRule& rule)
|
|||
case Selector::Component::Relation::Descendant:
|
||||
relation_description = "{Descendant}";
|
||||
break;
|
||||
case Selector::Component::Relation::AdjacentSibling:
|
||||
relation_description = "{AdjacentSibling}";
|
||||
break;
|
||||
case Selector::Component::Relation::GeneralSibling:
|
||||
relation_description = "{GeneralSibling}";
|
||||
break;
|
||||
}
|
||||
dbgprintf(" %s:%s %s\n", type_description, component.value.characters(), relation_description);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue