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

Unified Diff: Source/build/scripts/templates/ElementWrapperFactory.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
« no previous file with comments | « Source/build/scripts/templates/ElementFactory.cpp.tmpl ('k') | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/build/scripts/templates/ElementWrapperFactory.cpp.tmpl
diff --git a/Source/build/scripts/templates/ElementWrapperFactory.cpp.tmpl b/Source/build/scripts/templates/ElementWrapperFactory.cpp.tmpl
index 8d76c5867ed45aa660e854781fa924ad667c149a..2676dc011f417bc88e1d18f2971e225c16d1e4cf 100644
--- a/Source/build/scripts/templates/ElementWrapperFactory.cpp.tmpl
+++ b/Source/build/scripts/templates/ElementWrapperFactory.cpp.tmpl
@@ -34,15 +34,14 @@ static v8::Handle<v8::Object> create{{namespace}}ElementWrapper({{namespace}}Ele
{%- for js_interface, list in tags|sort|selectattr('has_js_interface')|groupby('js_interface') %}
static v8::Handle<v8::Object> create{{js_interface}}Wrapper({{namespace}}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
-{%- if list[0].wrapperOnlyIfMediaIsAvailable %}
- Settings* settings = element->document().settings();
- if (!RuntimeEnabledFeatures::mediaEnabled() || (settings && !settings->mediaEnabled()))
- return createV8{{namespace}}FallbackWrapper(to{{fallback_js_interface}}(element), creationContext, isolate);
-{%- endif %}
{%- if list[0].contextConditional %}
if (!ContextFeatures::{{list[0].contextConditional}}Enabled(&element->document()))
return createV8{{namespace}}FallbackWrapper(to{{fallback_js_interface}}(element), creationContext, isolate);
{%- endif %}
+{%- if list[0].runtimeEnabled %}
+ if (!RuntimeEnabledFeatures::{{list[0].runtimeEnabled}}Enabled())
+ return createV8{{namespace}}FallbackWrapper(to{{fallback_js_interface}}(element), creationContext, isolate);
+{%- endif %}
return wrap(static_cast<{{js_interface}}*>(element), creationContext, isolate);
}
{%- endfor %}
@@ -55,7 +54,7 @@ v8::Handle<v8::Object> createV8{{namespace}}Wrapper({{namespace}}Element* elemen
{%- for tag in tags|sort %}
map.set({{tag|symbol}}Tag.localName().impl(), create{{tag.js_interface}}Wrapper);
{%- endfor %}
- } // taco
+ }
Create{{namespace}}ElementWrapperFunction createWrapperFunction = map.get(element->localName().impl());
if (createWrapperFunction == create{{namespace}}ElementWrapper)
« no previous file with comments | « Source/build/scripts/templates/ElementFactory.cpp.tmpl ('k') | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698