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

Unified Diff: Source/core/html/parser/HTMLScriptRunner.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
« Source/core/dom/CustomElementRegistry.h ('K') | « Source/core/dom/Microtask.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLScriptRunner.cpp
diff --git a/Source/core/html/parser/HTMLScriptRunner.cpp b/Source/core/html/parser/HTMLScriptRunner.cpp
index 93514ef1a44e33c9d93079f4d0dd316b6406865c..a1f1f6ccf831a4d08c6c577b1a289bdafe6e1e07 100644
--- a/Source/core/html/parser/HTMLScriptRunner.cpp
+++ b/Source/core/html/parser/HTMLScriptRunner.cpp
@@ -29,11 +29,10 @@
#include "HTMLNames.h"
#include "bindings/v8/ScriptSourceCode.h"
#include "core/dom/Attribute.h"
-#include "core/dom/CustomElementRegistry.h"
#include "core/dom/Element.h"
#include "core/dom/Event.h"
#include "core/dom/IgnoreDestructiveWriteCountIncrementer.h"
-#include "core/dom/MutationObserver.h"
+#include "core/dom/Microtask.h"
#include "core/dom/ScriptElement.h"
#include "core/html/parser/HTMLInputStream.h"
#include "core/html/parser/HTMLScriptRunnerHost.h"
@@ -130,8 +129,7 @@ void HTMLScriptRunner::executePendingScriptAndDispatchEvent(PendingScript& pendi
stopWatchingForLoad(pendingScript);
if (!isExecutingScript()) {
- CustomElementRegistry::deliverAllLifecycleCallbacks();
- MutationObserver::deliverAllMutations();
+ Microtask::performCheckpoint();
}
// Clear the pending script before possible rentrancy from executeScript()
@@ -296,8 +294,7 @@ void HTMLScriptRunner::runScript(Element* script, const TextPosition& scriptStar
// unfortuantely no obvious way to tell if prepareScript is going to
// execute the script from out here.
if (!isExecutingScript()) {
- CustomElementRegistry::deliverAllLifecycleCallbacks();
- MutationObserver::deliverAllMutations();
+ Microtask::performCheckpoint();
}
InsertionPointRecord insertionPointRecord(m_host->inputStream());
« Source/core/dom/CustomElementRegistry.h ('K') | « Source/core/dom/Microtask.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698