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

Unified Diff: third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl

Issue 1814853003: Track whether an element was inserted via document.write (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on #384935 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/build/scripts/templates/ElementFactory.cpp.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl
index 63728fe7f387f2ae67179775f55c264fd2678f2b..143d38db11eda3e56689e40eab1c90b2235fcd5b 100644
--- a/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl
@@ -48,7 +48,7 @@ static RawPtr<{{namespace}}Element> {{tag|symbol}}Constructor(
{%- if tag.multipleTagNames %}{{tag|symbol}}Tag, {% endif -%}
document
{%- if namespace == 'HTML' and tag.constructorNeedsFormElement %}, formElement{% endif -%}
- {%- if tag.constructorNeedsCreatedByParser %}, createdByParser{% endif -%}
+ {%- if tag.constructorNeedsCreatedByParser %}, createdByParser ? ParserInserted : DefaultContext{% endif -%}
);
}
{% endfor %}
@@ -84,7 +84,7 @@ RawPtr<{{namespace}}Element> {{namespace}}ElementFactory::create{{namespace}}Ele
if (!g_constructors)
create{{namespace}}FunctionMap();
if (ConstructorFunction function = g_constructors->get(localName))
- return function(document, {% if namespace == 'HTML' %}formElement, {% endif %}createdByParser);
+ return function(document, {% if namespace == 'HTML' %}formElement, {% endif %}createdByParser ? ParserInserted : DefaultContext);
if (document.registrationContext() && CustomElement::isValidName(localName)) {
RawPtr<Element> element = document.registrationContext()->createCustomTagElement(document, QualifiedName(nullAtom, localName, {{namespace_prefix}}NamespaceURI));
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ScriptLoader.h » ('j') | third_party/WebKit/Source/core/dom/ScriptLoader.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698