diff --git a/layout/style/ServoBindings.cpp b/layout/style/ServoBindings.cpp index 8d3fea6ff77c..38dc84f552b8 100644 --- a/layout/style/ServoBindings.cpp +++ b/layout/style/ServoBindings.cpp @@ -118,18 +118,6 @@ AssertIsMainThreadOrServoLangFontPrefsCacheLocked() MOZ_ASSERT(NS_IsMainThread() || sServoLangFontPrefsLock->LockedForWritingByCurrentThread()); } -uint32_t -Gecko_ChildrenCount(RawGeckoNodeBorrowed aNode) -{ - return aNode->GetChildCount(); -} - -bool -Gecko_NodeIsElement(RawGeckoNodeBorrowed aNode) -{ - return aNode->IsElement(); -} - bool Gecko_IsInDocument(RawGeckoNodeBorrowed aNode) { @@ -300,17 +288,6 @@ Gecko_DestroyStyleChildrenIterator( aIterator->~StyleChildrenIterator(); } -nsIContent* -Gecko_ElementBindingAnonymousContent(RawGeckoElementBorrowed aElement) -{ - MOZ_ASSERT(aElement->HasFlag(NODE_MAY_BE_IN_BINDING_MNGR)); - nsBindingManager* manager = aElement->OwnerDoc()->BindingManager(); - if (nsXBLBinding* binding = manager->GetBindingWithContent(aElement)) { - return binding->GetAnonymousContent(); - } - return nullptr; -} - RawGeckoNodeBorrowed Gecko_GetNextStyleChild(RawGeckoStyleChildrenIteratorBorrowedMut aIterator) { @@ -346,12 +323,6 @@ Gecko_DocumentState(const nsIDocument* aDocument) return aDocument->ThreadSafeGetDocumentState().ServoValue(); } -bool -Gecko_IsTextNode(RawGeckoNodeBorrowed aNode) -{ - return aNode->NodeInfo()->NodeType() == nsIDOMNode::TEXT_NODE; -} - bool Gecko_IsRootElement(RawGeckoElementBorrowed aElement) { @@ -365,12 +336,6 @@ Gecko_MatchesElement(CSSPseudoClassType aType, return nsCSSPseudoClasses::MatchesElement(aType, aElement).value(); } -nsIAtom* -Gecko_LocalName(RawGeckoElementBorrowed aElement) -{ - return aElement->NodeInfo()->NameAtom(); -} - nsIAtom* Gecko_Namespace(RawGeckoElementBorrowed aElement) { @@ -378,26 +343,7 @@ Gecko_Namespace(RawGeckoElementBorrowed aElement) return nsContentUtils::NameSpaceManager()->NameSpaceURIAtomForServo(id); } -nsIAtom* -Gecko_GetElementId(RawGeckoElementBorrowed aElement) -{ - const nsAttrValue* attr = aElement->GetParsedAttr(nsGkAtoms::id); - if (attr && attr->Type() == nsAttrValue::eAtom) { - return attr->GetAtomValue(); - } - // The only case in which we should have a non-atom value here is if it's the - // empty string value. - MOZ_ASSERT(!attr || attr->IsEmptyString()); - return nullptr; -} - // Dirtiness tracking. -uint32_t -Gecko_GetNodeFlags(RawGeckoNodeBorrowed aNode) -{ - return aNode->GetFlags(); -} - void Gecko_SetNodeFlags(RawGeckoNodeBorrowed aNode, uint32_t aFlags) { @@ -477,12 +423,6 @@ Gecko_CalcStyleDifference(ServoStyleContextBorrowed aOldStyle, return result; } -nsChangeHint -Gecko_HintsHandledForDescendants(nsChangeHint aHint) -{ - return aHint & ~NS_HintsNotHandledForDescendantsIn(aHint); -} - const ServoElementSnapshot* Gecko_GetElementSnapshot(const ServoElementSnapshotTable* aTable, const Element* aElement) diff --git a/layout/style/ServoBindings.h b/layout/style/ServoBindings.h index c1549af88ba5..653bfb038a30 100644 --- a/layout/style/ServoBindings.h +++ b/layout/style/ServoBindings.h @@ -136,8 +136,6 @@ struct FontSizePrefs }; // DOM Traversal. -uint32_t Gecko_ChildrenCount(RawGeckoNodeBorrowed node); -bool Gecko_NodeIsElement(RawGeckoNodeBorrowed node); bool Gecko_IsInDocument(RawGeckoNodeBorrowed node); bool Gecko_FlattenedTreeParentIsParent(RawGeckoNodeBorrowed node); bool Gecko_IsSignificantChild(RawGeckoNodeBorrowed node, @@ -176,12 +174,9 @@ Gecko_LoadStyleSheet(mozilla::css::Loader* loader, // Selector Matching. uint64_t Gecko_ElementState(RawGeckoElementBorrowed element); uint64_t Gecko_DocumentState(const nsIDocument* aDocument); -bool Gecko_IsTextNode(RawGeckoNodeBorrowed node); bool Gecko_IsRootElement(RawGeckoElementBorrowed element); bool Gecko_MatchesElement(mozilla::CSSPseudoClassType type, RawGeckoElementBorrowed element); -nsIAtom* Gecko_LocalName(RawGeckoElementBorrowed element); nsIAtom* Gecko_Namespace(RawGeckoElementBorrowed element); -nsIAtom* Gecko_GetElementId(RawGeckoElementBorrowed element); bool Gecko_MatchLang(RawGeckoElementBorrowed element, nsIAtom* override_lang, bool has_override_lang, const char16_t* value); @@ -383,7 +378,6 @@ nsStyleContentData::CounterFunction* Gecko_SetCounterFunction( nsStyleContentData* content_data, nsStyleContentType type); // Dirtiness tracking. -uint32_t Gecko_GetNodeFlags(RawGeckoNodeBorrowed node); void Gecko_SetNodeFlags(RawGeckoNodeBorrowed node, uint32_t flags); void Gecko_UnsetNodeFlags(RawGeckoNodeBorrowed node, uint32_t flags); void Gecko_NoteDirtyElement(RawGeckoElementBorrowed element); @@ -402,7 +396,6 @@ uint32_t Gecko_CalcStyleDifference(ServoStyleContextBorrowed old_style, ServoStyleContextBorrowed new_style, uint64_t old_style_bits, bool* any_style_changed); -nsChangeHint Gecko_HintsHandledForDescendants(nsChangeHint aHint); // Get an element snapshot for a given element from the table. const ServoElementSnapshot*