mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 17:31:47 +09:00
Bug 1389743 - Only reconstruct frames synchronously from ContentRemoved when called from frame construction
Tag #1375
This commit is contained in:
parent
fe13c5bffc
commit
f63cd76698
9 changed files with 201 additions and 285 deletions
|
|
@ -1112,12 +1112,9 @@ Element::CreateShadowRoot(ErrorResult& aError)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
nsIDocument* doc = GetComposedDoc();
|
||||
nsIContent* destroyedFramesFor = nullptr;
|
||||
if (doc) {
|
||||
nsIPresShell* shell = doc->GetShell();
|
||||
if (shell) {
|
||||
shell->DestroyFramesFor(this, &destroyedFramesFor);
|
||||
if (nsIDocument* doc = GetComposedDoc()) {
|
||||
if (nsIPresShell* shell = doc->GetShell()) {
|
||||
shell->DestroyFramesFor(this);
|
||||
MOZ_ASSERT(!shell->FrameManager()->GetDisplayContentsStyleFor(this));
|
||||
}
|
||||
}
|
||||
|
|
@ -1160,16 +1157,6 @@ Element::CreateShadowRoot(ErrorResult& aError)
|
|||
|
||||
SetXBLBinding(xblBinding);
|
||||
|
||||
// Recreate the frame for the bound content because binding a ShadowRoot
|
||||
// changes how things are rendered.
|
||||
if (doc) {
|
||||
MOZ_ASSERT(doc == GetComposedDoc());
|
||||
nsIPresShell* shell = doc->GetShell();
|
||||
if (shell) {
|
||||
shell->CreateFramesFor(destroyedFramesFor);
|
||||
}
|
||||
}
|
||||
|
||||
return shadowRoot.forget();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue