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

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

Issue 60763002: Never create HTMLTrackElement when VideoTrack is not enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: consistency Created 7 years, 1 month 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: Source/build/scripts/templates/ElementFactory.cpp.tmpl
diff --git a/Source/build/scripts/templates/ElementFactory.cpp.tmpl b/Source/build/scripts/templates/ElementFactory.cpp.tmpl
index 09322d282155d4ac7d06d19bb79b62fcb61236ba..231c403ad004346a7e2ec95c3d6bc5d090c5ef9f 100644
--- a/Source/build/scripts/templates/ElementFactory.cpp.tmpl
+++ b/Source/build/scripts/templates/ElementFactory.cpp.tmpl
@@ -43,15 +43,14 @@ static PassRefPtr<{{namespace}}Element> {{tag|symbol}}Constructor(
{%- endif %}
bool createdByParser)
{
-{%- if tag.wrapperOnlyIfMediaIsAvailable %}
- Settings* settings = document.settings();
- if (!RuntimeEnabledFeatures::mediaEnabled() || (settings && !settings->mediaEnabled()))
- return 0;
-{%- endif %}
{%- if tag.contextConditional %}
if (!ContextFeatures::{{tag.contextConditional}}Enabled(&document))
return 0;
{%- endif %}
+{%- if tag.runtimeEnabled %}
+ if (!RuntimeEnabledFeatures::{{tag.runtimeEnabled}}Enabled())
+ return 0;
+{%- endif %}
return {{tag.interface}}::create(tagName, document
{%- if namespace == 'HTML' and tag.constructorNeedsFormElement %}, formElement{% endif -%}
{%- if tag.constructorNeedsCreatedByParser %}, createdByParser{% endif -%}
« no previous file with comments | « Source/build/scripts/make_element_factory.py ('k') | Source/build/scripts/templates/ElementWrapperFactory.cpp.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698