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

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

Issue 2420043002: Stop re-signaling a slotchange event (Closed)
Patch Set: rebased Created 4 years, 1 month 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 0de3ef3e8fb1f9c489a3aaafc0cbd78717d2d243..8983f821c4c68e0a9ee2ade29d6467b4f949a659 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -2363,7 +2363,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())
@@ -2380,7 +2380,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
@@ -2395,7 +2395,7 @@ void Node::checkSlotChange() {
// TODO(hayato): Support slotchange for slots in non-shadow trees.
if (ShadowRoot* root = containingShadowRoot()) {
if (root && root->isV1() && !parentSlot.hasAssignedNodesSlow())
- parentSlot.enqueueSlotChangeEvent();
+ parentSlot.didSlotChange(slotChangeType);
}
}
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | third_party/WebKit/Source/core/dom/shadow/SlotAssignment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698