mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1001562 - Make SetXBLInsertionParent(nullptr) and SetXBLBinding(nullptr, ...) lazier. r=smaug
This commit is contained in:
parent
2da264c3e1
commit
510ae624e0
@ -954,13 +954,16 @@ FragmentOrElement::SetXBLBinding(nsXBLBinding* aBinding,
|
||||
bindingManager->RemoveFromAttachedQueue(oldBinding);
|
||||
}
|
||||
|
||||
nsDOMSlots *slots = DOMSlots();
|
||||
if (aBinding) {
|
||||
SetFlags(NODE_MAY_BE_IN_BINDING_MNGR);
|
||||
nsDOMSlots *slots = DOMSlots();
|
||||
slots->mXBLBinding = aBinding;
|
||||
bindingManager->AddBoundContent(this);
|
||||
} else {
|
||||
slots->mXBLBinding = nullptr;
|
||||
nsDOMSlots *slots = GetExistingDOMSlots();
|
||||
if (slots) {
|
||||
slots->mXBLBinding = nullptr;
|
||||
}
|
||||
bindingManager->RemoveBoundContent(this);
|
||||
if (oldBinding) {
|
||||
oldBinding->SetBoundElement(nullptr);
|
||||
@ -1011,11 +1014,16 @@ FragmentOrElement::SetShadowRoot(ShadowRoot* aShadowRoot)
|
||||
void
|
||||
FragmentOrElement::SetXBLInsertionParent(nsIContent* aContent)
|
||||
{
|
||||
nsDOMSlots *slots = DOMSlots();
|
||||
if (aContent) {
|
||||
nsDOMSlots *slots = DOMSlots();
|
||||
SetFlags(NODE_MAY_BE_IN_BINDING_MNGR);
|
||||
slots->mXBLInsertionParent = aContent;
|
||||
} else {
|
||||
nsDOMSlots *slots = GetExistingDOMSlots();
|
||||
if (slots) {
|
||||
slots->mXBLInsertionParent = nullptr;
|
||||
}
|
||||
}
|
||||
slots->mXBLInsertionParent = aContent;
|
||||
}
|
||||
|
||||
CustomElementData*
|
||||
|
@ -713,11 +713,16 @@ nsGenericDOMDataNode::GetXBLInsertionParent() const
|
||||
void
|
||||
nsGenericDOMDataNode::SetXBLInsertionParent(nsIContent* aContent)
|
||||
{
|
||||
nsDataSlots *slots = DataSlots();
|
||||
if (aContent) {
|
||||
nsDataSlots *slots = DataSlots();
|
||||
SetFlags(NODE_MAY_BE_IN_BINDING_MNGR);
|
||||
slots->mXBLInsertionParent = aContent;
|
||||
} else {
|
||||
nsDataSlots *slots = GetExistingDataSlots();
|
||||
if (slots) {
|
||||
slots->mXBLInsertionParent = nullptr;
|
||||
}
|
||||
}
|
||||
slots->mXBLInsertionParent = aContent;
|
||||
}
|
||||
|
||||
CustomElementData *
|
||||
|
Loading…
Reference in New Issue
Block a user