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

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

Issue 2420043002: Stop re-signaling a slotchange event (Closed)
Patch Set: New slotchange behavior Created 4 years, 2 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
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 e7766f1517764202878d2c1e2b76fa3f60166f4a..2cc9d9a34e87bea18e7c6236371af404a1cc491a 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -2344,7 +2344,7 @@ void Node::setV0CustomElementState(V0CustomElementState newState) {
toElement(this)->pseudoStateChanged(CSSSelector::PseudoUnresolved);
}
-void Node::checkSlotChange() {
+void Node::checkSlotChange(SlotChangeType slotChangeType) {
// Common check logic is used in both cases, "after inserted" and "before
// removed".
if (!isSlotable())
@@ -2361,7 +2361,7 @@ void Node::checkSlotChange() {
// Although DOM Standard requires "assign a slot for node / run assign
// slotables" at this timing, we skip it as an optimization.
if (HTMLSlotElement* slot = root->ensureSlotAssignment().findSlot(*this))
- slot->enqueueSlotChangeEvent();
+ slot->didSlotChange(slotChangeType);
} else {
// Relevant DOM Standard:
// https://dom.spec.whatwg.org/#concept-node-insert
@@ -2375,7 +2375,7 @@ void Node::checkSlotChange() {
HTMLSlotElement& parentSlot = toHTMLSlotElement(*parent);
if (ShadowRoot* root = containingShadowRoot()) {
if (root && root->isV1() && !parentSlot.hasAssignedNodesSlow())
kochi 2016/10/31 08:39:13 BTW (this is not for this review) this |root| is g
- parentSlot.enqueueSlotChangeEvent();
+ parentSlot.didSlotChange(slotChangeType);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698