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

Unified Diff: Source/core/html/HTMLScriptElement.cpp

Issue 496443008: Transfer pending async script loader to new document. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Robustify new test wrt expected output Created 6 years, 4 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/html/HTMLScriptElement.h ('k') | Source/core/svg/SVGScriptElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLScriptElement.cpp
diff --git a/Source/core/html/HTMLScriptElement.cpp b/Source/core/html/HTMLScriptElement.cpp
index 0f6df59e2b67121999ac3b75434457a6e97cbaa4..b95da30566f265e2ee01c80206b1bf2fb71d00ee 100644
--- a/Source/core/html/HTMLScriptElement.cpp
+++ b/Source/core/html/HTMLScriptElement.cpp
@@ -30,6 +30,7 @@
#include "core/dom/Attribute.h"
#include "core/dom/Document.h"
#include "core/dom/ScriptLoader.h"
+#include "core/dom/ScriptRunner.h"
#include "core/dom/Text.h"
#include "core/events/Event.h"
@@ -70,6 +71,12 @@ void HTMLScriptElement::childrenChanged(const ChildrenChange& change)
m_loader->childrenChanged();
}
+void HTMLScriptElement::didMoveToNewDocument(Document& oldDocument)
+{
+ oldDocument.scriptRunner()->movePendingAsyncScript(document().scriptRunner(), m_loader.get());
+ HTMLElement::didMoveToNewDocument(oldDocument);
+}
+
void HTMLScriptElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name == srcAttr)
« no previous file with comments | « Source/core/html/HTMLScriptElement.h ('k') | Source/core/svg/SVGScriptElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698