Bug 1427677: Remove nsBindingManager::FindNestedInsertionPoint. r?bz
No more callers!
MozReview-Commit-ID: 1mxi4IjViuC
--- a/dom/xbl/nsBindingManager.cpp
+++ b/dom/xbl/nsBindingManager.cpp
@@ -1092,54 +1092,16 @@ nsBindingManager::HandleChildInsertion(n
if (newParent == parent) {
break;
}
parent = newParent;
}
}
-
-nsIContent*
-nsBindingManager::FindNestedInsertionPoint(nsIContent* aContainer,
- nsIContent* aChild)
-{
- NS_PRECONDITION(aChild->GetParent() == aContainer,
- "Wrong container");
-
- nsIContent* parent = aContainer;
- if (aContainer->IsActiveChildrenElement()) {
- if (static_cast<XBLChildrenElement*>(aContainer)->
- HasInsertedChildren()) {
- return nullptr;
- }
- parent = aContainer->GetParent();
- }
-
- while (parent) {
- nsXBLBinding* binding = GetBindingWithContent(parent);
- if (!binding) {
- break;
- }
-
- XBLChildrenElement* point = binding->FindInsertionPointFor(aChild);
- if (!point) {
- return nullptr;
- }
-
- nsIContent* newParent = point->GetParent();
- if (newParent == parent) {
- break;
- }
- parent = newParent;
- }
-
- return parent;
-}
-
nsIContent*
nsBindingManager::FindNestedSingleInsertionPoint(nsIContent* aContainer,
bool* aMulti)
{
*aMulti = false;
nsIContent* parent = aContainer;
if (aContainer->IsActiveChildrenElement()) {
--- a/dom/xbl/nsBindingManager.h
+++ b/dom/xbl/nsBindingManager.h
@@ -166,19 +166,16 @@ public:
// When removing an insertion point or a parent of one, clear the insertion
// points and their insertion parents.
void ClearInsertionPointsRecursively(nsIContent* aContent);
// Called when the document is going away
void DropDocumentReference();
- nsIContent* FindNestedInsertionPoint(nsIContent* aContainer,
- nsIContent* aChild);
-
nsIContent* FindNestedSingleInsertionPoint(nsIContent* aContainer, bool* aMulti);
bool AnyBindingHasDocumentStateDependency(mozilla::EventStates aStateMask);
protected:
nsIXPConnectWrappedJS* GetWrappedJS(nsIContent* aContent);
nsresult SetWrappedJS(nsIContent* aContent, nsIXPConnectWrappedJS* aResult);