X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fcore%2Fhtml%2FHTMLScriptElement.cpp;h=a9dbdbe9b3408d7bf9cea9366925e77b335a54fc;hb=3545e9f2671f595d2a2f3ee75ca0393b01e35ef6;hp=0f6df59e2b67121999ac3b75434457a6e97cbaa4;hpb=7d210d4c7e9ba36e635eabc5b5780495f8a63292;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/core/html/HTMLScriptElement.cpp b/src/third_party/WebKit/Source/core/html/HTMLScriptElement.cpp index 0f6df59..a9dbdbe 100644 --- a/src/third_party/WebKit/Source/core/html/HTMLScriptElement.cpp +++ b/src/third_party/WebKit/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" @@ -41,7 +42,6 @@ inline HTMLScriptElement::HTMLScriptElement(Document& document, bool wasInserted : HTMLElement(scriptTag, document) , m_loader(ScriptLoader::create(this, wasInsertedByParser, alreadyStarted)) { - ScriptWrappable::init(this); } PassRefPtrWillBeRawPtr HTMLScriptElement::create(Document& document, bool wasInsertedByParser, bool alreadyStarted) @@ -70,6 +70,13 @@ void HTMLScriptElement::childrenChanged(const ChildrenChange& change) m_loader->childrenChanged(); } +void HTMLScriptElement::didMoveToNewDocument(Document& oldDocument) +{ + if (RefPtrWillBeRawPtr contextDocument = document().contextDocument().get()) + oldDocument.scriptRunner()->movePendingAsyncScript(contextDocument->scriptRunner(), m_loader.get()); + HTMLElement::didMoveToNewDocument(oldDocument); +} + void HTMLScriptElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { if (name == srcAttr)