| OLD | NEW |
| 1 {% from "macros.tmpl" import license %} | 1 {% from "macros.tmpl" import license %} |
| 2 {{ license() }} | 2 {{ license() }} |
| 3 | 3 |
| 4 #include "{{namespace}}ElementTypeHelpers.h" | 4 #include "{{namespace}}ElementTypeHelpers.h" |
| 5 | 5 |
| 6 #include "core/dom/Document.h" | 6 #include "core/dom/Document.h" |
| 7 #include "platform/RuntimeEnabledFeatures.h" | 7 #include "platform/RuntimeEnabledFeatures.h" |
| 8 #include "wtf/HashMap.h" | 8 #include "platform/wtf/HashMap.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 {% if namespace == "HTML" %} | 11 {% if namespace == "HTML" %} |
| 12 using HTMLTypeMap = HashMap<AtomicString, HTMLElementType>; | 12 using HTMLTypeMap = HashMap<AtomicString, HTMLElementType>; |
| 13 | 13 |
| 14 static HTMLTypeMap* html_type_map = 0; | 14 static HTMLTypeMap* html_type_map = 0; |
| 15 | 15 |
| 16 void createHTMLTypeMap() { | 16 void createHTMLTypeMap() { |
| 17 DCHECK(!html_type_map); | 17 DCHECK(!html_type_map); |
| 18 html_type_map = new HTMLTypeMap; | 18 html_type_map = new HTMLTypeMap; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 33 } | 33 } |
| 34 {% endif %} | 34 {% endif %} |
| 35 {% endfor %} | 35 {% endfor %} |
| 36 return html_type_map->at(tagName); | 36 return html_type_map->at(tagName); |
| 37 } else { | 37 } else { |
| 38 return HTMLElementType::kHTMLUnknownElement; | 38 return HTMLElementType::kHTMLUnknownElement; |
| 39 } | 39 } |
| 40 } | 40 } |
| 41 {% endif %} | 41 {% endif %} |
| 42 } // namespace blink | 42 } // namespace blink |
| OLD | NEW |