OLD | NEW |
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 _html_interface_renames = { | 6 _html_interface_renames = { |
7 'DOMFormData': 'FormData', | 7 'DOMFormData': 'FormData', |
8 'DOMWindow': 'Window', | 8 'DOMWindow': 'Window', |
9 'WebKitAnimation': 'Animation', | 9 'WebKitAnimation': 'Animation', |
10 'WebKitAnimationEvent': 'AnimationEvent', | 10 'WebKitAnimationEvent': 'AnimationEvent', |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 'Node.nextSibling': 'nextNode', | 100 'Node.nextSibling': 'nextNode', |
101 'Node.ownerDocument': 'document', | 101 'Node.ownerDocument': 'document', |
102 'Node.parentNode': 'parent', | 102 'Node.parentNode': 'parent', |
103 'Node.previousSibling': 'previousNode', | 103 'Node.previousSibling': 'previousNode', |
104 'Node.textContent': 'text', | 104 'Node.textContent': 'text', |
105 'SVGElement.className': '$dom_svgClassName', | 105 'SVGElement.className': '$dom_svgClassName', |
106 'SVGAnimatedString.className': '$dom_svgClassName', | 106 'SVGAnimatedString.className': '$dom_svgClassName', |
107 'SVGStylable.className': '$dom_svgClassName', | 107 'SVGStylable.className': '$dom_svgClassName', |
108 } | 108 } |
109 | 109 |
110 # Members and classes from the dom that should be removed completelly from | 110 # Members and classes from the dom that should be removed completely from |
111 # dart:html. These could be expressed in the IDL instead but expressing this | 111 # dart:html. These could be expressed in the IDL instead but expressing this |
112 # as a simple table instead is more concise. | 112 # as a simple table instead is more concise. |
113 # Syntax is: ClassName.(get\.|set\.)?MemberName | 113 # Syntax is: ClassName.(get\.|set\.)?MemberName |
114 # Using get: and set: is optional and should only be used when a getter needs | 114 # Using get: and set: is optional and should only be used when a getter needs |
115 # to be suppressed but not the setter, etc. | 115 # to be suppressed but not the setter, etc. |
116 # TODO(jacobr): cleanup and augment this list. | 116 # TODO(jacobr): cleanup and augment this list. |
117 _removed_html_members = set([ | 117 _removed_html_members = set([ |
118 'NodeList.item', | 118 'NodeList.item', |
119 "Attr.*", | 119 "Attr.*", |
120 # "BarProp.*", | 120 # "BarProp.*", |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 | 303 |
304 def _FindMatch(self, interface, member, member_prefix, candidates): | 304 def _FindMatch(self, interface, member, member_prefix, candidates): |
305 for interface in self._database.Hierarchy(interface): | 305 for interface in self._database.Hierarchy(interface): |
306 html_interface_name = self.RenameInterface(interface) | 306 html_interface_name = self.RenameInterface(interface) |
307 member_name = html_interface_name + '.' + member | 307 member_name = html_interface_name + '.' + member |
308 if member_name in candidates: | 308 if member_name in candidates: |
309 return member_name | 309 return member_name |
310 member_name = html_interface_name + '.' + member_prefix + member | 310 member_name = html_interface_name + '.' + member_prefix + member |
311 if member_name in candidates: | 311 if member_name in candidates: |
312 return member_name | 312 return member_name |
OLD | NEW |