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

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

Issue 2002063003: Change "bool createdByParser" of createElement() to enum (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cestate
Patch Set: Add ImportNode Created 4 years, 7 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 | « no previous file | third_party/WebKit/Source/build/scripts/templates/ElementFactory.h.tmpl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d9c20acffca56d601bc05c2f70515765ef97d040..7b7e9def78679f001184fff8bb1d1f579f2e9a16 100644
--- a/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl
@@ -29,7 +29,7 @@ typedef {{namespace}}Element* (*ConstructorFunction)(
{% if namespace == 'HTML' %}
HTMLFormElement*,
{% endif %}
- bool createdByParser);
+ CreateElementFlags);
typedef HashMap<AtomicString, ConstructorFunction> FunctionMap;
@@ -41,7 +41,7 @@ static {{namespace}}Element* {{tag|symbol}}Constructor(
{% if namespace == 'HTML' %}
HTMLFormElement* formElement,
{% endif %}
- bool createdByParser)
+ CreateElementFlags flags)
{
{% if tag.runtimeEnabled %}
if (!RuntimeEnabledFeatures::{{tag.runtimeEnabled}}Enabled())
@@ -51,7 +51,7 @@ static {{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 %}, flags & CreatedByParser{% endif -%}
);
}
{% endfor %}
@@ -82,16 +82,16 @@ static void create{{namespace}}FunctionMap()
{% if namespace == 'HTML' %}
HTMLFormElement* formElement,
{% endif %}
- bool createdByParser)
+ CreateElementFlags flags)
{
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 %}flags);
{% if namespace == 'HTML' %}
if (CustomElement::shouldCreateCustomElement(document, localName))
- return CustomElement::createCustomElement(document, localName);
+ return CustomElement::createCustomElement(document, localName, flags);
{% endif %}
if (document.registrationContext() && V0CustomElement::isValidName(localName)) {
« no previous file with comments | « no previous file | third_party/WebKit/Source/build/scripts/templates/ElementFactory.h.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698