mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibWeb: Make CSS :hover selector match shadow-inclusive ancestors
Before this change, :hover wouldn't match anything outside the shadow boundary when hovering elements inside a shadow tree. This was most noticeable when hovering the text inside an input element and hover styles disappearing from the hosting input element itself.
This commit is contained in:
committed by
Andreas Kling
parent
f3405b6eb2
commit
84ab8bf797
@@ -147,7 +147,7 @@ static inline bool matches_hover_pseudo_class(DOM::Element const& element)
|
||||
return false;
|
||||
if (&element == hovered_node)
|
||||
return true;
|
||||
return element.is_ancestor_of(*hovered_node);
|
||||
return element.is_shadow_including_ancestor_of(*hovered_node);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/semantics-other.html#selector-checked
|
||||
|
||||
Reference in New Issue
Block a user