Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Unified Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 1715623002: Make a microtask of distribution recalc happen only when ShadowDOMV1 flag is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@focus-navigation-others
Patch Set: remove dependency Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698