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 import re | 5 import re |
6 | 6 |
7 html_interface_renames = { | 7 html_interface_renames = { |
8 'CDATASection': 'CDataSection', | 8 'CDATASection': 'CDataSection', |
9 'DOMApplicationCache': 'ApplicationCache', | 9 'DOMApplicationCache': 'ApplicationCache', |
10 'DOMCoreException': 'DomException', | 10 'DOMCoreException': 'DomException', |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 'Storage.setItem', | 132 'Storage.setItem', |
133 'WheelEvent.wheelDeltaX', | 133 'WheelEvent.wheelDeltaX', |
134 'WheelEvent.wheelDeltaY', | 134 'WheelEvent.wheelDeltaY', |
135 ]) | 135 ]) |
136 | 136 |
137 # Members from the standard dom that exist in the dart:html library with | 137 # Members from the standard dom that exist in the dart:html library with |
138 # identical functionality but with cleaner names. | 138 # identical functionality but with cleaner names. |
139 _renamed_html_members = { | 139 _renamed_html_members = { |
140 'Document.createCDATASection': 'createCDataSection', | 140 'Document.createCDATASection': 'createCDataSection', |
141 'Document.defaultView': 'window', | 141 'Document.defaultView': 'window', |
142 'Element.webkitMatchesSelector' : 'matchesSelector', | 142 'Element.webkitMatchesSelector' : 'matches', # Latest spec uses matches. |
143 'Element.scrollIntoViewIfNeeded': 'scrollIntoView', | 143 'Element.scrollIntoViewIfNeeded': 'scrollIntoView', |
144 'Node.cloneNode': 'clone', | 144 'Node.cloneNode': 'clone', |
145 'Node.nextSibling': 'nextNode', | 145 'Node.nextSibling': 'nextNode', |
146 'Node.ownerDocument': 'document', | 146 'Node.ownerDocument': 'document', |
147 'Node.parentElement': 'parent', | 147 'Node.parentElement': 'parent', |
148 'Node.previousSibling': 'previousNode', | 148 'Node.previousSibling': 'previousNode', |
149 'Node.textContent': 'text', | 149 'Node.textContent': 'text', |
150 'SvgElement.className': '$dom_svgClassName', | 150 'SvgElement.className': '$dom_svgClassName', |
151 'AnimatedString.className': '$dom_svgClassName', | 151 'AnimatedString.className': '$dom_svgClassName', |
152 'Stylable.className': '$dom_svgClassName', | 152 'Stylable.className': '$dom_svgClassName', |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 | 413 |
414 # We're looking for a sequence of letters which start with capital letter | 414 # We're looking for a sequence of letters which start with capital letter |
415 # then a series of caps and finishes with either the end of the string or | 415 # then a series of caps and finishes with either the end of the string or |
416 # a capital letter. | 416 # a capital letter. |
417 # The [0-9] check is for names such as 2D or 3D | 417 # The [0-9] check is for names such as 2D or 3D |
418 # The following test cases should match as: | 418 # The following test cases should match as: |
419 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 419 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
420 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 420 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
421 # IFrameElement: (I)()(F)rameElement (no change) | 421 # IFrameElement: (I)()(F)rameElement (no change) |
422 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 422 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
OLD | NEW |