Commit a46c92c8 authored by Sebastian Hengst's avatar Sebastian Hengst
Browse files

Backed out changeset f66cb1530f75 (bug 1407952) for build failure (bug...

Backed out changeset f66cb1530f75 (bug 1407952) for build failure (bug 1408622). r=backout a=backout

MozReview-Commit-ID: 3h4oDHbvmes

--HG--
extra : amend_source : 9e9e1bb348b7e2434f3388cf97580172348e769a
parent caf5b99a
Loading
Loading
Loading
Loading
+20 −31
Original line number Diff line number Diff line
@@ -3467,18 +3467,9 @@ Element::GetTokenList(nsAtom* aAtom,
Element*
Element::Closest(const nsAString& aSelector, ErrorResult& aResult)
{
  return WithSelectorList<Element*>(
    aSelector,
    aResult,
    [&](const RawServoSelectorList* aList) -> Element* {
      if (!aList) {
        return nullptr;
      }
      return const_cast<Element*>(Servo_SelectorList_Closest(this, aList));
    },
    [&](nsCSSSelectorList* aList) -> Element* {
      if (!aList) {
        // Either we failed (and aError already has the exception), or this
  nsCSSSelectorList* selectorList = ParseSelectorList(aSelector, aResult);
  if (!selectorList) {
    // Either we failed (and aResult already has the exception), or this
    // is a pseudo-element-only selector that matches nothing.
    return nullptr;
  }
@@ -3492,14 +3483,12 @@ Element::Closest(const nsAString& aSelector, ErrorResult& aResult)
    if (node->IsElement() &&
        nsCSSRuleProcessor::SelectorListMatches(node->AsElement(),
                                                matchingContext,
                                                    aList)) {
                                                selectorList)) {
      return node->AsElement();
    }
  }
  return nullptr;
}
  );
}

bool
Element::Matches(const nsAString& aSelector, ErrorResult& aError)
+0 −2
Original line number Diff line number Diff line
@@ -136,8 +136,6 @@ SERVO_BINDING_FUNC(Servo_SelectorList_Parse,
                   const nsACString* selector_list)
SERVO_BINDING_FUNC(Servo_SelectorList_Matches, bool,
                   RawGeckoElementBorrowed, RawServoSelectorListBorrowed)
SERVO_BINDING_FUNC(Servo_SelectorList_Closest, RawGeckoElementBorrowedOrNull,
                   RawGeckoElementBorrowed, RawServoSelectorListBorrowed)
SERVO_BINDING_FUNC(Servo_StyleSet_AddSizeOfExcludingThis, void,
                   mozilla::MallocSizeOf malloc_size_of,
                   mozilla::MallocSizeOf malloc_enclosing_size_of,