| Index: third_party/WebKit/Source/core/css/CSSSelectorList.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/CSSSelectorList.cpp b/third_party/WebKit/Source/core/css/CSSSelectorList.cpp
|
| index 01544222a9f4c6edcf81c512cd93dd8de1cdfbb2..b0291fd089173a613905c84eeaf93bbc53e88910 100644
|
| --- a/third_party/WebKit/Source/core/css/CSSSelectorList.cpp
|
| +++ b/third_party/WebKit/Source/core/css/CSSSelectorList.cpp
|
| @@ -124,60 +124,4 @@ String CSSSelectorList::selectorsText() const
|
| return result.toString();
|
| }
|
|
|
| -template <typename Functor>
|
| -static bool forEachTagSelector(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))
|
| - return true;
|
| - }
|
| - }
|
| - }
|
| -
|
| - return false;
|
| -}
|
| -
|
| -template <typename Functor>
|
| -static bool forEachSelector(const Functor& functor, const CSSSelectorList* selectorList)
|
| -{
|
| - for (const CSSSelector* selector = selectorList->first(); selector; selector = CSSSelectorList::next(*selector)) {
|
| - if (forEachTagSelector(functor, *selector))
|
| - return true;
|
| - }
|
| -
|
| - return false;
|
| -}
|
| -
|
| -bool CSSSelectorList::selectorHasContentPseudo(size_t index) const
|
| -{
|
| - return forEachTagSelector([](const CSSSelector& selector) -> bool {
|
| - return selector.relationIsAffectedByPseudoContent();
|
| - }, selectorAt(index));
|
| -}
|
| -
|
| -bool CSSSelectorList::selectorHasSlottedPseudo(size_t index) const
|
| -{
|
| - return forEachTagSelector([](const CSSSelector& selector) -> bool {
|
| - return selector.getPseudoType() == CSSSelector::PseudoSlotted;
|
| - }, selectorAt(index));
|
| -}
|
| -
|
| -bool CSSSelectorList::selectorUsesDeepCombinatorOrShadowPseudo(size_t index) const
|
| -{
|
| - return forEachTagSelector([](const CSSSelector& selector) -> bool {
|
| - return selector.relation() == CSSSelector::ShadowDeep || selector.getPseudoType() == CSSSelector::PseudoShadow;
|
| - }, selectorAt(index));
|
| -}
|
| -
|
| -bool CSSSelectorList::selectorNeedsUpdatedDistribution(size_t index) const
|
| -{
|
| - return forEachTagSelector([](const CSSSelector& selector) -> bool {
|
| - return selector.relationIsAffectedByPseudoContent() || selector.getPseudoType() == CSSSelector::PseudoSlotted || selector.getPseudoType() == CSSSelector::PseudoHostContext;
|
| - }, selectorAt(index));
|
| -}
|
| -
|
| } // namespace blink
|
|
|