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

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

Issue 1695163003: Support slotchange events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor 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
Index: third_party/WebKit/Source/core/html/HTMLSlotElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLSlotElement.h b/third_party/WebKit/Source/core/html/HTMLSlotElement.h
index 931573cb051845400c313e5f5d2547a71a9895e7..b72bd375cebd3e7a2a48eef6b81af0c5938b55bc 100644
--- a/third_party/WebKit/Source/core/html/HTMLSlotElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLSlotElement.h
@@ -58,7 +58,10 @@ public:
void appendDistributedNodesFrom(const HTMLSlotElement& other);
void clearDistribution();
+ bool hasSlotChangeEventListener();
+
void updateDistributedNodesWithFallback();
+ void didUpdateDistribution();
void attach(const AttachContext& = AttachContext()) override;
void detach(const AttachContext& = AttachContext()) override;
@@ -74,9 +77,13 @@ private:
InsertionNotificationRequest insertedInto(ContainerNode*) override;
void removedFrom(ContainerNode*) override;
+ void dispatchSlotChangeEvent();
+
WillBeHeapVector<RefPtrWillBeMember<Node>> m_assignedNodes;
WillBeHeapVector<RefPtrWillBeMember<Node>> m_distributedNodes;
WillBeHeapHashMap<RawPtrWillBeMember<const Node>, size_t> m_distributedIndices;
+ // TODO(hayato): Remove m_oldDistibutedNodes and make SlotAssignment check the diffirence between old and new distributed nodes for each slot to save the memories.
+ WillBeHeapVector<RefPtrWillBeMember<Node>> m_oldDistributedNodes;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698