Index: third_party/WebKit/Source/core/dom/Node.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp |
index f1caf2f053eeafdd9b5f50f2e675ecbc741f5613..7e548db9ab627b4d60c3146a073d22d9287f2f1b 100644 |
--- a/third_party/WebKit/Source/core/dom/Node.cpp |
+++ b/third_party/WebKit/Source/core/dom/Node.cpp |
@@ -86,6 +86,7 @@ |
#include "core/page/Page.h" |
#include "core/svg/graphics/SVGImage.h" |
#include "platform/EventDispatchForbiddenScope.h" |
+#include "platform/RuntimeEnabledFeatures.h" |
#include "platform/TraceEvent.h" |
#include "platform/TracedValue.h" |
#include "wtf/HashSet.h" |
@@ -691,7 +692,7 @@ void Node::markAncestorsWithChildNeedsStyleInvalidation() |
void Node::markAncestorsWithChildNeedsDistributionRecalc() |
{ |
ScriptForbiddenScope forbidScriptDuringRawIteration; |
- if (inDocument() && !document().childNeedsDistributionRecalc()) { |
+ if (RuntimeEnabledFeatures::shadowDOMV1Enabled() && inDocument() && !document().childNeedsDistributionRecalc()) { |
// TODO(hayato): Support a non-document composed tree. |
// TODO(hayato): Enqueue a task only if a 'slotchange' event listner is registered in the document composed tree. |
Microtask::enqueueMicrotask(WTF::bind(&Document::updateDistribution, PassRefPtrWillBeRawPtr<Document>(&document()))); |