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

Unified Diff: Source/core/svg/SVGScriptElement.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/svg/SVGScriptElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGScriptElement.cpp
diff --git a/Source/core/svg/SVGScriptElement.cpp b/Source/core/svg/SVGScriptElement.cpp
index a9508b0147234746f1f452008b3c90c4dc792a6f..aed347235f0873f06885603424445d49e6afde42 100644
--- a/Source/core/svg/SVGScriptElement.cpp
+++ b/Source/core/svg/SVGScriptElement.cpp
@@ -27,6 +27,7 @@
#include "core/XLinkNames.h"
#include "core/dom/Attribute.h"
#include "core/dom/ScriptLoader.h"
+#include "core/dom/ScriptRunner.h"
#include "core/events/Event.h"
namespace blink {
@@ -123,6 +124,12 @@ void SVGScriptElement::childrenChanged(const ChildrenChange& change)
m_loader->childrenChanged();
}
+void SVGScriptElement::didMoveToNewDocument(Document& oldDocument)
+{
+ oldDocument.scriptRunner()->movePendingAsyncScript(document().scriptRunner(), m_loader.get());
+ SVGElement::didMoveToNewDocument(oldDocument);
+}
+
bool SVGScriptElement::isURLAttribute(const Attribute& attribute) const
{
return attribute.name() == AtomicString(sourceAttributeValue());
« no previous file with comments | « Source/core/svg/SVGScriptElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698