diff options
author | FranklinDM <mrmineshafter17@gmail.com> | 2023-03-24 19:34:55 +0800 |
---|---|---|
committer | FranklinDM <mrmineshafter17@gmail.com> | 2023-03-24 19:39:30 +0800 |
commit | 9365fbd8ad31fc89f44af8fdc0e612fa0b02af56 (patch) | |
tree | 94141b10c71c316f81c79f499effdb1536886c24 /layout | |
parent | 2f3f8e13eba0228515693dcb498412cf2b27ef84 (diff) | |
download | uxp-9365fbd8ad31fc89f44af8fdc0e612fa0b02af56.tar.gz |
Issue #2135 - Don't discard event state mask when matching ::slotted() or :host arguments
This should fix issues with selectors like :host(:hover) that continue to be matched although the cursor is no longer hovering over those elements.
Diffstat (limited to 'layout')
-rw-r--r-- | layout/style/nsCSSRuleProcessor.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/layout/style/nsCSSRuleProcessor.cpp b/layout/style/nsCSSRuleProcessor.cpp index ff8b8ec032..385d9899b5 100644 --- a/layout/style/nsCSSRuleProcessor.cpp +++ b/layout/style/nsCSSRuleProcessor.cpp @@ -1976,11 +1976,9 @@ static bool SelectorMatches(Element* aElement, return false; } - NodeMatchContext nodeContext(EventStates(), - aNodeMatchContext.mIsRelevantLink); if (!SelectorListMatches(aElement, pseudoClass, - nodeContext, + aNodeMatchContext, aTreeMatchContext)) { return false; } @@ -2028,7 +2026,7 @@ static bool SelectorMatches(Element* aElement, // Match if any selector in the argument list matches. // FIXME: What this effectively does is bypass the "featureless" // selector check under SelectorMatches. - NodeMatchContext nodeContext(EventStates(), + NodeMatchContext nodeContext(aNodeMatchContext.mStateMask, aNodeMatchContext.mIsRelevantLink); if (!SelectorListMatches(aElement, pseudoClass, |