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

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

Issue 14660019: Run Mutation Observer and Custom Element callbacks consistently at microtask checkpoint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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: Source/core/dom/Microtask.cpp
diff --git a/Source/modules/inputmethod/Composition.cpp b/Source/core/dom/Microtask.cpp
similarity index 77%
copy from Source/modules/inputmethod/Composition.cpp
copy to Source/core/dom/Microtask.cpp
index 870e8ea20fe6e84711b12b2bfde5f8791f2645b3..da7b4273365701162d292e6dd17c4b129c0ef9c4 100644
--- a/Source/modules/inputmethod/Composition.cpp
+++ b/Source/core/dom/Microtask.cpp
@@ -29,26 +29,21 @@
*/
#include "config.h"
-#include "modules/inputmethod/Composition.h"
-#include "core/dom/Node.h"
-#include "core/dom/Range.h"
+#include "core/dom/Microtask.h"
-namespace WebCore {
+#include "core/dom/CustomElementRegistry.h"
+#include "core/dom/MutationObserver.h"
-Composition::~Composition()
-{
-}
+namespace WebCore {
-PassRefPtr<Composition> Composition::create(Node* text, Range* caret)
+void Microtask::performCheckpoint()
{
- return adoptRef(new Composition(text, caret));
+ CustomElementRegistry::deliverAllLifecycleCallbacks();
+ MutationObserver::deliverAllMutations();
+ ASSERT(!CustomElementRegistry::hasQueuedLifecycleCallbacks());
+ // FIXME: Remove this when https://www.w3.org/Bugs/Public/show_bug.cgi?id=21962 is fixed
+ CustomElementRegistry::abandonAllQueuedLifecycleCallbacks();
}
-Composition::Composition(Node* text, Range* caret)
- : m_text(text)
- , m_caret(caret)
-{
}
-
-} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698