Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: third_party/WebKit/Source/core/css/CSSSelector.cpp

Issue 2308313002: Clean up RuleSet::addChildRules() (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSSelectorList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/CSSSelector.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSSelector.cpp b/third_party/WebKit/Source/core/css/CSSSelector.cpp
index 2c2e05bcd0afe439e4481760a5c7a33146a67c9c..3209dc1c17472cbd8c2a92653dd8aef8856f7e06 100644
--- a/third_party/WebKit/Source/core/css/CSSSelector.cpp
+++ b/third_party/WebKit/Source/core/css/CSSSelector.cpp
@@ -913,14 +913,14 @@ bool CSSSelector::matchesPseudoElement() const
}
template <typename Functor>
-static bool forEachTagSelector(const Functor& functor, const CSSSelector& selector)
+static bool forEachTagHistory(const Functor& functor, const CSSSelector& selector)
{
for (const CSSSelector* current = &selector; current; current = current->tagHistory()) {
if (functor(*current))
return true;
if (const CSSSelectorList* selectorList = current->selectorList()) {
for (const CSSSelector* subSelector = selectorList->first(); subSelector; subSelector = CSSSelectorList::next(*subSelector)) {
- if (forEachTagSelector(functor, *subSelector))
+ if (forEachTagHistory(functor, *subSelector))
return true;
}
}
@@ -931,28 +931,28 @@ static bool forEachTagSelector(const Functor& functor, const CSSSelector& select
bool CSSSelector::hasContentPseudo() const
{
- return forEachTagSelector([](const CSSSelector& selector) -> bool {
+ return forEachTagHistory([](const CSSSelector& selector) -> bool {
return selector.relationIsAffectedByPseudoContent();
}, *this);
}
bool CSSSelector::hasSlottedPseudo() const
{
- return forEachTagSelector([](const CSSSelector& selector) -> bool {
+ return forEachTagHistory([](const CSSSelector& selector) -> bool {
return selector.getPseudoType() == CSSSelector::PseudoSlotted;
}, *this);
}
bool CSSSelector::hasDeepCombinatorOrShadowPseudo() const
{
- return forEachTagSelector([](const CSSSelector& selector) -> bool {
+ return forEachTagHistory([](const CSSSelector& selector) -> bool {
return selector.relation() == CSSSelector::ShadowDeep || selector.getPseudoType() == CSSSelector::PseudoShadow;
}, *this);
}
bool CSSSelector::needsUpdatedDistribution() const
{
- return forEachTagSelector([](const CSSSelector& selector) -> bool {
+ return forEachTagHistory([](const CSSSelector& selector) -> bool {
return selector.relationIsAffectedByPseudoContent() || selector.getPseudoType() == CSSSelector::PseudoSlotted || selector.getPseudoType() == CSSSelector::PseudoHostContext;
}, *this);
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSSelectorList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698