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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 'CustomEvent.initCustomEvent', | 52 'CustomEvent.initCustomEvent', |
| 53 'DeviceOrientationEvent.initDeviceOrientationEvent', |
53 'Document.createElement', | 54 'Document.createElement', |
54 'Document.createElementNS', | 55 'Document.createElementNS', |
55 'Document.createEvent', | 56 'Document.createEvent', |
56 'Document.createRange', | 57 'Document.createRange', |
57 'Document.createTextNode', | 58 'Document.createTextNode', |
58 'Document.createTouch', | 59 'Document.createTouch', |
59 'Document.createTouchList', | 60 'Document.createTouchList', |
60 'Document.getElementById', | 61 'Document.getElementById', |
61 'Document.getElementsByClassName', | 62 'Document.getElementsByClassName', |
62 'Document.getElementsByName', | 63 'Document.getElementsByName', |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 'Element.removeAttributeNS', | 106 'Element.removeAttributeNS', |
106 'Element.setAttribute', | 107 'Element.setAttribute', |
107 'Element.setAttributeNS', | 108 'Element.setAttributeNS', |
108 'ElementTraversal.childElementCount', | 109 'ElementTraversal.childElementCount', |
109 'ElementTraversal.firstElementChild', | 110 'ElementTraversal.firstElementChild', |
110 'ElementTraversal.lastElementChild', | 111 'ElementTraversal.lastElementChild', |
111 'Event.initEvent', | 112 'Event.initEvent', |
112 'EventTarget.addEventListener', | 113 'EventTarget.addEventListener', |
113 'EventTarget.dispatchEvent', | 114 'EventTarget.dispatchEvent', |
114 'EventTarget.removeEventListener', | 115 'EventTarget.removeEventListener', |
| 116 'HashChangeEvent.initHashChangeEvent', |
115 'KeyboardEvent.initKeyboardEvent', | 117 'KeyboardEvent.initKeyboardEvent', |
116 'KeyboardEvent.keyIdentifier', | 118 'KeyboardEvent.keyIdentifier', |
| 119 'MessageEvent.initMessageEvent', |
117 'MouseEvent.initMouseEvent', | 120 'MouseEvent.initMouseEvent', |
| 121 'MutationEvent.initMutationEvent', |
118 'Node.appendChild', | 122 'Node.appendChild', |
119 'Node.attributes', | 123 'Node.attributes', |
120 'Node.childNodes', | 124 'Node.childNodes', |
121 'Node.firstChild', | 125 'Node.firstChild', |
122 'Node.lastChild', | 126 'Node.lastChild', |
123 'Node.localName', | 127 'Node.localName', |
124 'Node.namespaceURI', | 128 'Node.namespaceURI', |
125 'Node.removeChild', | 129 'Node.removeChild', |
126 'Node.replaceChild', | 130 'Node.replaceChild', |
127 'ShadowRoot.getElementById', | 131 'ShadowRoot.getElementById', |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 'HTMLTableRowElement.ch', | 399 'HTMLTableRowElement.ch', |
396 'HTMLTableRowElement.chOff', | 400 'HTMLTableRowElement.chOff', |
397 'HTMLTableRowElement.vAlign', | 401 'HTMLTableRowElement.vAlign', |
398 'HTMLTableSectionElement.align', | 402 'HTMLTableSectionElement.align', |
399 'HTMLTableSectionElement.ch', | 403 'HTMLTableSectionElement.ch', |
400 'HTMLTableSectionElement.chOff', | 404 'HTMLTableSectionElement.chOff', |
401 'HTMLTableSectionElement.vAlign', | 405 'HTMLTableSectionElement.vAlign', |
402 'HTMLTitleElement.text', | 406 'HTMLTitleElement.text', |
403 'HTMLUListElement.compact', | 407 'HTMLUListElement.compact', |
404 'HTMLUListElement.type', | 408 'HTMLUListElement.type', |
| 409 'MessageEvent.webkitInitMessageEvent', |
405 'Node.compareDocumentPosition', | 410 'Node.compareDocumentPosition', |
406 'Node.get:ATTRIBUTE_NODE', | 411 'Node.get:ATTRIBUTE_NODE', |
407 'Node.get:CDATA_SECTION_NODE', | 412 'Node.get:CDATA_SECTION_NODE', |
408 'Node.get:COMMENT_NODE', | 413 'Node.get:COMMENT_NODE', |
409 'Node.get:DOCUMENT_FRAGMENT_NODE', | 414 'Node.get:DOCUMENT_FRAGMENT_NODE', |
410 'Node.get:DOCUMENT_NODE', | 415 'Node.get:DOCUMENT_NODE', |
411 'Node.get:DOCUMENT_POSITION_CONTAINED_BY', | 416 'Node.get:DOCUMENT_POSITION_CONTAINED_BY', |
412 'Node.get:DOCUMENT_POSITION_CONTAINS', | 417 'Node.get:DOCUMENT_POSITION_CONTAINS', |
413 'Node.get:DOCUMENT_POSITION_DISCONNECTED', | 418 'Node.get:DOCUMENT_POSITION_DISCONNECTED', |
414 'Node.get:DOCUMENT_POSITION_FOLLOWING', | 419 'Node.get:DOCUMENT_POSITION_FOLLOWING', |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 | 541 |
537 # We're looking for a sequence of letters which start with capital letter | 542 # 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 | 543 # then a series of caps and finishes with either the end of the string or |
539 # a capital letter. | 544 # a capital letter. |
540 # The [0-9] check is for names such as 2D or 3D | 545 # The [0-9] check is for names such as 2D or 3D |
541 # The following test cases should match as: | 546 # The following test cases should match as: |
542 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 547 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
543 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 548 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
544 # IFrameElement: (I)()(F)rameElement (no change) | 549 # IFrameElement: (I)()(F)rameElement (no change) |
545 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 550 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
OLD | NEW |