Bug 1371130: Remove a few unused FFI functions. r?heycam
MozReview-Commit-ID: 57Mu3lALJzm
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -154,79 +154,31 @@ Gecko_IsSignificantChild(RawGeckoNodeBor
bool aWhitespaceIsSignificant)
{
return nsStyleUtil::ThreadSafeIsSignificantChild(aNode->AsContent(),
aTextIsSignificant,
aWhitespaceIsSignificant);
}
RawGeckoNodeBorrowedOrNull
+Gecko_GetLastChild(RawGeckoNodeBorrowed aNode)
+{
+ return aNode->GetLastChild();
+}
+
+RawGeckoNodeBorrowedOrNull
Gecko_GetFlattenedTreeParentNode(RawGeckoNodeBorrowed aNode)
{
MOZ_ASSERT(!FlattenedTreeParentIsParent<nsIContent::eForStyle>(aNode),
"Should have taken the inline path");
MOZ_ASSERT(aNode->IsContent(), "Slow path only applies to content");
const nsIContent* c = aNode->AsContent();
return c->GetFlattenedTreeParentNodeInternal(nsIContent::eForStyle);
}
-RawGeckoNodeBorrowedOrNull
-Gecko_GetFirstChild(RawGeckoNodeBorrowed aNode)
-{
- return aNode->GetFirstChild();
-}
-
-RawGeckoNodeBorrowedOrNull
-Gecko_GetLastChild(RawGeckoNodeBorrowed aNode)
-{
- return aNode->GetLastChild();
-}
-
-RawGeckoNodeBorrowedOrNull
-Gecko_GetPrevSibling(RawGeckoNodeBorrowed aNode)
-{
- return aNode->GetPreviousSibling();
-}
-
-RawGeckoNodeBorrowedOrNull
-Gecko_GetNextSibling(RawGeckoNodeBorrowed aNode)
-{
- return aNode->GetNextSibling();
-}
-
-RawGeckoElementBorrowedOrNull
-Gecko_GetFirstChildElement(RawGeckoElementBorrowed aElement)
-{
- return aElement->GetFirstElementChild();
-}
-
-RawGeckoElementBorrowedOrNull
-Gecko_GetLastChildElement(RawGeckoElementBorrowed aElement)
-{
- return aElement->GetLastElementChild();
-}
-
-RawGeckoElementBorrowedOrNull
-Gecko_GetPrevSiblingElement(RawGeckoElementBorrowed aElement)
-{
- return aElement->GetPreviousElementSibling();
-}
-
-RawGeckoElementBorrowedOrNull
-Gecko_GetNextSiblingElement(RawGeckoElementBorrowed aElement)
-{
- return aElement->GetNextElementSibling();
-}
-
-RawGeckoElementBorrowedOrNull
-Gecko_GetDocumentElement(RawGeckoDocumentBorrowed aDoc)
-{
- return aDoc->GetDocumentElement();
-}
-
RawGeckoElementBorrowedOrNull
Gecko_GetBeforeOrAfterPseudo(RawGeckoElementBorrowed aElement, bool aIsBefore)
{
MOZ_ASSERT(aElement);
MOZ_ASSERT(aElement->HasProperties());
return aIsBefore
? nsLayoutUtils::GetBeforePseudo(aElement)
--- a/layout/style/ServoBindings.h
+++ b/layout/style/ServoBindings.h
@@ -122,48 +122,40 @@ 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,
bool text_is_significant,
bool whitespace_is_significant);
+RawGeckoNodeBorrowedOrNull Gecko_GetLastChild(RawGeckoNodeBorrowed node);
RawGeckoNodeBorrowedOrNull Gecko_GetFlattenedTreeParentNode(RawGeckoNodeBorrowed node);
-RawGeckoNodeBorrowedOrNull Gecko_GetFirstChild(RawGeckoNodeBorrowed node);
-RawGeckoNodeBorrowedOrNull Gecko_GetLastChild(RawGeckoNodeBorrowed node);
-RawGeckoNodeBorrowedOrNull Gecko_GetPrevSibling(RawGeckoNodeBorrowed node);
-RawGeckoNodeBorrowedOrNull Gecko_GetNextSibling(RawGeckoNodeBorrowed node);
-RawGeckoElementBorrowedOrNull Gecko_GetFirstChildElement(RawGeckoElementBorrowed element);
-RawGeckoElementBorrowedOrNull Gecko_GetLastChildElement(RawGeckoElementBorrowed element);
-RawGeckoElementBorrowedOrNull Gecko_GetPrevSiblingElement(RawGeckoElementBorrowed element);
-RawGeckoElementBorrowedOrNull Gecko_GetNextSiblingElement(RawGeckoElementBorrowed element);
RawGeckoElementBorrowedOrNull Gecko_GetBeforeOrAfterPseudo(RawGeckoElementBorrowed element, bool is_before);
nsTArray<nsIContent*>* Gecko_GetAnonymousContentForElement(RawGeckoElementBorrowed element);
void Gecko_DestroyAnonymousContentList(nsTArray<nsIContent*>* anon_content);
-RawGeckoElementBorrowedOrNull Gecko_GetDocumentElement(RawGeckoDocumentBorrowed document);
-void Gecko_LoadStyleSheet(mozilla::css::Loader* loader,
- mozilla::ServoStyleSheet* parent,
- mozilla::css::LoaderReusableStyleSheets* reusable_sheets,
- RawServoStyleSheetBorrowed child_sheet,
- RawGeckoURLExtraData* base_url_data,
- const uint8_t* url_bytes,
- uint32_t url_length,
- RawServoMediaListStrong media_list);
// By default, Servo walks the DOM by traversing the siblings of the DOM-view
// first child. This generally works, but misses anonymous children, which we
// want to traverse during styling. To support these cases, we create an
// optional heap-allocated iterator for nodes that need it. If the creation
// method returns null, Servo falls back to the aforementioned simpler (and
// faster) sibling traversal.
StyleChildrenIteratorOwnedOrNull Gecko_MaybeCreateStyleChildrenIterator(RawGeckoNodeBorrowed node);
void Gecko_DropStyleChildrenIterator(StyleChildrenIteratorOwned it);
RawGeckoNodeBorrowedOrNull Gecko_GetNextStyleChild(StyleChildrenIteratorBorrowedMut it);
-nsIContent* Gecko_ElementBindingAnonymousContent(RawGeckoElementBorrowed element);
+
+void Gecko_LoadStyleSheet(mozilla::css::Loader* loader,
+ mozilla::ServoStyleSheet* parent,
+ mozilla::css::LoaderReusableStyleSheets* reusable_sheets,
+ RawServoStyleSheetBorrowed child_sheet,
+ RawGeckoURLExtraData* base_url_data,
+ const uint8_t* url_bytes,
+ uint32_t url_length,
+ RawServoMediaListStrong media_list);
// Selector Matching.
uint64_t Gecko_ElementState(RawGeckoElementBorrowed element);
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);