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

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

Issue 1814853003: Track whether an element was inserted via document.write (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: back to ps2 with some changes Created 4 years, 8 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: third_party/WebKit/Source/core/html/HTMLScriptElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLScriptElement.cpp b/third_party/WebKit/Source/core/html/HTMLScriptElement.cpp
index d61560f575c8c30e73eae448b428f780c16befe9..0aa5a910afc15d804bebc5feec09de8beab96559 100644
--- a/third_party/WebKit/Source/core/html/HTMLScriptElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLScriptElement.cpp
@@ -37,15 +37,15 @@ namespace blink {
using namespace HTMLNames;
-inline HTMLScriptElement::HTMLScriptElement(Document& document, bool wasInsertedByParser, bool alreadyStarted)
+inline HTMLScriptElement::HTMLScriptElement(Document& document, bool wasInsertedByParser, bool alreadyStarted, bool createdDuringDocumentWrite)
: HTMLElement(scriptTag, document)
- , m_loader(ScriptLoader::create(this, wasInsertedByParser, alreadyStarted))
+ , m_loader(ScriptLoader::create(this, wasInsertedByParser, alreadyStarted, createdDuringDocumentWrite))
{
}
-RawPtr<HTMLScriptElement> HTMLScriptElement::create(Document& document, bool wasInsertedByParser, bool alreadyStarted)
+RawPtr<HTMLScriptElement> HTMLScriptElement::create(Document& document, bool wasInsertedByParser, bool alreadyStarted, bool createdDuringDocumentWrite)
{
- return new HTMLScriptElement(document, wasInsertedByParser, alreadyStarted);
+ return new HTMLScriptElement(document, wasInsertedByParser, alreadyStarted, createdDuringDocumentWrite);
}
bool HTMLScriptElement::isURLAttribute(const Attribute& attribute) const
@@ -176,7 +176,7 @@ void HTMLScriptElement::dispatchLoadEvent()
RawPtr<Element> HTMLScriptElement::cloneElementWithoutAttributesAndChildren()
{
- return new HTMLScriptElement(document(), false, m_loader->alreadyStarted());
+ return new HTMLScriptElement(document(), false, m_loader->alreadyStarted(), false);
}
DEFINE_TRACE(HTMLScriptElement)

Powered by Google App Engine
This is Rietveld 408576698