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

Side by Side Diff: sdk/lib/html/scripts/generator.py

Issue 11665030: Fixing Element.matches to be cross-platform and follow latest spec. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adding experimental annotation. Created 7 years, 12 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 | « sdk/lib/html/dartium/html_dartium.dart ('k') | sdk/lib/html/scripts/htmlrenamer.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 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This module provides shared functionality for systems to generate 6 """This module provides shared functionality for systems to generate
7 Dart APIs from the IDL database.""" 7 Dart APIs from the IDL database."""
8 8
9 import copy 9 import copy
10 import re 10 import re
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 'SerializedScriptValue': 687 'SerializedScriptValue':
688 "@annotation_Creates_SerializedScriptValue " 688 "@annotation_Creates_SerializedScriptValue "
689 "@annotation_Returns_SerializedScriptValue", 689 "@annotation_Returns_SerializedScriptValue",
690 690
691 'SQLResultSetRowList.item': "@Creates('=Object')", 691 'SQLResultSetRowList.item': "@Creates('=Object')",
692 692
693 'XMLHttpRequest.response': 693 'XMLHttpRequest.response':
694 "@Creates('ArrayBuffer|Blob|Document|=Object|=List|String|num')", 694 "@Creates('ArrayBuffer|Blob|Document|=Object|=List|String|num')",
695 } 695 }
696 696
697 # Placeholder to add experimental flag, implementation for this is
698 # pending in a separate CL.
699 dart_annotations = {
700 'Element.webkitMatchesSelector': ['@Experimental()'],
701 }
702
697 def FindAnnotations(idl_type, interface_name, member_name): 703 def FindAnnotations(idl_type, interface_name, member_name):
698 ann1 = dart2js_annotations.get("%s.%s" % (interface_name, member_name)) 704 ann1 = dart2js_annotations.get("%s.%s" % (interface_name, member_name))
699 if ann1: 705 if ann1:
700 ann2 = dart2js_annotations.get('+' + idl_type) 706 ann2 = dart2js_annotations.get('+' + idl_type)
701 if ann2: 707 if ann2:
702 return ann2 + ' ' + ann1 708 return ann2 + ' ' + ann1
703 ann2 = dart2js_annotations.get(idl_type) 709 ann2 = dart2js_annotations.get(idl_type)
704 if ann2: 710 if ann2:
705 return ann2 + ' ' + ann1 711 return ann2 + ' ' + ann1
706 return ann1 712 return ann1
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 self) 1248 self)
1243 1249
1244 if type_data.clazz == 'SVGTearOff': 1250 if type_data.clazz == 'SVGTearOff':
1245 dart_interface_name = self._renamer.RenameInterface( 1251 dart_interface_name = self._renamer.RenameInterface(
1246 self._database.GetInterface(type_name)) 1252 self._database.GetInterface(type_name))
1247 return SVGTearOffIDLTypeInfo( 1253 return SVGTearOffIDLTypeInfo(
1248 type_name, type_data, dart_interface_name, self) 1254 type_name, type_data, dart_interface_name, self)
1249 1255
1250 class_name = '%sIDLTypeInfo' % type_data.clazz 1256 class_name = '%sIDLTypeInfo' % type_data.clazz
1251 return globals()[class_name](type_name, type_data) 1257 return globals()[class_name](type_name, type_data)
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | sdk/lib/html/scripts/htmlrenamer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698