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

Unified Diff: third_party/WebKit/Source/core/html/HTMLSlotElement.cpp

Issue 2622193002: Dispatch slotchange events in "notify mutation observers" steps (Closed)
Patch Set: Created 3 years, 11 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/html/HTMLSlotElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp b/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
index d298d7a80ea854044c57e5002eff3f6f50b0e510..8788b35b1d64a4b8cd9ffe9358819478eb1d7abb 100644
--- a/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
@@ -149,7 +149,6 @@ void HTMLSlotElement::saveAndClearDistribution() {
}
void HTMLSlotElement::dispatchSlotChangeEvent() {
- m_slotchangeEventEnqueued = false;
Event* event = Event::createBubble(EventTypeNames::slotchange);
event->setTarget(this);
dispatchScopedEvent(event);
@@ -332,8 +331,7 @@ void HTMLSlotElement::didSlotChange(SlotChangeType slotChangeType) {
void HTMLSlotElement::enqueueSlotChangeEvent() {
if (m_slotchangeEventEnqueued)
return;
- Microtask::enqueueMicrotask(WTF::bind(
- &HTMLSlotElement::dispatchSlotChangeEvent, wrapPersistent(this)));
+ MutationObserver::enqueueSlotChange(*this);
m_slotchangeEventEnqueued = true;
}

Powered by Google App Engine
This is Rietveld 408576698