summaryrefslogtreecommitdiff
path: root/layout
diff options
context:
space:
mode:
authorFranklinDM <mrmineshafter17@gmail.com>2023-02-20 01:28:13 +0800
committerFranklinDM <mrmineshafter17@gmail.com>2023-02-21 22:50:18 +0800
commit9c1d44f5f6503dfa7e011c792240a5bb9c107b2f (patch)
tree6053f1bdbbaab3c6442930e2d21428af747030d2 /layout
parentab5a651d550a12d74842e200717c8c48ee958a01 (diff)
downloaduxp-9c1d44f5f6503dfa7e011c792240a5bb9c107b2f.tar.gz
Issue #1593 - Follow-up: Copy mIsRelevantLink value over rather than calling IsLink
Calling IsLink ignores whatever state we have for aTreeMatchContext and will trigger an assertion if aTreeMatchContext.mForStyling is false. This also adds a comment about what that line effectively does.
Diffstat (limited to 'layout')
-rw-r--r--layout/style/nsCSSRuleProcessor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/layout/style/nsCSSRuleProcessor.cpp b/layout/style/nsCSSRuleProcessor.cpp
index 29cb662efd..909bfb0e81 100644
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -1948,8 +1948,10 @@ 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(),
- nsCSSRuleProcessor::IsLink(aElement));
+ aNodeMatchContext.mIsRelevantLink);
if (SelectorListMatches(aElement,
pseudoClass,
nodeContext,