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

Unified Diff: third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.cpp

Issue 2052283002: Allow reactions to enqueue other reactions for the same element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor typo Created 4 years, 6 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/custom/CustomElementReactionStack.cpp
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.cpp
index 2da6975a07b2b45e0f8330af73ccc608f2bc8f40..1ec77952d5ed56cb36c22416618391f4e158ec23 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.cpp
@@ -30,16 +30,21 @@ void CustomElementReactionStack::push()
void CustomElementReactionStack::popInvokingReactions()
{
ElementQueue* queue = m_stack.last();
- m_stack.removeLast();
- if (!queue)
+ if (!queue) {
+ m_stack.removeLast();
return;
- for (auto& element : *queue) {
+ }
+
+ for (size_t i = 0; i < queue->size(); ++i) {
+ Element* element = (*queue)[i];
if (CustomElementReactionQueue* reactions = m_map.get(element)) {
reactions->invokeReactions(element);
CHECK(reactions->isEmpty());
m_map.remove(element);
}
}
+
+ m_stack.removeLast();
}
void CustomElementReactionStack::enqueue(

Powered by Google App Engine
This is Rietveld 408576698