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

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

Issue 1779023002: Trying to fix SQLResultSetRowList's subscript operator to do type conversion (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Use _OperationRequiresConversion instead of supplemental IDL" Created 4 years, 9 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
« no previous file with comments | « tools/dom/scripts/generator.py ('k') | no next file » | 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 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 821
822 def SecondaryContext(self, interface): 822 def SecondaryContext(self, interface):
823 if interface is not self._current_secondary_parent: 823 if interface is not self._current_secondary_parent:
824 self._current_secondary_parent = interface 824 self._current_secondary_parent = interface
825 self._members_emitter.Emit('\n // From $WHERE\n', WHERE=interface.id) 825 self._members_emitter.Emit('\n // From $WHERE\n', WHERE=interface.id)
826 826
827 def HasIndexedGetter(self): 827 def HasIndexedGetter(self):
828 ext_attrs = self._interface.ext_attrs 828 ext_attrs = self._interface.ext_attrs
829 has_indexed_getter = 'CustomIndexedGetter' in ext_attrs 829 has_indexed_getter = 'CustomIndexedGetter' in ext_attrs
830 for operation in self._interface.operations: 830 for operation in self._interface.operations:
831 if operation.id == 'item' and 'getter' in operation.specials: 831 if operation.id == 'item' and 'getter' in operation.specials \
832 and not self._OperationRequiresConversions(operation):
832 has_indexed_getter = True 833 has_indexed_getter = True
833 break 834 break
834 return has_indexed_getter 835 return has_indexed_getter
835 836
836 def AddIndexer(self, element_type): 837 def AddIndexer(self, element_type):
837 """Adds all the methods required to complete implementation of List.""" 838 """Adds all the methods required to complete implementation of List."""
838 # We would like to simply inherit the implementation of everything except 839 # We would like to simply inherit the implementation of everything except
839 # length, [], and maybe []=. It is possible to extend from a base 840 # length, [], and maybe []=. It is possible to extend from a base
840 # array implementation class only when there is no other implementation 841 # array implementation class only when there is no other implementation
841 # inheritance. There might be no implementation inheritance other than 842 # inheritance. There might be no implementation inheritance other than
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 1336
1336 def AddFile(self, basename, library_name, path): 1337 def AddFile(self, basename, library_name, path):
1337 self._libraries[library_name].AddFile(path) 1338 self._libraries[library_name].AddFile(path)
1338 1339
1339 def AddTypeEntry(self, library_name, idl_name, dart_name): 1340 def AddTypeEntry(self, library_name, idl_name, dart_name):
1340 self._libraries[library_name].AddTypeEntry(idl_name, dart_name) 1341 self._libraries[library_name].AddTypeEntry(idl_name, dart_name)
1341 1342
1342 def Emit(self, emitter, auxiliary_dir): 1343 def Emit(self, emitter, auxiliary_dir):
1343 for lib in self._libraries.values(): 1344 for lib in self._libraries.values():
1344 lib.Emit(emitter, auxiliary_dir) 1345 lib.Emit(emitter, auxiliary_dir)
OLDNEW
« no previous file with comments | « tools/dom/scripts/generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698