| Index: sky/engine/core/html/HTMLContentElement.cpp
|
| diff --git a/sky/engine/core/html/HTMLContentElement.cpp b/sky/engine/core/html/HTMLContentElement.cpp
|
| index 4797f3ea79c666942f2b5167c73006d7b44f973a..ae9c76e8a81a398b2444b8a4b7ad75d9c479fd3b 100644
|
| --- a/sky/engine/core/html/HTMLContentElement.cpp
|
| +++ b/sky/engine/core/html/HTMLContentElement.cpp
|
| @@ -107,18 +107,12 @@ bool HTMLContentElement::validateSelect() const
|
| return true;
|
| }
|
|
|
| -static inline bool checkOneSelector(const CSSSelector& selector, const Vector<RawPtr<Node>, 32>& siblings, int nth)
|
| -{
|
| - Element* element = toElement(siblings[nth]);
|
| - SelectorChecker selectorChecker;
|
| - SelectorChecker::SelectorCheckingContext context(selector, element);
|
| - return selectorChecker.match(context);
|
| -}
|
| -
|
| bool HTMLContentElement::matchSelector(const Vector<RawPtr<Node>, 32>& siblings, int nth) const
|
| {
|
| for (const CSSSelector* selector = selectorList().first(); selector; selector = CSSSelectorList::next(*selector)) {
|
| - if (checkOneSelector(*selector, siblings, nth))
|
| + Element* element = toElement(siblings[nth]);
|
| + SelectorChecker checker(*element);
|
| + if (checker.match(*selector, element))
|
| return true;
|
| }
|
| return false;
|
|
|