| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 'Element.scrollIntoViewIfNeeded': 'scrollIntoView', | 98 'Element.scrollIntoViewIfNeeded': 'scrollIntoView', |
| 99 'Node.cloneNode': 'clone', | 99 'Node.cloneNode': 'clone', |
| 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 'Window.webkitCancelAnimationFrame': 'cancelAnimationFrame', | |
| 109 'Window.webkitCancelRequestAnimationFrame': 'cancelRequestAnimationFrame', | |
| 110 'Window.webkitRequestAnimationFrame': 'requestAnimationFrame', | |
| 111 } | 108 } |
| 112 | 109 |
| 113 # Members and classes from the dom that should be removed completely from | 110 # Members and classes from the dom that should be removed completely from |
| 114 # 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 |
| 115 # as a simple table instead is more concise. | 112 # as a simple table instead is more concise. |
| 116 # Syntax is: ClassName.(get\.|set\.)?MemberName | 113 # Syntax is: ClassName.(get\.|set\.)?MemberName |
| 117 # 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 |
| 118 # to be suppressed but not the setter, etc. | 115 # to be suppressed but not the setter, etc. |
| 119 # TODO(jacobr): cleanup and augment this list. | 116 # TODO(jacobr): cleanup and augment this list. |
| 120 _removed_html_members = set([ | 117 _removed_html_members = set([ |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 | 302 |
| 306 def _FindMatch(self, interface, member, member_prefix, candidates): | 303 def _FindMatch(self, interface, member, member_prefix, candidates): |
| 307 for interface in self._database.Hierarchy(interface): | 304 for interface in self._database.Hierarchy(interface): |
| 308 html_interface_name = self.RenameInterface(interface) | 305 html_interface_name = self.RenameInterface(interface) |
| 309 member_name = html_interface_name + '.' + member | 306 member_name = html_interface_name + '.' + member |
| 310 if member_name in candidates: | 307 if member_name in candidates: |
| 311 return member_name | 308 return member_name |
| 312 member_name = html_interface_name + '.' + member_prefix + member | 309 member_name = html_interface_name + '.' + member_prefix + member |
| 313 if member_name in candidates: | 310 if member_name in candidates: |
| 314 return member_name | 311 return member_name |
| OLD | NEW |