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

Unified Diff: third_party/WebKit/Source/core/dom/shadow/SlotAssignment.cpp

Issue 1681683005: Set distribution recalc flag when a slot assignment changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-api-dynamic.html ('k') | 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/shadow/SlotAssignment.cpp
diff --git a/third_party/WebKit/Source/core/dom/shadow/SlotAssignment.cpp b/third_party/WebKit/Source/core/dom/shadow/SlotAssignment.cpp
index 6ee8312c6e27b0a1ac53b8d98a7d51a2eb5a4222..16ad5ad6d2d00a296052bad77cc4e04fac595305 100644
--- a/third_party/WebKit/Source/core/dom/shadow/SlotAssignment.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/SlotAssignment.cpp
@@ -7,6 +7,7 @@
#include "core/HTMLNames.h"
#include "core/dom/ElementTraversal.h"
#include "core/dom/NodeTraversal.h"
+#include "core/dom/shadow/ElementShadow.h"
#include "core/dom/shadow/InsertionPoint.h"
#include "core/dom/shadow/ShadowRoot.h"
#include "core/html/HTMLSlotElement.h"
@@ -86,6 +87,8 @@ void SlotAssignment::assign(Node& hostChild, HTMLSlotElement& slot)
slot.appendDistributedNodesFrom(toHTMLSlotElement(hostChild));
else
slot.appendDistributedNode(hostChild);
+ if (slot.isChildOfV1ShadowHost())
+ slot.parentElementShadow()->setNeedsDistributionRecalc();
}
DEFINE_TRACE(SlotAssignment)
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/shadow/v1-slots-api-dynamic.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698