Chromium Code Reviews| Index: Source/bindings/scripts/code_generator_v8.pm |
| diff --git a/Source/bindings/scripts/code_generator_v8.pm b/Source/bindings/scripts/code_generator_v8.pm |
| index 1e976f8246b656e81c06282074317af31902030b..8c14ffd3c26a2ef4d7654d4292e91e038d0cac6f 100644 |
| --- a/Source/bindings/scripts/code_generator_v8.pm |
| +++ b/Source/bindings/scripts/code_generator_v8.pm |
| @@ -202,6 +202,26 @@ my %typedArrayHash = ("ArrayBuffer" => [], |
| "Float64Array" => ["double", "v8::kExternalDoubleArray"], |
| ); |
| +my %domNodeTypes = ("Attr" => 1, |
|
haraken
2014/01/09 07:45:00
This list is really fragile. Once we expose parsin
Nils Barth (inactive)
2014/01/09 07:49:11
I think interfaces_info should be enough (in Pytho
haraken
2014/01/09 07:50:37
That sounds great.
|
| + "CDATASection" => 1, |
| + "CharacterData" => 1, |
| + "Comment" => 1, |
| + "Document" => 1, |
| + "DocumentFragment" => 1, |
| + "DocumentType" => 1, |
| + "Element" => 1, |
| + "Entity" => 1, |
| + "HTMLDocument" => 1, |
| + "Node" => 1, |
| + "Notation" => 1, |
| + "ProcessingInstruction" => 1, |
| + "ShadowRoot" => 1, |
| + "SVGDocument" => 1, |
| + "Text" => 1, |
| + "TestNode" => 1, |
| + "TestInterfaceInheritsNode" => 1, |
| + ); |
| + |
| my %callbackFunctionTypeHash = (); |
| my %enumTypeHash = (); |
| @@ -5606,28 +5626,10 @@ sub IsDOMNodeType |
| { |
| my $type = shift; |
| - return 1 if $type eq 'Attr'; |
| - return 1 if $type eq 'CDATASection'; |
| - return 1 if $type eq 'CharacterData'; |
| - return 1 if $type eq 'Comment'; |
| - return 1 if $type eq 'Document'; |
| - return 1 if $type eq 'DocumentFragment'; |
| - return 1 if $type eq 'DocumentType'; |
| - return 1 if $type eq 'Element'; |
| - return 1 if $type eq 'Entity'; |
| - return 1 if $type eq 'HTMLDocument'; |
| - return 1 if $type eq 'Node'; |
| - return 1 if $type eq 'Notation'; |
| - return 1 if $type eq 'ProcessingInstruction'; |
| - return 1 if $type eq 'ShadowRoot'; |
| - return 1 if $type eq 'SVGDocument'; |
| - return 1 if $type eq 'Text'; |
| - |
| + return 1 if $domNodeTypes{$type}; |
| return 1 if $type =~ /^HTML.*Element$/; |
| return 1 if $type =~ /^SVG.*Element$/; |
| - return 1 if $type eq 'TestNode'; |
| - |
| return 0; |
| } |