| 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 'DOMURL': 'Url', |
| 9 'DOMWindow': 'LocalWindow', | 10 'DOMWindow': 'LocalWindow', |
| 10 'History': 'LocalHistory', | 11 'History': 'LocalHistory', |
| 11 'Location': 'LocalLocation', | 12 'Location': 'LocalLocation', |
| 12 'WebKitAnimation': 'Animation', | 13 'WebKitAnimation': 'Animation', |
| 13 'WebKitAnimationEvent': 'AnimationEvent', | 14 'WebKitAnimationEvent': 'AnimationEvent', |
| 14 'WebKitBlobBuilder': 'BlobBuilder', | 15 'WebKitBlobBuilder': 'BlobBuilder', |
| 15 'WebKitCSSKeyframeRule': 'CSSKeyframeRule', | 16 'WebKitCSSKeyframeRule': 'CSSKeyframeRule', |
| 16 'WebKitCSSKeyframesRule': 'CSSKeyframesRule', | 17 'WebKitCSSKeyframesRule': 'CSSKeyframesRule', |
| 17 'WebKitCSSMatrix': 'CSSMatrix', | 18 'WebKitCSSMatrix': 'CSSMatrix', |
| 18 'WebKitCSSTransformValue': 'CSSTransformValue', | 19 'WebKitCSSTransformValue': 'CSSTransformValue', |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 'Element.scrollIntoViewIfNeeded': 'scrollIntoView', | 93 'Element.scrollIntoViewIfNeeded': 'scrollIntoView', |
| 93 'Node.cloneNode': 'clone', | 94 'Node.cloneNode': 'clone', |
| 94 'Node.nextSibling': 'nextNode', | 95 'Node.nextSibling': 'nextNode', |
| 95 'Node.ownerDocument': 'document', | 96 'Node.ownerDocument': 'document', |
| 96 'Node.parentNode': 'parent', | 97 'Node.parentNode': 'parent', |
| 97 'Node.previousSibling': 'previousNode', | 98 'Node.previousSibling': 'previousNode', |
| 98 'Node.textContent': 'text', | 99 'Node.textContent': 'text', |
| 99 'SVGElement.className': '$dom_svgClassName', | 100 'SVGElement.className': '$dom_svgClassName', |
| 100 'SVGAnimatedString.className': '$dom_svgClassName', | 101 'SVGAnimatedString.className': '$dom_svgClassName', |
| 101 'SVGStylable.className': '$dom_svgClassName', | 102 'SVGStylable.className': '$dom_svgClassName', |
| 103 'Url.createObjectURL': 'createObjectUrl', |
| 104 'Url.revokeObjectURL': 'revokeObjectUrl', |
| 102 } | 105 } |
| 103 | 106 |
| 104 # Members and classes from the dom that should be removed completely from | 107 # Members and classes from the dom that should be removed completely from |
| 105 # dart:html. These could be expressed in the IDL instead but expressing this | 108 # dart:html. These could be expressed in the IDL instead but expressing this |
| 106 # as a simple table instead is more concise. | 109 # as a simple table instead is more concise. |
| 107 # Syntax is: ClassName.(get\.|set\.)?MemberName | 110 # Syntax is: ClassName.(get\.|set\.)?MemberName |
| 108 # Using get: and set: is optional and should only be used when a getter needs | 111 # Using get: and set: is optional and should only be used when a getter needs |
| 109 # to be suppressed but not the setter, etc. | 112 # to be suppressed but not the setter, etc. |
| 110 # TODO(jacobr): cleanup and augment this list. | 113 # TODO(jacobr): cleanup and augment this list. |
| 111 _removed_html_members = set([ | 114 _removed_html_members = set([ |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 | 302 |
| 300 def _FindMatch(self, interface, member, member_prefix, candidates): | 303 def _FindMatch(self, interface, member, member_prefix, candidates): |
| 301 for interface in self._database.Hierarchy(interface): | 304 for interface in self._database.Hierarchy(interface): |
| 302 html_interface_name = self.RenameInterface(interface) | 305 html_interface_name = self.RenameInterface(interface) |
| 303 member_name = html_interface_name + '.' + member | 306 member_name = html_interface_name + '.' + member |
| 304 if member_name in candidates: | 307 if member_name in candidates: |
| 305 return member_name | 308 return member_name |
| 306 member_name = html_interface_name + '.' + member_prefix + member | 309 member_name = html_interface_name + '.' + member_prefix + member |
| 307 if member_name in candidates: | 310 if member_name in candidates: |
| 308 return member_name | 311 return member_name |
| OLD | NEW |