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

Unified Diff: Source/core/dom/CustomElementCallbackQueue.cpp

Issue 18789002: Implement Custom Elements' attributeChangedCallback. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Sync to tip. Created 7 years, 5 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
« no previous file with comments | « Source/core/dom/CustomElementCallbackQueue.h ('k') | Source/core/dom/CustomElementLifecycleCallbacks.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/CustomElementCallbackQueue.cpp
diff --git a/Source/core/dom/CustomElementCallbackQueue.cpp b/Source/core/dom/CustomElementCallbackQueue.cpp
index ae9e8a8e82b309baf48a07cb079b3268bb8fb2c6..168fada2724ef654fdce1915c90937bde969f129 100644
--- a/Source/core/dom/CustomElementCallbackQueue.cpp
+++ b/Source/core/dom/CustomElementCallbackQueue.cpp
@@ -54,15 +54,9 @@ void CustomElementCallbackQueue::processInElementQueue(ElementQueue caller)
// dispatch() may cause recursion which steals this callback
// queue and reenters processInQueue. owner() == caller
// detects this recursion and cedes processing.
- dispatch(m_queue[m_index]);
+ m_queue[m_index]->dispatch(m_callbacks.get(), m_element.get());
}
- // FIXME: While there is only one kind of callback, stealing work
- // is not possible. Remove this when there is a second kind of
- // callback plus tests for shifting callback queues between
- // element queues.
- ASSERT(owner() == caller);
-
if (owner() == caller && m_index == m_queue.size()) {
// This processInQueue exhausted the queue; shrink it.
m_index = 0;
@@ -71,16 +65,4 @@ void CustomElementCallbackQueue::processInElementQueue(ElementQueue caller)
}
}
-void CustomElementCallbackQueue::dispatch(const Invocation& which)
-{
- switch (which) {
- case CustomElementLifecycleCallbacks::Created:
- m_callbacks->created(m_element.get());
- break;
-
- default:
- ASSERT_NOT_REACHED();
- }
-}
-
} // namespace WebCore
« no previous file with comments | « Source/core/dom/CustomElementCallbackQueue.h ('k') | Source/core/dom/CustomElementLifecycleCallbacks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698