mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibWeb: Support the :last-of-type CSS selector :^)
This commit is contained in:
parent
0eb9a9dd13
commit
1d065aa51b
Notes:
sideshowbarker
2024-07-18 20:43:56 +09:00
Author: https://github.com/awesomekling
Commit: 1d065aa51b
6 changed files with 25 additions and 0 deletions
|
@ -96,6 +96,12 @@ static bool matches(const CSS::Selector::SimpleSelector& component, const DOM::E
|
|||
return false;
|
||||
}
|
||||
break;
|
||||
case CSS::Selector::SimpleSelector::PseudoClass::LastOfType:
|
||||
for (auto* sibling = element.next_element_sibling(); sibling; sibling = sibling->next_element_sibling()) {
|
||||
if (sibling->tag_name() == element.tag_name())
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
switch (component.attribute_match_type) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue