| 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 'DOMCoreException': 'DOMException', | 8 'DOMCoreException': 'DOMException', |
| 9 'DOMFormData': 'FormData', | 9 'DOMFormData': 'FormData', |
| 10 'DOMURL': 'Url', | 10 'DOMURL': 'Url', |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 'Element.querySelector', | 85 'Element.querySelector', |
| 86 'Element.querySelectorAll', | 86 'Element.querySelectorAll', |
| 87 'Element.removeAttribute', | 87 'Element.removeAttribute', |
| 88 'Element.removeAttributeNS', | 88 'Element.removeAttributeNS', |
| 89 'Element.setAttribute', | 89 'Element.setAttribute', |
| 90 'Element.setAttributeNS', | 90 'Element.setAttributeNS', |
| 91 'Event.initEvent', | 91 'Event.initEvent', |
| 92 'EventTarget.addEventListener', | 92 'EventTarget.addEventListener', |
| 93 'EventTarget.dispatchEvent', | 93 'EventTarget.dispatchEvent', |
| 94 'EventTarget.removeEventListener', | 94 'EventTarget.removeEventListener', |
| 95 'KeyboardEvent.keyIdentifier', |
| 95 'LocalWindow.getComputedStyle', | 96 'LocalWindow.getComputedStyle', |
| 96 'MouseEvent.initMouseEvent', | 97 'MouseEvent.initMouseEvent', |
| 97 'Node.appendChild', | 98 'Node.appendChild', |
| 98 'Node.attributes', | 99 'Node.attributes', |
| 99 'Node.childNodes', | 100 'Node.childNodes', |
| 100 'Node.firstChild', | 101 'Node.firstChild', |
| 101 'Node.lastChild', | 102 'Node.lastChild', |
| 102 "Node.localName", | 103 "Node.localName", |
| 103 'Node.namespaceURI', | 104 'Node.namespaceURI', |
| 104 'Node.removeChild', | 105 'Node.removeChild', |
| 105 'Node.replaceChild', | 106 'Node.replaceChild', |
| 107 'UIEvent.keyCode', |
| 108 'UIEvent.charCode', |
| 106 'ShadowRoot.getElementById', | 109 'ShadowRoot.getElementById', |
| 107 'ShadowRoot.getElementsByClassName', | 110 'ShadowRoot.getElementsByClassName', |
| 108 'ShadowRoot.getElementsByTagName', | 111 'ShadowRoot.getElementsByTagName', |
| 109 'Storage.clear', | 112 'Storage.clear', |
| 110 'Storage.getItem', | 113 'Storage.getItem', |
| 111 'Storage.key', | 114 'Storage.key', |
| 112 'Storage.length', | 115 'Storage.length', |
| 113 'Storage.removeItem', | 116 'Storage.removeItem', |
| 114 'Storage.setItem', | 117 'Storage.setItem', |
| 115 'WheelEvent.wheelDeltaX', | 118 'WheelEvent.wheelDeltaX', |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 "HTMLFrameElement.*", | 253 "HTMLFrameElement.*", |
| 251 "HTMLFrameSetElement.*", | 254 "HTMLFrameSetElement.*", |
| 252 "HtmlElement.version", | 255 "HtmlElement.version", |
| 253 "HtmlElement.manifest", | 256 "HtmlElement.manifest", |
| 254 "Document.version", | 257 "Document.version", |
| 255 "Document.manifest", | 258 "Document.manifest", |
| 256 "HTMLIsIndexElement.*", | 259 "HTMLIsIndexElement.*", |
| 257 "MenuElement.compact", | 260 "MenuElement.compact", |
| 258 "HTMLOptionsCollection.*", | 261 "HTMLOptionsCollection.*", |
| 259 "HTMLPropertiesCollection.*", | 262 "HTMLPropertiesCollection.*", |
| 263 "KeyboardEvent.initKeyboardEvent", |
| 260 "SelectElement.remove", | 264 "SelectElement.remove", |
| 261 "NamedNodeMap.*", | 265 "NamedNodeMap.*", |
| 262 "Node.isEqualNode", | 266 "Node.isEqualNode", |
| 263 "Node.get:TEXT_NODE", | 267 "Node.get:TEXT_NODE", |
| 264 "Node.hasAttributes", | 268 "Node.hasAttributes", |
| 265 "Node.get:DOCUMENT_TYPE_NODE", | 269 "Node.get:DOCUMENT_TYPE_NODE", |
| 266 "Node.get:DOCUMENT_POSITION_FOLLOWING", | 270 "Node.get:DOCUMENT_POSITION_FOLLOWING", |
| 267 "Node.lookupNamespaceURI", | 271 "Node.lookupNamespaceURI", |
| 268 "Node.get:ELEMENT_NODE", | 272 "Node.get:ELEMENT_NODE", |
| 269 "Node.get:DOCUMENT_FRAGMENT_NODE", | 273 "Node.get:DOCUMENT_FRAGMENT_NODE", |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 | 391 |
| 388 # We're looking for a sequence of letters which start with capital letter | 392 # We're looking for a sequence of letters which start with capital letter |
| 389 # then a series of caps and finishes with either the end of the string or | 393 # then a series of caps and finishes with either the end of the string or |
| 390 # a capital letter. | 394 # a capital letter. |
| 391 # The [0-9] check is for names such as 2D or 3D | 395 # The [0-9] check is for names such as 2D or 3D |
| 392 # The following test cases should match as: | 396 # The following test cases should match as: |
| 393 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 397 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
| 394 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 398 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
| 395 # IFrameElement: (I)()(F)rameElement (no change) | 399 # IFrameElement: (I)()(F)rameElement (no change) |
| 396 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 400 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
| OLD | NEW |