summaryrefslogtreecommitdiff
path: root/dom/base/Element.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/Element.cpp')
-rw-r--r--dom/base/Element.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp
index 31af0c1db4..a2b78092ad 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();
}