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

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

Issue 283043003: Suppress cloning EventTarget methods in subtypes when using blink (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Regen Created 6 years, 7 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/database.py ('k') | tools/dom/scripts/htmleventgenerator.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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 self.AddOperation(info, declare_only) 107 self.AddOperation(info, declare_only)
108 if ('%s.%s' % (interface.id, info.declared_name) in 108 if ('%s.%s' % (interface.id, info.declared_name) in
109 convert_to_future_members): 109 convert_to_future_members):
110 self.AddOperation(ConvertToFuture(info), declare_only) 110 self.AddOperation(ConvertToFuture(info), declare_only)
111 111
112 def AddSecondaryMembers(self, interface): 112 def AddSecondaryMembers(self, interface):
113 # With multiple inheritance, attributes and operations of non-first 113 # With multiple inheritance, attributes and operations of non-first
114 # interfaces need to be added. Sometimes the attribute or operation is 114 # interfaces need to be added. Sometimes the attribute or operation is
115 # defined in the current interface as well as a parent. In that case we 115 # defined in the current interface as well as a parent. In that case we
116 # avoid making a duplicate definition and pray that the signatures match. 116 # avoid making a duplicate definition and pray that the signatures match.
117 secondary_parents = self._database.TransitiveSecondaryParents(interface) 117 secondary_parents = self._database.TransitiveSecondaryParents(interface,
118 not self._dart_use_blink)
118 for parent_interface in sorted(secondary_parents): 119 for parent_interface in sorted(secondary_parents):
119 if isinstance(parent_interface, str): 120 if isinstance(parent_interface, str):
120 continue 121 continue
121 for attr in sorted(parent_interface.attributes, ConstantOutputOrder): 122 for attr in sorted(parent_interface.attributes, ConstantOutputOrder):
122 if not FindMatchingAttribute(interface, attr): 123 if not FindMatchingAttribute(interface, attr):
123 if attr.type.id != 'EventHandler': 124 if attr.type.id != 'EventHandler':
124 self.SecondaryContext(parent_interface) 125 self.SecondaryContext(parent_interface)
125 self.AddAttribute(attr) 126 self.AddAttribute(attr)
126 127
127 # Group overloaded operations by name. 128 # Group overloaded operations by name.
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 753
753 def SecureBaseName(self, type_name): 754 def SecureBaseName(self, type_name):
754 if type_name in _secure_base_types: 755 if type_name in _secure_base_types:
755 return _secure_base_types[type_name] 756 return _secure_base_types[type_name]
756 757
757 def _DartType(self, type_name): 758 def _DartType(self, type_name):
758 return self._type_registry.DartType(type_name) 759 return self._type_registry.DartType(type_name)
759 760
760 def _TypeInfo(self, type_name): 761 def _TypeInfo(self, type_name):
761 return self._type_registry.TypeInfo(type_name) 762 return self._type_registry.TypeInfo(type_name)
OLDNEW
« no previous file with comments | « tools/dom/scripts/database.py ('k') | tools/dom/scripts/htmleventgenerator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698