| 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 'DOMCoreException': 'DOMException', | 7 'DOMCoreException': 'DOMException', |
| 8 'DOMFormData': 'FormData', | 8 'DOMFormData': 'FormData', |
| 9 'DOMWindow': 'LocalWindow', | 9 'DOMWindow': 'LocalWindow', |
| 10 'History': 'LocalHistory', | 10 'History': 'LocalHistory', |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 'Element.scrollIntoViewIfNeeded': 'scrollIntoView', | 92 'Element.scrollIntoViewIfNeeded': 'scrollIntoView', |
| 93 'Node.cloneNode': 'clone', | 93 'Node.cloneNode': 'clone', |
| 94 'Node.nextSibling': 'nextNode', | 94 'Node.nextSibling': 'nextNode', |
| 95 'Node.ownerDocument': 'document', | 95 'Node.ownerDocument': 'document', |
| 96 'Node.parentNode': 'parent', | 96 'Node.parentNode': 'parent', |
| 97 'Node.previousSibling': 'previousNode', | 97 'Node.previousSibling': 'previousNode', |
| 98 'Node.textContent': 'text', | 98 'Node.textContent': 'text', |
| 99 'SVGElement.className': '$dom_svgClassName', | 99 'SVGElement.className': '$dom_svgClassName', |
| 100 'SVGAnimatedString.className': '$dom_svgClassName', | 100 'SVGAnimatedString.className': '$dom_svgClassName', |
| 101 'SVGStylable.className': '$dom_svgClassName', | 101 'SVGStylable.className': '$dom_svgClassName', |
| 102 'LocalWindow.webkitCancelAnimationFrame': 'cancelAnimationFrame', | |
| 103 'LocalWindow.webkitCancelRequestAnimationFrame': 'cancelRequestAnimationFram
e', | |
| 104 'LocalWindow.webkitRequestAnimationFrame': 'requestAnimationFrame', | |
| 105 } | 102 } |
| 106 | 103 |
| 107 # Members and classes from the dom that should be removed completely from | 104 # Members and classes from the dom that should be removed completely from |
| 108 # dart:html. These could be expressed in the IDL instead but expressing this | 105 # dart:html. These could be expressed in the IDL instead but expressing this |
| 109 # as a simple table instead is more concise. | 106 # as a simple table instead is more concise. |
| 110 # Syntax is: ClassName.(get\.|set\.)?MemberName | 107 # Syntax is: ClassName.(get\.|set\.)?MemberName |
| 111 # Using get: and set: is optional and should only be used when a getter needs | 108 # Using get: and set: is optional and should only be used when a getter needs |
| 112 # to be suppressed but not the setter, etc. | 109 # to be suppressed but not the setter, etc. |
| 113 # TODO(jacobr): cleanup and augment this list. | 110 # TODO(jacobr): cleanup and augment this list. |
| 114 _removed_html_members = set([ | 111 _removed_html_members = set([ |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 301 |
| 305 def _FindMatch(self, interface, member, member_prefix, candidates): | 302 def _FindMatch(self, interface, member, member_prefix, candidates): |
| 306 for interface in self._database.Hierarchy(interface): | 303 for interface in self._database.Hierarchy(interface): |
| 307 html_interface_name = self.RenameInterface(interface) | 304 html_interface_name = self.RenameInterface(interface) |
| 308 member_name = html_interface_name + '.' + member | 305 member_name = html_interface_name + '.' + member |
| 309 if member_name in candidates: | 306 if member_name in candidates: |
| 310 return member_name | 307 return member_name |
| 311 member_name = html_interface_name + '.' + member_prefix + member | 308 member_name = html_interface_name + '.' + member_prefix + member |
| 312 if member_name in candidates: | 309 if member_name in candidates: |
| 313 return member_name | 310 return member_name |
| OLD | NEW |