Bug 1596391 - Remove Get/SetXBLInsertionPoint. r=smaug

They're dead.

Depends on D52992

Differential Revision: https://phabricator.services.mozilla.com/D52993

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emilio Cobos Álvarez 2019-11-14 12:56:44 +00:00
Родитель 802cb96d68
Коммит 9bd8bd3152
3 изменённых файлов: 0 добавлений и 64 удалений

Просмотреть файл

@ -532,7 +532,6 @@ static_assert(sizeof(FragmentOrElement::nsDOMSlots) <= MaxDOMSlotSizeAllowed,
void nsIContent::nsExtendedContentSlots::UnlinkExtendedSlots() {
mBindingParent = nullptr;
mXBLInsertionPoint = nullptr;
mContainingShadow = nullptr;
mAssignedSlot = nullptr;
}
@ -547,9 +546,6 @@ void nsIContent::nsExtendedContentSlots::TraverseExtendedSlots(
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(aCb, "mExtendedSlots->mAssignedSlot");
aCb.NoteXPCOMChild(NS_ISUPPORTS_CAST(nsIContent*, mAssignedSlot.get()));
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(aCb, "mExtendedSlots->mXBLInsertionPoint");
aCb.NoteXPCOMChild(mXBLInsertionPoint.get());
}
nsIContent::nsExtendedContentSlots::nsExtendedContentSlots() {}
@ -882,18 +878,6 @@ void nsIContent::GetEventTargetParent(EventChainPreVisitor& aVisitor) {
}
}
// check for an anonymous parent
// XXX XBL2/sXBL issue
if (HasFlag(NODE_MAY_BE_IN_BINDING_MNGR)) {
nsIContent* insertionParent = GetXBLInsertionParent();
NS_ASSERTION(!(aVisitor.mEventTargetAtParent && insertionParent &&
aVisitor.mEventTargetAtParent != insertionParent),
"Retargeting and having insertion parent!");
if (insertionParent) {
parent = insertionParent;
}
}
if (!aVisitor.mEvent->mFlags.mComposedInNativeAnonymousContent &&
IsRootOfNativeAnonymousSubtree() && OwnerDoc()->GetWindow()) {
aVisitor.SetParentTarget(OwnerDoc()->GetWindow()->GetParentTarget(), true);
@ -1084,18 +1068,6 @@ void nsIContent::SetAssignedSlot(HTMLSlotElement* aSlot) {
ExtendedContentSlots()->mAssignedSlot = aSlot;
}
void nsIContent::SetXBLInsertionPoint(nsIContent* aContent) {
if (aContent) {
nsExtendedContentSlots* slots = ExtendedContentSlots();
SetFlags(NODE_MAY_BE_IN_BINDING_MNGR);
slots->mXBLInsertionPoint = aContent;
} else {
if (nsExtendedContentSlots* slots = GetExistingExtendedContentSlots()) {
slots->mXBLInsertionPoint = nullptr;
}
}
}
#ifdef DEBUG
void nsIContent::AssertAnonymousSubtreeRelatedInvariants() const {
MOZ_ASSERT(!IsRootOfNativeAnonymousSubtree() ||

Просмотреть файл

@ -4380,14 +4380,6 @@ bool nsContentUtils::HasMutationListeners(nsINode* aNode, uint32_t aType,
return true;
}
if (aNode->IsContent()) {
nsIContent* insertionPoint = aNode->AsContent()->GetXBLInsertionPoint();
if (insertionPoint) {
aNode = insertionPoint->GetParent();
MOZ_ASSERT(aNode);
continue;
}
}
aNode = aNode->GetParentNode();
}

Просмотреть файл

@ -445,29 +445,6 @@ class nsIContent : public nsINode {
*/
mozilla::dom::HTMLSlotElement* GetAssignedSlotByMode() const;
nsIContent* GetXBLInsertionParent() const {
nsIContent* ip = GetXBLInsertionPoint();
return ip ? ip->GetParent() : nullptr;
}
/**
* Gets the insertion parent element of the XBL binding.
* The insertion parent is our one true parent in the transformed DOM.
*
* @return the insertion parent element.
*/
nsIContent* GetXBLInsertionPoint() const {
const nsExtendedContentSlots* slots = GetExistingExtendedContentSlots();
return slots ? slots->mXBLInsertionPoint.get() : nullptr;
}
/**
* Sets the insertion parent element of the XBL binding.
*
* @param aContent The insertion parent element.
*/
void SetXBLInsertionPoint(nsIContent* aContent);
/**
* Same as GetFlattenedTreeParentNode, but returns null if the parent is
* non-nsIContent.
@ -764,11 +741,6 @@ class nsIContent : public nsINode {
*/
RefPtr<mozilla::dom::Element> mBindingParent;
/**
* @see nsIContent::GetXBLInsertionPoint
*/
nsCOMPtr<nsIContent> mXBLInsertionPoint;
/**
* @see nsIContent::GetContainingShadow
*/