summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dom/base/ShadowRoot.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/dom/base/ShadowRoot.cpp b/dom/base/ShadowRoot.cpp
index e31b97262c..92d5a2f2a9 100644
--- a/dom/base/ShadowRoot.cpp
+++ b/dom/base/ShadowRoot.cpp
@@ -578,6 +578,13 @@ ShadowRoot::ContentInserted(nsIDocument* aDocument,
if (slot && slot->GetContainingShadow() == this &&
slot->AssignedNodes().IsEmpty()) {
slot->EnqueueSlotChangeEvent();
+ return;
+ }
+
+ // XXX: The following makes the host destroy its frames and force a
+ // restyle for cases where the content isn't slotted.
+ if (aContainer == this) {
+ DistributionChanged();
}
}
@@ -614,6 +621,13 @@ ShadowRoot::ContentRemoved(nsIDocument* aDocument,
if (slot && slot->GetContainingShadow() == this &&
slot->AssignedNodes().IsEmpty()) {
slot->EnqueueSlotChangeEvent();
+ return;
+ }
+
+ // XXX: The following makes the host destroy its frames and force a
+ // restyle for cases where the content isn't slotted.
+ if (aContainer == this) {
+ DistributionChanged();
}
}