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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 'Element.setAttributeNS', | 97 'Element.setAttributeNS', |
98 'ElementTraversal.childElementCount', | 98 'ElementTraversal.childElementCount', |
99 'ElementTraversal.firstElementChild', | 99 'ElementTraversal.firstElementChild', |
100 'ElementTraversal.lastElementChild', | 100 'ElementTraversal.lastElementChild', |
101 'Event.initEvent', | 101 'Event.initEvent', |
102 'UIEvent.initUIEvent', | 102 'UIEvent.initUIEvent', |
103 'EventTarget.addEventListener', | 103 'EventTarget.addEventListener', |
104 'EventTarget.dispatchEvent', | 104 'EventTarget.dispatchEvent', |
105 'EventTarget.removeEventListener', | 105 'EventTarget.removeEventListener', |
106 'KeyboardEvent.keyIdentifier', | 106 'KeyboardEvent.keyIdentifier', |
107 'KeyboardEvent.initKeyboardEvent', | |
108 'LocalWindow.getComputedStyle', | 107 'LocalWindow.getComputedStyle', |
109 'MouseEvent.initMouseEvent', | 108 'MouseEvent.initMouseEvent', |
110 'Node.appendChild', | 109 'Node.appendChild', |
111 'Node.attributes', | 110 'Node.attributes', |
112 'Node.childNodes', | 111 'Node.childNodes', |
113 'Node.firstChild', | 112 'Node.firstChild', |
114 'Node.lastChild', | 113 'Node.lastChild', |
115 "Node.localName", | 114 "Node.localName", |
116 'Node.namespaceURI', | 115 'Node.namespaceURI', |
117 'Node.removeChild', | 116 'Node.removeChild', |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 "HTMLFrameElement.*", | 264 "HTMLFrameElement.*", |
266 "HTMLFrameSetElement.*", | 265 "HTMLFrameSetElement.*", |
267 "HtmlElement.version", | 266 "HtmlElement.version", |
268 "HtmlElement.manifest", | 267 "HtmlElement.manifest", |
269 "Document.version", | 268 "Document.version", |
270 "Document.manifest", | 269 "Document.manifest", |
271 "HTMLIsIndexElement.*", | 270 "HTMLIsIndexElement.*", |
272 "MenuElement.compact", | 271 "MenuElement.compact", |
273 "HTMLOptionsCollection.*", | 272 "HTMLOptionsCollection.*", |
274 "HTMLPropertiesCollection.*", | 273 "HTMLPropertiesCollection.*", |
| 274 "KeyboardEvent.initKeyboardEvent", |
275 "SelectElement.remove", | 275 "SelectElement.remove", |
276 "NamedNodeMap.*", | 276 "NamedNodeMap.*", |
277 "Node.isEqualNode", | 277 "Node.isEqualNode", |
278 "Node.get:TEXT_NODE", | 278 "Node.get:TEXT_NODE", |
279 "Node.hasAttributes", | 279 "Node.hasAttributes", |
280 "Node.get:DOCUMENT_TYPE_NODE", | 280 "Node.get:DOCUMENT_TYPE_NODE", |
281 "Node.get:DOCUMENT_POSITION_FOLLOWING", | 281 "Node.get:DOCUMENT_POSITION_FOLLOWING", |
282 "Node.lookupNamespaceURI", | 282 "Node.lookupNamespaceURI", |
283 "Node.get:ELEMENT_NODE", | 283 "Node.get:ELEMENT_NODE", |
284 "Node.get:DOCUMENT_FRAGMENT_NODE", | 284 "Node.get:DOCUMENT_FRAGMENT_NODE", |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 | 401 |
402 # We're looking for a sequence of letters which start with capital letter | 402 # We're looking for a sequence of letters which start with capital letter |
403 # then a series of caps and finishes with either the end of the string or | 403 # then a series of caps and finishes with either the end of the string or |
404 # a capital letter. | 404 # a capital letter. |
405 # The [0-9] check is for names such as 2D or 3D | 405 # The [0-9] check is for names such as 2D or 3D |
406 # The following test cases should match as: | 406 # The following test cases should match as: |
407 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 407 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
408 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 408 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
409 # IFrameElement: (I)()(F)rameElement (no change) | 409 # IFrameElement: (I)()(F)rameElement (no change) |
410 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 410 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
OLD | NEW |