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

Side by Side Diff: tools/dom/scripts/systemhtml.py

Issue 18277003: "Reverting 24655" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | « tools/dom/scripts/monitored.py ('k') | tools/dom/templates/html/dart2js/impl_URL.darttemplate » ('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 the system to generate 6 """This module provides shared functionality for the system to generate
7 Dart:html APIs from the IDL database.""" 7 Dart:html APIs from the IDL database."""
8 8
9 import emitter 9 import emitter
10 import logging 10 import logging
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 'Element.insertAdjacentElement', 51 'Element.insertAdjacentElement',
52 'Element.insertAdjacentHTML', 52 'Element.insertAdjacentHTML',
53 'Element.insertAdjacentText', 53 'Element.insertAdjacentText',
54 'Element.webkitMatchesSelector', 54 'Element.webkitMatchesSelector',
55 'Element.remove', 55 'Element.remove',
56 'ElementEvents.mouseWheel', 56 'ElementEvents.mouseWheel',
57 'ElementEvents.transitionEnd', 57 'ElementEvents.transitionEnd',
58 'DOMException.name', 58 'DOMException.name',
59 'HTMLTableElement.createTBody', 59 'HTMLTableElement.createTBody',
60 'IDBDatabase.transaction', 60 'IDBDatabase.transaction',
61 'IDBDatabase.transactionList',
62 'IDBDatabase.transactionStore',
63 'IDBDatabase.transactionStores',
64 'KeyboardEvent.initKeyboardEvent', 61 'KeyboardEvent.initKeyboardEvent',
65 'Location.origin', 62 'Location.origin',
66 'MouseEvent.offsetX', 63 'MouseEvent.offsetX',
67 'MouseEvent.offsetY', 64 'MouseEvent.offsetY',
68 'Navigator.language', 65 'Navigator.language',
69 'Navigator.webkitGetUserMedia', 66 'Navigator.webkitGetUserMedia',
70 'ScriptProcessorNode._setEventListener', 67 'ScriptProcessorNode._setEventListener',
71 'URL.createObjectURL', 68 'URL.createObjectURL',
72 'URL.createObjectUrlFromSource',
73 'URL.createObjectUrlFromStream',
74 'URL.createObjectUrlFromBlob',
75 'URL.revokeObjectURL', 69 'URL.revokeObjectURL',
76 'WheelEvent.deltaMode', 70 'WheelEvent.deltaMode',
77 'WheelEvent.wheelDeltaX', 71 'WheelEvent.wheelDeltaX',
78 'WheelEvent.wheelDeltaY', 72 'WheelEvent.wheelDeltaY',
79 'Window.cancelAnimationFrame', 73 'Window.cancelAnimationFrame',
80 'Window.console', 74 'Window.console',
81 'Window.document', 75 'Window.document',
82 'Window.indexedDB', 76 'Window.indexedDB',
83 'Window.location', 77 'Window.location',
84 'Window.open', 78 'Window.open',
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 953
960 parameter_names = [param_info.name for param_info in info.param_infos] 954 parameter_names = [param_info.name for param_info in info.param_infos]
961 parameter_types = [InputType(param_info.type_id) 955 parameter_types = [InputType(param_info.type_id)
962 for param_info in info.param_infos] 956 for param_info in info.param_infos]
963 operations = info.operations 957 operations = info.operations
964 958
965 temp_version = [0] 959 temp_version = [0]
966 960
967 def GenerateCall( 961 def GenerateCall(
968 stmts_emitter, call_emitter, version, operation, argument_count): 962 stmts_emitter, call_emitter, version, operation, argument_count):
969 target = '_%s_%d' % ( 963 target = '_%s_%d' % (html_name, version);
970 html_name[1:] if html_name.startswith('_') else html_name, version);
971 arguments = [] 964 arguments = []
972 target_parameters = [] 965 target_parameters = []
973 for position, arg in enumerate(operation.arguments[:argument_count]): 966 for position, arg in enumerate(operation.arguments[:argument_count]):
974 conversion = self._InputConversion(arg.type.id, operation.id) 967 conversion = self._InputConversion(arg.type.id, operation.id)
975 param_name = operation.arguments[position].id 968 param_name = operation.arguments[position].id
976 if conversion: 969 if conversion:
977 temp_version[0] += 1 970 temp_version[0] += 1
978 temp_name = '%s_%s' % (param_name, temp_version[0]) 971 temp_name = '%s_%s' % (param_name, temp_version[0])
979 temp_type = conversion.output_type 972 temp_type = conversion.output_type
980 stmts_emitter.Emit( 973 stmts_emitter.Emit(
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1200 for library_name in libraries: 1193 for library_name in libraries:
1201 self._libraries[library_name] = DartLibrary( 1194 self._libraries[library_name] = DartLibrary(
1202 library_name, template_loader, library_type, output_dir) 1195 library_name, template_loader, library_type, output_dir)
1203 1196
1204 def AddFile(self, basename, library_name, path): 1197 def AddFile(self, basename, library_name, path):
1205 self._libraries[library_name].AddFile(path) 1198 self._libraries[library_name].AddFile(path)
1206 1199
1207 def Emit(self, emitter, auxiliary_dir): 1200 def Emit(self, emitter, auxiliary_dir):
1208 for lib in self._libraries.values(): 1201 for lib in self._libraries.values():
1209 lib.Emit(emitter, auxiliary_dir) 1202 lib.Emit(emitter, auxiliary_dir)
OLDNEW
« no previous file with comments | « tools/dom/scripts/monitored.py ('k') | tools/dom/templates/html/dart2js/impl_URL.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698