| 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 logging | 5 import logging |
| 6 import monitored | 6 import monitored |
| 7 import re | 7 import re |
| 8 | 8 |
| 9 typed_array_renames = { | 9 typed_array_renames = { |
| 10 'ArrayBuffer': 'ByteBuffer', | 10 'ArrayBuffer': 'ByteBuffer', |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 'WorkerGlobalScope.webkitRequestFileSystem', | 152 'WorkerGlobalScope.webkitRequestFileSystem', |
| 153 ]) | 153 ]) |
| 154 | 154 |
| 155 # "Private" members in the form $dom_foo. | 155 # "Private" members in the form $dom_foo. |
| 156 # TODO(efortuna): Remove this set. This allows us to make the change of removing | 156 # TODO(efortuna): Remove this set. This allows us to make the change of removing |
| 157 # $dom in installments instead of all at once, but the intent is to move all of | 157 # $dom in installments instead of all at once, but the intent is to move all of |
| 158 # these either into private_html_members or remove them from this list entirely. | 158 # these either into private_html_members or remove them from this list entirely. |
| 159 dom_private_html_members = monitored.Set('htmlrenamer.private_html_members', [ | 159 dom_private_html_members = monitored.Set('htmlrenamer.private_html_members', [ |
| 160 'Document.createElement', | 160 'Document.createElement', |
| 161 'Document.createElementNS', | 161 'Document.createElementNS', |
| 162 'Document.createRange', | |
| 163 'Element.getAttribute', | |
| 164 'Element.getAttributeNS', | |
| 165 'Element.setAttribute', | |
| 166 'Element.setAttributeNS', | |
| 167 'EventTarget.addEventListener', | 162 'EventTarget.addEventListener', |
| 168 'EventTarget.removeEventListener', | 163 'EventTarget.removeEventListener', |
| 169 'Node.childNodes', | |
| 170 ]) | 164 ]) |
| 171 | 165 |
| 172 # Members from the standard dom that should not be exposed publicly in dart:html | 166 # Members from the standard dom that should not be exposed publicly in dart:html |
| 173 # but need to be exposed internally to implement dart:html on top of a standard | 167 # but need to be exposed internally to implement dart:html on top of a standard |
| 174 # browser. They are exposed simply by placing an underscore in front of the | 168 # browser. They are exposed simply by placing an underscore in front of the |
| 175 # name. | 169 # name. |
| 176 private_html_members = monitored.Set('htmlrenamer.private_html_members', [ | 170 private_html_members = monitored.Set('htmlrenamer.private_html_members', [ |
| 177 'AudioNode.connect', | 171 'AudioNode.connect', |
| 178 'CanvasRenderingContext2D.arc', | 172 'CanvasRenderingContext2D.arc', |
| 179 'CanvasRenderingContext2D.drawImage', | 173 'CanvasRenderingContext2D.drawImage', |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 'Document.webkitFullscreenElement', | 205 'Document.webkitFullscreenElement', |
| 212 'Document.webkitFullscreenEnabled', | 206 'Document.webkitFullscreenEnabled', |
| 213 'Document.webkitHidden', | 207 'Document.webkitHidden', |
| 214 'Document.webkitIsFullScreen', | 208 'Document.webkitIsFullScreen', |
| 215 'Document.webkitPointerLockElement', | 209 'Document.webkitPointerLockElement', |
| 216 'Document.webkitVisibilityState', | 210 'Document.webkitVisibilityState', |
| 217 | 211 |
| 218 'Element.children', | 212 'Element.children', |
| 219 'Element.childElementCount', | 213 'Element.childElementCount', |
| 220 'Element.firstElementChild', | 214 'Element.firstElementChild', |
| 215 'Element.getAttribute', |
| 216 'Element.getAttributeNS', |
| 221 'Element.getElementsByTagName', | 217 'Element.getElementsByTagName', |
| 222 'Element.scrollIntoView', | 218 'Element.scrollIntoView', |
| 223 'Element.scrollIntoViewIfNeeded', | 219 'Element.scrollIntoViewIfNeeded', |
| 220 'Element.setAttribute', |
| 221 'Element.setAttributeNS', |
| 224 'Element.removeAttribute', | 222 'Element.removeAttribute', |
| 225 'Element.removeAttributeNS', | 223 'Element.removeAttributeNS', |
| 226 'Element.hasAttribute', | 224 'Element.hasAttribute', |
| 227 'Element.hasAttributeNS', | 225 'Element.hasAttributeNS', |
| 228 'Element.innerHTML', | 226 'Element.innerHTML', |
| 229 'Element.querySelectorAll', | 227 'Element.querySelectorAll', |
| 230 'Event.initEvent', | 228 'Event.initEvent', |
| 231 'Geolocation.clearWatch', | 229 'Geolocation.clearWatch', |
| 232 'Geolocation.getCurrentPosition', | 230 'Geolocation.getCurrentPosition', |
| 233 'Geolocation.watchPosition', | 231 'Geolocation.watchPosition', |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 'MouseEvent.clientY', | 270 'MouseEvent.clientY', |
| 273 'MouseEvent.webkitMovementX', | 271 'MouseEvent.webkitMovementX', |
| 274 'MouseEvent.webkitMovementY', | 272 'MouseEvent.webkitMovementY', |
| 275 'MouseEvent.offsetX', | 273 'MouseEvent.offsetX', |
| 276 'MouseEvent.offsetY', | 274 'MouseEvent.offsetY', |
| 277 'MouseEvent.screenX', | 275 'MouseEvent.screenX', |
| 278 'MouseEvent.screenY', | 276 'MouseEvent.screenY', |
| 279 'MutationEvent.initMutationEvent', | 277 'MutationEvent.initMutationEvent', |
| 280 'MutationObserver.observe', | 278 'MutationObserver.observe', |
| 281 'Node.attributes', | 279 'Node.attributes', |
| 280 'Node.childNodes', |
| 282 'Node.localName', | 281 'Node.localName', |
| 283 'Node.namespaceURI', | 282 'Node.namespaceURI', |
| 284 'Node.removeChild', | 283 'Node.removeChild', |
| 285 'Node.replaceChild', | 284 'Node.replaceChild', |
| 286 'ParentNode.childElementCount', | 285 'ParentNode.childElementCount', |
| 287 'ParentNode.children', | 286 'ParentNode.children', |
| 288 'ParentNode.firstElementChild', | 287 'ParentNode.firstElementChild', |
| 289 'ParentNode.lastElementChild', | 288 'ParentNode.lastElementChild', |
| 290 'RTCPeerConnection.createAnswer', | 289 'RTCPeerConnection.createAnswer', |
| 291 'RTCPeerConnection.createOffer', | 290 'RTCPeerConnection.createOffer', |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 | 896 |
| 898 # We're looking for a sequence of letters which start with capital letter | 897 # We're looking for a sequence of letters which start with capital letter |
| 899 # then a series of caps and finishes with either the end of the string or | 898 # then a series of caps and finishes with either the end of the string or |
| 900 # a capital letter. | 899 # a capital letter. |
| 901 # The [0-9] check is for names such as 2D or 3D | 900 # The [0-9] check is for names such as 2D or 3D |
| 902 # The following test cases should match as: | 901 # The following test cases should match as: |
| 903 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 902 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
| 904 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 903 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
| 905 # IFrameElement: (I)()(F)rameElement (no change) | 904 # IFrameElement: (I)()(F)rameElement (no change) |
| 906 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 905 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
| OLD | NEW |