| 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 1b8b7bfef1748291b272b08414b4104872c304d9..090adb3f9739f3734d7bb08735aeaf5a9fa23403 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
|
| @@ -309,20 +309,24 @@ void HTMLSlotElement::lazyReattachDistributedNodesIfNeeded() {
|
| m_oldDistributedNodes.clear();
|
| }
|
|
|
| -void HTMLSlotElement::enqueueSlotChangeEvent() {
|
| - if (!m_slotchangeEventEnqueued) {
|
| - Microtask::enqueueMicrotask(WTF::bind(
|
| - &HTMLSlotElement::dispatchSlotChangeEvent, wrapPersistent(this)));
|
| - m_slotchangeEventEnqueued = true;
|
| - }
|
| -
|
| +void HTMLSlotElement::didSlotChange(SlotChangeType slotChangeType) {
|
| + if (slotChangeType == SlotChangeType::Initial)
|
| + enqueueSlotChangeEvent();
|
| ShadowRoot* root = containingShadowRoot();
|
| DCHECK(root);
|
| DCHECK(root->isV1());
|
| root->owner()->setNeedsDistributionRecalc();
|
| // Check slotchange recursively since this slotchange may cause another
|
| // slotchange.
|
| - checkSlotChange();
|
| + checkSlotChange(SlotChangeType::Chained);
|
| +}
|
| +
|
| +void HTMLSlotElement::enqueueSlotChangeEvent() {
|
| + if (m_slotchangeEventEnqueued)
|
| + return;
|
| + Microtask::enqueueMicrotask(WTF::bind(
|
| + &HTMLSlotElement::dispatchSlotChangeEvent, wrapPersistent(this)));
|
| + m_slotchangeEventEnqueued = true;
|
| }
|
|
|
| bool HTMLSlotElement::hasAssignedNodesSlow() const {
|
|
|