diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 06:14:10 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 06:14:10 -0400 |
commit | e482e335bb8de6630a171cd0a784b420d91106b2 (patch) | |
tree | 70d27fa03ec0624a04e3418fb20ac1a434dcc3e5 /dom/base | |
parent | f4a1d0123c41647f2f05aeaa2ae14bd1806fbb5c (diff) | |
download | UXP-e482e335bb8de6630a171cd0a784b420d91106b2.tar UXP-e482e335bb8de6630a171cd0a784b420d91106b2.tar.gz UXP-e482e335bb8de6630a171cd0a784b420d91106b2.tar.lz UXP-e482e335bb8de6630a171cd0a784b420d91106b2.tar.xz UXP-e482e335bb8de6630a171cd0a784b420d91106b2.zip |
Bug 1389743 - Only reconstruct frames synchronously from ContentRemoved when called from frame construction
Tag #1375
Diffstat (limited to 'dom/base')
-rw-r--r-- | dom/base/Element.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp index 31af0c1db..a2b78092a 100644 --- a/dom/base/Element.cpp +++ b/dom/base/Element.cpp @@ -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(); } |