Bug 1372061 - Remove unused StyleChildrenIterator::IsNeeded. r?bholley
MozReview-Commit-ID: LH8xZMrcdO1
--- a/dom/base/ChildIterator.cpp
+++ b/dom/base/ChildIterator.cpp
@@ -473,53 +473,16 @@ AllChildrenIterator::GetPreviousChild()
return beforeContent;
}
}
mPhase = eAtBegin;
return nullptr;
}
-/* static */ bool
-StyleChildrenIterator::IsNeeded(const Element* aElement)
-{
- // If the node is in an anonymous subtree, we conservatively return true to
- // handle insertion points.
- if (aElement->IsInAnonymousSubtree()) {
- return true;
- }
-
- // If the node has an XBL binding with anonymous content return true.
- if (aElement->HasFlag(NODE_MAY_BE_IN_BINDING_MNGR)) {
- nsBindingManager* manager = aElement->OwnerDoc()->BindingManager();
- nsXBLBinding* binding = manager->GetBindingWithContent(aElement);
- if (binding && binding->GetAnonymousContent()) {
- return true;
- }
- }
-
- // If the node has a ::before or ::after pseudo, return true, because we want
- // to visit those.
- //
- // TODO(emilio): Make this fast adding a bit? or, perhaps just using
- // ProbePseudoElementStyle? It should be quite fast in Stylo.
- if (aElement->GetProperty(nsGkAtoms::beforePseudoProperty) ||
- aElement->GetProperty(nsGkAtoms::afterPseudoProperty)) {
- return true;
- }
-
- // If the node has native anonymous content, return true.
- nsIAnonymousContentCreator* ac = do_QueryFrame(aElement->GetPrimaryFrame());
- if (ac) {
- return true;
- }
-
- return false;
-}
-
nsIContent*
StyleChildrenIterator::GetNextChild()
{
return AllChildrenIterator::GetNextChild();
}
} // namespace dom
} // namespace mozilla
--- a/dom/base/ChildIterator.h
+++ b/dom/base/ChildIterator.h
@@ -276,18 +276,14 @@ public:
nsIContent::eAllChildren |
nsIContent::eSkipDocumentLevelNativeAnonymousContent)
{
MOZ_COUNT_CTOR(StyleChildrenIterator);
}
~StyleChildrenIterator() { MOZ_COUNT_DTOR(StyleChildrenIterator); }
nsIContent* GetNextChild();
-
- // Returns true if we cannot find all the children we need to style by
- // traversing the siblings of the first child.
- static bool IsNeeded(const Element* aParent);
};
} // namespace dom
} // namespace mozilla
#endif