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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 'DOMWindow.getComputedStyle', | 187 'DOMWindow.getComputedStyle', |
188 ]) | 188 ]) |
189 | 189 |
190 # Members from the standard dom that exist in the dart:html library with | 190 # Members from the standard dom that exist in the dart:html library with |
191 # identical functionality but with cleaner names. | 191 # identical functionality but with cleaner names. |
192 renamed_html_members = monitored.Dict('htmlrenamer.renamed_html_members', { | 192 renamed_html_members = monitored.Dict('htmlrenamer.renamed_html_members', { |
193 'Document.createCDATASection': 'createCDataSection', | 193 'Document.createCDATASection': 'createCDataSection', |
194 'Document.defaultView': 'window', | 194 'Document.defaultView': 'window', |
195 'DOMURL.createObjectURL': 'createObjectUrl', | 195 'DOMURL.createObjectURL': 'createObjectUrl', |
196 'DOMURL.revokeObjectURL': 'revokeObjectUrl', | 196 'DOMURL.revokeObjectURL': 'revokeObjectUrl', |
| 197 'DOMWindow.clearTimeout': '_clearTimeout', |
| 198 'DOMWindow.clearInterval': '_clearInterval', |
| 199 'DOMWindow.setTimeout': '_setTimeout', |
| 200 'DOMWindow.setInterval': '_setInterval', |
197 'DOMWindow.webkitConvertPointFromNodeToPage': 'convertPointFromNodeToPage', | 201 'DOMWindow.webkitConvertPointFromNodeToPage': 'convertPointFromNodeToPage', |
198 'DOMWindow.webkitConvertPointFromPageToNode': 'convertPointFromPageToNode', | 202 'DOMWindow.webkitConvertPointFromPageToNode': 'convertPointFromPageToNode', |
199 'DOMWindow.webkitNotifications': 'notifications', | 203 'DOMWindow.webkitNotifications': 'notifications', |
200 'DOMWindow.webkitRequestFileSystem': 'requestFileSystem', | 204 'DOMWindow.webkitRequestFileSystem': 'requestFileSystem', |
201 'DOMWindow.webkitResolveLocalFileSystemURL': 'resolveLocalFileSystemUrl', | 205 'DOMWindow.webkitResolveLocalFileSystemURL': 'resolveLocalFileSystemUrl', |
202 'DOMWindow.webkitRequestFileSystem': 'requestFileSystem', | 206 'DOMWindow.webkitRequestFileSystem': 'requestFileSystem', |
203 'DOMWindow.webkitResolveLocalFileSystemURL': 'resolveLocalFileSystemUrl', | 207 'DOMWindow.webkitResolveLocalFileSystemURL': 'resolveLocalFileSystemUrl', |
204 'Element.webkitCreateShadowRoot': 'createShadowRoot', | 208 'Element.webkitCreateShadowRoot': 'createShadowRoot', |
205 'Element.webkitMatchesSelector' : 'matches', | 209 'Element.webkitMatchesSelector' : 'matches', |
206 'Navigator.webkitGetUserMedia': '_getUserMedia', | 210 'Navigator.webkitGetUserMedia': '_getUserMedia', |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 | 596 |
593 # We're looking for a sequence of letters which start with capital letter | 597 # We're looking for a sequence of letters which start with capital letter |
594 # then a series of caps and finishes with either the end of the string or | 598 # then a series of caps and finishes with either the end of the string or |
595 # a capital letter. | 599 # a capital letter. |
596 # The [0-9] check is for names such as 2D or 3D | 600 # The [0-9] check is for names such as 2D or 3D |
597 # The following test cases should match as: | 601 # The following test cases should match as: |
598 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 602 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
599 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 603 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
600 # IFrameElement: (I)()(F)rameElement (no change) | 604 # IFrameElement: (I)()(F)rameElement (no change) |
601 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 605 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
OLD | NEW |