| OLD | NEW |
| (Empty) |
| 1 {% from "macros.tmpl" import license %} | |
| 2 {{ license() }} | |
| 3 | |
| 4 #include "config.h" | |
| 5 #include "V8{{namespace}}ElementWrapperFactory.h" | |
| 6 | |
| 7 #include "{{namespace}}Names.h" | |
| 8 {% for tag in tags|sort if tag.has_js_interface %} | |
| 9 #include "bindings/core/v8/V8{{tag.interface}}.h" | |
| 10 {% endfor %} | |
| 11 {% for tag in tags|sort if tag.has_js_interface %} | |
| 12 #include "core/{{namespace|lower}}/{{tag.js_interface}}.h" | |
| 13 {% endfor %} | |
| 14 #include "core/{{namespace|lower}}/{{fallback_js_interface}}.h" | |
| 15 #include "core/dom/Document.h" | |
| 16 #include "core/frame/Settings.h" | |
| 17 #include "platform/RuntimeEnabledFeatures.h" | |
| 18 #include "wtf/StdLibExtras.h" | |
| 19 | |
| 20 namespace blink { | |
| 21 | |
| 22 using namespace {{namespace}}Names; | |
| 23 | |
| 24 const WrapperTypeInfo* findWrapperTypeFor{{namespace}}TagName(const AtomicString
& name) | |
| 25 { | |
| 26 typedef HashMap<StringImpl*, const WrapperTypeInfo*> NameTypeMap; | |
| 27 DEFINE_STATIC_LOCAL(NameTypeMap, map, ()); | |
| 28 if (map.isEmpty()) { | |
| 29 // FIXME: This seems wrong. We should list every interface here, not | |
| 30 // just the ones that have specialized JavaScript interfaces. | |
| 31 {% for tag in tags|sort if tag.has_js_interface %} | |
| 32 {% filter enable_conditional(tag.Conditional) %} | |
| 33 map.set({{tag|symbol}}Tag.localName().impl(), &V8{{tag.js_interface}}::w
rapperTypeInfo); | |
| 34 {% endfilter %} | |
| 35 {% endfor %} | |
| 36 } | |
| 37 | |
| 38 if (const WrapperTypeInfo* result = map.get(name.impl())) | |
| 39 return result; | |
| 40 | |
| 41 return &V8{{fallback_js_interface}}::wrapperTypeInfo; | |
| 42 } | |
| 43 | |
| 44 } // namespace blink | |
| OLD | NEW |