| 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 html_interface_renames = monitored.Dict('htmlrenamer.html_interface_renames', { | 9 html_interface_renames = monitored.Dict('htmlrenamer.html_interface_renames', { |
| 10 'CDATASection': 'CDataSection', | 10 'CDATASection': 'CDataSection', |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 'XMLHttpRequest': 'HttpRequest', | 42 'XMLHttpRequest': 'HttpRequest', |
| 43 'XMLHttpRequestException': 'HttpRequestException', | 43 'XMLHttpRequestException': 'HttpRequestException', |
| 44 'XMLHttpRequestProgressEvent': 'HttpRequestProgressEvent', | 44 'XMLHttpRequestProgressEvent': 'HttpRequestProgressEvent', |
| 45 'XMLHttpRequestUpload': 'HttpRequestUpload', | 45 'XMLHttpRequestUpload': 'HttpRequestUpload', |
| 46 }) | 46 }) |
| 47 | 47 |
| 48 # Members from the standard dom that should not be exposed publicly in dart:html | 48 # Members from the standard dom that should not be exposed publicly in dart:html |
| 49 # but need to be exposed internally to implement dart:html on top of a standard | 49 # but need to be exposed internally to implement dart:html on top of a standard |
| 50 # browser. | 50 # browser. |
| 51 _private_html_members = monitored.Set('htmlrenamer._private_html_members', [ | 51 _private_html_members = monitored.Set('htmlrenamer._private_html_members', [ |
| 52 'CompositionEvent.initCompositionEvent', |
| 52 'CustomEvent.initCustomEvent', | 53 'CustomEvent.initCustomEvent', |
| 54 'DeviceOrientationEvent.initDeviceOrientationEvent', |
| 53 'Document.createElement', | 55 'Document.createElement', |
| 54 'Document.createElementNS', | 56 'Document.createElementNS', |
| 55 'Document.createEvent', | 57 'Document.createEvent', |
| 56 'Document.createRange', | 58 'Document.createRange', |
| 57 'Document.createTextNode', | 59 'Document.createTextNode', |
| 58 'Document.createTouch', | 60 'Document.createTouch', |
| 59 'Document.createTouchList', | 61 'Document.createTouchList', |
| 60 'Document.getElementById', | 62 'Document.getElementById', |
| 61 'Document.getElementsByClassName', | 63 'Document.getElementsByClassName', |
| 62 'Document.getElementsByName', | 64 'Document.getElementsByName', |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 'Element.removeAttributeNS', | 107 'Element.removeAttributeNS', |
| 106 'Element.setAttribute', | 108 'Element.setAttribute', |
| 107 'Element.setAttributeNS', | 109 'Element.setAttributeNS', |
| 108 'ElementTraversal.childElementCount', | 110 'ElementTraversal.childElementCount', |
| 109 'ElementTraversal.firstElementChild', | 111 'ElementTraversal.firstElementChild', |
| 110 'ElementTraversal.lastElementChild', | 112 'ElementTraversal.lastElementChild', |
| 111 'Event.initEvent', | 113 'Event.initEvent', |
| 112 'EventTarget.addEventListener', | 114 'EventTarget.addEventListener', |
| 113 'EventTarget.dispatchEvent', | 115 'EventTarget.dispatchEvent', |
| 114 'EventTarget.removeEventListener', | 116 'EventTarget.removeEventListener', |
| 117 'HashChangeEvent.initHashChangeEvent', |
| 115 'KeyboardEvent.initKeyboardEvent', | 118 'KeyboardEvent.initKeyboardEvent', |
| 116 'KeyboardEvent.keyIdentifier', | 119 'KeyboardEvent.keyIdentifier', |
| 120 'MessageEvent.initMessageEvent', |
| 117 'MouseEvent.initMouseEvent', | 121 'MouseEvent.initMouseEvent', |
| 122 'MutationEvent.initMutationEvent', |
| 118 'Node.appendChild', | 123 'Node.appendChild', |
| 119 'Node.attributes', | 124 'Node.attributes', |
| 120 'Node.childNodes', | 125 'Node.childNodes', |
| 121 'Node.firstChild', | 126 'Node.firstChild', |
| 122 'Node.lastChild', | 127 'Node.lastChild', |
| 123 'Node.localName', | 128 'Node.localName', |
| 124 'Node.namespaceURI', | 129 'Node.namespaceURI', |
| 125 'Node.removeChild', | 130 'Node.removeChild', |
| 126 'Node.replaceChild', | 131 'Node.replaceChild', |
| 127 'ShadowRoot.getElementById', | 132 'ShadowRoot.getElementById', |
| 128 'ShadowRoot.getElementsByClassName', | 133 'ShadowRoot.getElementsByClassName', |
| 129 'ShadowRoot.getElementsByTagName', | 134 'ShadowRoot.getElementsByTagName', |
| 130 'Storage.clear', | 135 'Storage.clear', |
| 131 'Storage.getItem', | 136 'Storage.getItem', |
| 132 'Storage.key', | 137 'Storage.key', |
| 133 'Storage.length', | 138 'Storage.length', |
| 134 'Storage.removeItem', | 139 'Storage.removeItem', |
| 135 'Storage.setItem', | 140 'Storage.setItem', |
| 141 'StorageEvent.initStorageEvent', |
| 142 'TextEvent.initTextEvent', |
| 143 'TouchEvent.initTouchEvent', |
| 136 'UIEvent.charCode', | 144 'UIEvent.charCode', |
| 137 'UIEvent.initUIEvent', | 145 'UIEvent.initUIEvent', |
| 138 'UIEvent.keyCode', | 146 'UIEvent.keyCode', |
| 139 'WheelEvent.wheelDeltaX', | 147 'WheelEvent.wheelDeltaX', |
| 140 'WheelEvent.wheelDeltaY', | 148 'WheelEvent.wheelDeltaY', |
| 141 'WheelEvent.initWebKitWheelEvent', | 149 'WheelEvent.initWebKitWheelEvent', |
| 142 'DOMWindow.getComputedStyle', | 150 'DOMWindow.getComputedStyle', |
| 143 ]) | 151 ]) |
| 144 | 152 |
| 145 # Members from the standard dom that exist in the dart:html library with | 153 # Members from the standard dom that exist in the dart:html library with |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 'HTMLTableRowElement.ch', | 403 'HTMLTableRowElement.ch', |
| 396 'HTMLTableRowElement.chOff', | 404 'HTMLTableRowElement.chOff', |
| 397 'HTMLTableRowElement.vAlign', | 405 'HTMLTableRowElement.vAlign', |
| 398 'HTMLTableSectionElement.align', | 406 'HTMLTableSectionElement.align', |
| 399 'HTMLTableSectionElement.ch', | 407 'HTMLTableSectionElement.ch', |
| 400 'HTMLTableSectionElement.chOff', | 408 'HTMLTableSectionElement.chOff', |
| 401 'HTMLTableSectionElement.vAlign', | 409 'HTMLTableSectionElement.vAlign', |
| 402 'HTMLTitleElement.text', | 410 'HTMLTitleElement.text', |
| 403 'HTMLUListElement.compact', | 411 'HTMLUListElement.compact', |
| 404 'HTMLUListElement.type', | 412 'HTMLUListElement.type', |
| 413 'MessageEvent.webkitInitMessageEvent', |
| 405 'Node.compareDocumentPosition', | 414 'Node.compareDocumentPosition', |
| 406 'Node.get:ATTRIBUTE_NODE', | 415 'Node.get:ATTRIBUTE_NODE', |
| 407 'Node.get:CDATA_SECTION_NODE', | 416 'Node.get:CDATA_SECTION_NODE', |
| 408 'Node.get:COMMENT_NODE', | 417 'Node.get:COMMENT_NODE', |
| 409 'Node.get:DOCUMENT_FRAGMENT_NODE', | 418 'Node.get:DOCUMENT_FRAGMENT_NODE', |
| 410 'Node.get:DOCUMENT_NODE', | 419 'Node.get:DOCUMENT_NODE', |
| 411 'Node.get:DOCUMENT_POSITION_CONTAINED_BY', | 420 'Node.get:DOCUMENT_POSITION_CONTAINED_BY', |
| 412 'Node.get:DOCUMENT_POSITION_CONTAINS', | 421 'Node.get:DOCUMENT_POSITION_CONTAINS', |
| 413 'Node.get:DOCUMENT_POSITION_DISCONNECTED', | 422 'Node.get:DOCUMENT_POSITION_DISCONNECTED', |
| 414 'Node.get:DOCUMENT_POSITION_FOLLOWING', | 423 'Node.get:DOCUMENT_POSITION_FOLLOWING', |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 | 545 |
| 537 # We're looking for a sequence of letters which start with capital letter | 546 # We're looking for a sequence of letters which start with capital letter |
| 538 # then a series of caps and finishes with either the end of the string or | 547 # then a series of caps and finishes with either the end of the string or |
| 539 # a capital letter. | 548 # a capital letter. |
| 540 # The [0-9] check is for names such as 2D or 3D | 549 # The [0-9] check is for names such as 2D or 3D |
| 541 # The following test cases should match as: | 550 # The following test cases should match as: |
| 542 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 551 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
| 543 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 552 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
| 544 # IFrameElement: (I)()(F)rameElement (no change) | 553 # IFrameElement: (I)()(F)rameElement (no change) |
| 545 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 554 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
| OLD | NEW |