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

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

Issue 103933005: Fix bug 15417 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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/htmlrenamer.py ('k') | tools/dom/src/AttributeMap.dart » ('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 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 declaration, 1074 declaration,
1075 GenerateCall, 1075 GenerateCall,
1076 lambda _, argument: IsOptional(argument), 1076 lambda _, argument: IsOptional(argument),
1077 can_omit_type_check=lambda type, pos: type == parameter_types[pos]) 1077 can_omit_type_check=lambda type, pos: type == parameter_types[pos])
1078 1078
1079 def _AddInterfaceOperation(self, info, html_name): 1079 def _AddInterfaceOperation(self, info, html_name):
1080 self._members_emitter.Emit( 1080 self._members_emitter.Emit(
1081 '\n' 1081 '\n'
1082 ' $TYPE $NAME($PARAMS);\n', 1082 ' $TYPE $NAME($PARAMS);\n',
1083 TYPE=self.SecureOutputType(info.type_name, False, True), 1083 TYPE=self.SecureOutputType(info.type_name, False, True),
1084 NAME=info.name, 1084 NAME=html_name,
1085 PARAMS=info.ParametersDeclaration(self._NarrowInputType)) 1085 PARAMS=info.ParametersDeclaration(self._NarrowInputType))
1086 1086
1087 1087
1088 def _OperationRequiresConversions(self, operation): 1088 def _OperationRequiresConversions(self, operation):
1089 return (self._OperationRequiresOutputConversion(operation) or 1089 return (self._OperationRequiresOutputConversion(operation) or
1090 self._OperationRequiresInputConversions(operation)) 1090 self._OperationRequiresInputConversions(operation))
1091 1091
1092 def _OperationRequiresOutputConversion(self, operation): 1092 def _OperationRequiresOutputConversion(self, operation):
1093 return self._OutputConversion(operation.type.id, operation.id) 1093 return self._OutputConversion(operation.type.id, operation.id)
1094 1094
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 for library_name in libraries: 1238 for library_name in libraries:
1239 self._libraries[library_name] = DartLibrary( 1239 self._libraries[library_name] = DartLibrary(
1240 library_name, template_loader, library_type, output_dir) 1240 library_name, template_loader, library_type, output_dir)
1241 1241
1242 def AddFile(self, basename, library_name, path): 1242 def AddFile(self, basename, library_name, path):
1243 self._libraries[library_name].AddFile(path) 1243 self._libraries[library_name].AddFile(path)
1244 1244
1245 def Emit(self, emitter, auxiliary_dir): 1245 def Emit(self, emitter, auxiliary_dir):
1246 for lib in self._libraries.values(): 1246 for lib in self._libraries.values():
1247 lib.Emit(emitter, auxiliary_dir) 1247 lib.Emit(emitter, auxiliary_dir)
OLDNEW
« no previous file with comments | « tools/dom/scripts/htmlrenamer.py ('k') | tools/dom/src/AttributeMap.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698