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

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

Issue 554853002: "Reverting 39948" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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/go.sh ('k') | tools/dom/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 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 from generator import AnalyzeOperation, ConstantOutputOrder, \ 10 from generator import AnalyzeOperation, ConstantOutputOrder, \
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 cloned_operation = deepcopy(operation) 199 cloned_operation = deepcopy(operation)
200 cloned_operation.ext_attrs['DartName'] = operation_id 200 cloned_operation.ext_attrs['DartName'] = operation_id
201 interface.operations.append(cloned_operation) 201 interface.operations.append(cloned_operation)
202 202
203 def _EnsureNoMultipleTypeSignatures(self, interface, operation, 203 def _EnsureNoMultipleTypeSignatures(self, interface, operation,
204 operations_by_name): 204 operations_by_name):
205 """Make sure that there is now at most one operation with a particular 205 """Make sure that there is now at most one operation with a particular
206 operation.id. If not, stop library generation, and throw an error, requiring 206 operation.id. If not, stop library generation, and throw an error, requiring
207 programmer input about the best name change before proceeding.""" 207 programmer input about the best name change before proceeding."""
208 operation_str = '%s.%s' % (interface.id, operation.id) 208 operation_str = '%s.%s' % (interface.id, operation.id)
209
210 if (operation.id in operations_by_name and 209 if (operation.id in operations_by_name and
211 len(operations_by_name[operation.id]) > 1 and 210 len(operations_by_name[operation.id]) > 1 and
212 len(filter(lambda overload: overload.startswith(operation_str), 211 len(filter(lambda overload: overload.startswith(operation_str),
213 renamed_overloads.keys())) == 0 and 212 renamed_overloads.keys())) == 0 and
214 operation_str not in keep_overloaded_members and 213 operation_str not in keep_overloaded_members and
215 operation_str not in overloaded_and_renamed and 214 operation_str not in overloaded_and_renamed and
216 operation_str not in renamed_html_members and 215 operation_str not in renamed_html_members and
217 operation_str not in private_html_members and 216 operation_str not in private_html_members and
218 operation_str not in removed_html_members and 217 operation_str not in removed_html_members and
219 operation.id != '__getter__' and 218 operation.id != '__getter__' and
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 return self._type_registry.TypeInfo(type_name).narrow_dart_type() 737 return self._type_registry.TypeInfo(type_name).narrow_dart_type()
739 738
740 def _NarrowInputType(self, type_name): 739 def _NarrowInputType(self, type_name):
741 return self._NarrowToImplementationType(type_name) 740 return self._NarrowToImplementationType(type_name)
742 741
743 def _DartType(self, type_name): 742 def _DartType(self, type_name):
744 return self._type_registry.DartType(type_name) 743 return self._type_registry.DartType(type_name)
745 744
746 def _TypeInfo(self, type_name): 745 def _TypeInfo(self, type_name):
747 return self._type_registry.TypeInfo(type_name) 746 return self._type_registry.TypeInfo(type_name)
OLDNEW
« no previous file with comments | « tools/dom/scripts/go.sh ('k') | tools/dom/scripts/htmlrenamer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698