Issue #2078 - Part 3: Rename nsCSSRuleProcessor::SelectorListMatches to RestrictedSelectorListMatches

This is in preparation for merging the logic of RestrictedSelectorListMatches and AnySelectorInArgListMatches.
This commit is contained in:
FranklinDM 2023-02-18 19:29:42 +08:00 committed by roytam1
commit 14e8922dca
5 changed files with 24 additions and 22 deletions

View file

@ -2879,9 +2879,9 @@ FindMatchingElementsWithId(const nsAString& aId, nsINode* aRoot,
// We have an element with the right id and it's a strict descendant
// of aRoot. Make sure it really matches the selector.
if (!aMatchInfo ||
nsCSSRuleProcessor::SelectorListMatches(element,
aMatchInfo->mMatchContext,
aMatchInfo->mSelectorList)) {
nsCSSRuleProcessor::RestrictedSelectorListMatches(element,
aMatchInfo->mMatchContext,
aMatchInfo->mSelectorList)) {
aList.AppendElement(element);
if (onlyFirstMatch) {
return;
@ -2932,9 +2932,9 @@ FindMatchingElements(nsINode* aRoot, nsCSSSelectorList* aSelectorList, T &aList,
cur;
cur = cur->GetNextNode(aRoot)) {
if (cur->IsElement() &&
nsCSSRuleProcessor::SelectorListMatches(cur->AsElement(),
matchingContext,
aSelectorList)) {
nsCSSRuleProcessor::RestrictedSelectorListMatches(cur->AsElement(),
matchingContext,
aSelectorList)) {
if (onlyFirstMatch) {
aList.AppendElement(cur->AsElement());
return;