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

Side by Side Diff: Source/bindings/scripts/code_generator_v8.pm

Issue 131013002: IDL compiler: EventHandler attributes in Node interfaces (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rename Created 6 years, 11 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/bindings/scripts/unstable/v8_types.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> 2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com>
3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> 4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org>
5 # Copyright (C) 2006 Apple Computer, Inc. 5 # Copyright (C) 2006 Apple Computer, Inc.
6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. 6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc.
7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved.
9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 # Copyright (C) 2012 Ericsson AB. All rights reserved. 10 # Copyright (C) 2012 Ericsson AB. All rights reserved.
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 "Uint8ClampedArray" => ["unsigned char", "v8::kExternalPix elArray"], 195 "Uint8ClampedArray" => ["unsigned char", "v8::kExternalPix elArray"],
196 "Uint16Array" => ["unsigned short", "v8::kExternalUnsigned ShortArray"], 196 "Uint16Array" => ["unsigned short", "v8::kExternalUnsigned ShortArray"],
197 "Uint32Array" => ["unsigned int", "v8::kExternalUnsignedIn tArray"], 197 "Uint32Array" => ["unsigned int", "v8::kExternalUnsignedIn tArray"],
198 "Int8Array" => ["signed char", "v8::kExternalByteArray"], 198 "Int8Array" => ["signed char", "v8::kExternalByteArray"],
199 "Int16Array" => ["short", "v8::kExternalShortArray"], 199 "Int16Array" => ["short", "v8::kExternalShortArray"],
200 "Int32Array" => ["int", "v8::kExternalIntArray"], 200 "Int32Array" => ["int", "v8::kExternalIntArray"],
201 "Float32Array" => ["float", "v8::kExternalFloatArray"], 201 "Float32Array" => ["float", "v8::kExternalFloatArray"],
202 "Float64Array" => ["double", "v8::kExternalDoubleArray"], 202 "Float64Array" => ["double", "v8::kExternalDoubleArray"],
203 ); 203 );
204 204
205 my %domNodeTypes = ("Attr" => 1,
206 "CDATASection" => 1,
207 "CharacterData" => 1,
208 "Comment" => 1,
209 "Document" => 1,
210 "DocumentFragment" => 1,
211 "DocumentType" => 1,
212 "Element" => 1,
213 "Entity" => 1,
214 "HTMLDocument" => 1,
215 "Node" => 1,
216 "Notation" => 1,
217 "ProcessingInstruction" => 1,
218 "ShadowRoot" => 1,
219 "SVGDocument" => 1,
220 "Text" => 1,
221 "TestNode" => 1,
222 "TestInterfaceNode" => 1,
223 );
224
205 my %callbackFunctionTypeHash = (); 225 my %callbackFunctionTypeHash = ();
206 226
207 my %enumTypeHash = (); 227 my %enumTypeHash = ();
208 228
209 my %svgAttributesInHTMLHash = ("class" => 1, "id" => 1, "onabort" => 1, "onclick " => 1, 229 my %svgAttributesInHTMLHash = ("class" => 1, "id" => 1, "onabort" => 1, "onclick " => 1,
210 "onerror" => 1, "onload" => 1, "onmousedown" => 1 , 230 "onerror" => 1, "onload" => 1, "onmousedown" => 1 ,
211 "onmouseenter" => 1, "onmouseleave" => 1, 231 "onmouseenter" => 1, "onmouseleave" => 1,
212 "onmousemove" => 1, "onmouseout" => 1, "onmouseov er" => 1, 232 "onmousemove" => 1, "onmouseout" => 1, "onmouseov er" => 1,
213 "onmouseup" => 1, "onresize" => 1, "onscroll" => 1, 233 "onmouseup" => 1, "onresize" => 1, "onscroll" => 1,
214 "onunload" => 1); 234 "onunload" => 1);
(...skipping 5384 matching lines...) Expand 10 before | Expand all | Expand 10 after
5599 my $interface = shift; 5619 my $interface = shift;
5600 my $interfaceName = $interface->name; 5620 my $interfaceName = $interface->name;
5601 die "TypedArray of unknown type is found" unless $typedArrayHash{$interface- >name}; 5621 die "TypedArray of unknown type is found" unless $typedArrayHash{$interface- >name};
5602 return @{$typedArrayHash{$interface->name}}; 5622 return @{$typedArrayHash{$interface->name}};
5603 } 5623 }
5604 5624
5605 sub IsDOMNodeType 5625 sub IsDOMNodeType
5606 { 5626 {
5607 my $type = shift; 5627 my $type = shift;
5608 5628
5609 return 1 if $type eq 'Attr'; 5629 return 1 if $domNodeTypes{$type};
5610 return 1 if $type eq 'CDATASection';
5611 return 1 if $type eq 'CharacterData';
5612 return 1 if $type eq 'Comment';
5613 return 1 if $type eq 'Document';
5614 return 1 if $type eq 'DocumentFragment';
5615 return 1 if $type eq 'DocumentType';
5616 return 1 if $type eq 'Element';
5617 return 1 if $type eq 'Entity';
5618 return 1 if $type eq 'HTMLDocument';
5619 return 1 if $type eq 'Node';
5620 return 1 if $type eq 'Notation';
5621 return 1 if $type eq 'ProcessingInstruction';
5622 return 1 if $type eq 'ShadowRoot';
5623 return 1 if $type eq 'SVGDocument';
5624 return 1 if $type eq 'Text';
5625
5626 return 1 if $type =~ /^HTML.*Element$/; 5630 return 1 if $type =~ /^HTML.*Element$/;
5627 return 1 if $type =~ /^SVG.*Element$/; 5631 return 1 if $type =~ /^SVG.*Element$/;
5628 5632
5629 return 1 if $type eq 'TestNode';
5630
5631 return 0; 5633 return 0;
5632 } 5634 }
5633 5635
5634 5636
5635 sub NativeToJSValue 5637 sub NativeToJSValue
5636 { 5638 {
5637 my $type = shift; 5639 my $type = shift;
5638 my $extendedAttributes = shift; 5640 my $extendedAttributes = shift;
5639 my $nativeValue = shift; 5641 my $nativeValue = shift;
5640 my $indent = shift; # added before every line 5642 my $indent = shift; # added before every line
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
6386 if ($parameter->type eq "SerializedScriptValue") { 6388 if ($parameter->type eq "SerializedScriptValue") {
6387 return 1; 6389 return 1;
6388 } elsif (IsIntegerType($parameter->type)) { 6390 } elsif (IsIntegerType($parameter->type)) {
6389 return 1; 6391 return 1;
6390 } 6392 }
6391 } 6393 }
6392 return 0; 6394 return 0;
6393 } 6395 }
6394 6396
6395 1; 6397 1;
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/scripts/unstable/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698