Index: third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp |
diff --git a/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp b/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp |
index 547c347e944e71b7dc9e5455d27c47c575dcf186..0c07782b4795e466bfe2ce58a9d0b1cfec97efe4 100644 |
--- a/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp |
+++ b/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp |
@@ -36,6 +36,7 @@ |
#include "core/dom/QualifiedName.h" |
#include "core/dom/StaticNodeList.h" |
#include "core/dom/StyleChangeReason.h" |
+#include "core/dom/StyleEngine.h" |
#include "core/dom/shadow/ElementShadow.h" |
namespace blink { |
@@ -188,8 +189,11 @@ void InsertionPoint::childrenChanged(const ChildrenChange& change) |
{ |
HTMLElement::childrenChanged(change); |
if (ShadowRoot* root = containingShadowRoot()) { |
- if (ElementShadow* rootOwner = root->owner()) |
+ if (ElementShadow* rootOwner = root->owner()) { |
rootOwner->setNeedsDistributionRecalc(); |
+ if (document().shadowCascadeOrder() == ShadowCascadeOrder::ShadowCascadeV1) |
+ document().updateAssignment(); |
+ } |
} |
} |
@@ -199,6 +203,8 @@ Node::InsertionNotificationRequest InsertionPoint::insertedInto(ContainerNode* i |
if (ShadowRoot* root = containingShadowRoot()) { |
if (ElementShadow* rootOwner = root->owner()) { |
rootOwner->setNeedsDistributionRecalc(); |
+ if (document().shadowCascadeOrder() == ShadowCascadeOrder::ShadowCascadeV1) |
+ document().updateAssignment(); |
if (canBeActive() && !m_registeredWithShadowRoot && insertionPoint->treeScope().rootNode() == root) { |
m_registeredWithShadowRoot = true; |
root->didAddInsertionPoint(this); |
@@ -222,8 +228,11 @@ void InsertionPoint::removedFrom(ContainerNode* insertionPoint) |
root = insertionPoint->containingShadowRoot(); |
if (root) { |
- if (ElementShadow* rootOwner = root->owner()) |
+ if (ElementShadow* rootOwner = root->owner()) { |
rootOwner->setNeedsDistributionRecalc(); |
+ if (document().shadowCascadeOrder() == ShadowCascadeOrder::ShadowCascadeV1) |
+ document().updateAssignment(); |
+ } |
} |
// host can be null when removedFrom() is called from ElementShadow destructor. |