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 typed_array_renames = { | 9 typed_array_renames = { |
10 'ArrayBuffer': 'ByteBuffer', | 10 'ArrayBuffer': 'ByteBuffer', |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 'CSSStyleDeclaration.var', | 183 'CSSStyleDeclaration.var', |
184 'DeviceOrientationEvent.initDeviceOrientationEvent', | 184 'DeviceOrientationEvent.initDeviceOrientationEvent', |
185 'Document.createElement', | 185 'Document.createElement', |
186 'Document.createEvent', | 186 'Document.createEvent', |
187 'Document.createNodeIterator', | 187 'Document.createNodeIterator', |
188 'Document.createTextNode', | 188 'Document.createTextNode', |
189 'Document.createTouch', | 189 'Document.createTouch', |
190 'Document.createTouchList', | 190 'Document.createTouchList', |
191 'Document.createTreeWalker', | 191 'Document.createTreeWalker', |
192 'Document.querySelectorAll', | 192 'Document.querySelectorAll', |
193 'DocumentFragment.querySelector', | |
194 'DocumentFragment.querySelectorAll', | 193 'DocumentFragment.querySelectorAll', |
195 | 194 |
196 # Moved to HTMLDocument. | 195 # Moved to HTMLDocument. |
197 'Document.body', | 196 'Document.body', |
198 'Document.caretRangeFromPoint', | 197 'Document.caretRangeFromPoint', |
199 'Document.elementFromPoint', | 198 'Document.elementFromPoint', |
200 'Document.getCSSCanvasContext', | 199 'Document.getCSSCanvasContext', |
201 'Document.head', | 200 'Document.head', |
202 'Document.lastModified', | 201 'Document.lastModified', |
203 'Document.preferredStylesheetSet', | 202 'Document.preferredStylesheetSet', |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 ]) | 330 ]) |
332 | 331 |
333 # Members from the standard dom that exist in the dart:html library with | 332 # Members from the standard dom that exist in the dart:html library with |
334 # identical functionality but with cleaner names. | 333 # identical functionality but with cleaner names. |
335 renamed_html_members = monitored.Dict('htmlrenamer.renamed_html_members', { | 334 renamed_html_members = monitored.Dict('htmlrenamer.renamed_html_members', { |
336 'CSSKeyframesRule.insertRule': 'appendRule', | 335 'CSSKeyframesRule.insertRule': 'appendRule', |
337 'DirectoryEntry.getDirectory': '_getDirectory', | 336 'DirectoryEntry.getDirectory': '_getDirectory', |
338 'DirectoryEntry.getFile': '_getFile', | 337 'DirectoryEntry.getFile': '_getFile', |
339 'Document.createCDATASection': 'createCDataSection', | 338 'Document.createCDATASection': 'createCDataSection', |
340 'Document.defaultView': 'window', | 339 'Document.defaultView': 'window', |
341 'Document.querySelector': 'query', | |
342 'Window.CSS': 'css', | 340 'Window.CSS': 'css', |
343 'Window.webkitConvertPointFromNodeToPage': '_convertPointFromNodeToPage', | 341 'Window.webkitConvertPointFromNodeToPage': '_convertPointFromNodeToPage', |
344 'Window.webkitConvertPointFromPageToNode': '_convertPointFromPageToNode', | 342 'Window.webkitConvertPointFromPageToNode': '_convertPointFromPageToNode', |
345 'Window.webkitNotifications': 'notifications', | 343 'Window.webkitNotifications': 'notifications', |
346 'Window.webkitRequestFileSystem': '_requestFileSystem', | 344 'Window.webkitRequestFileSystem': '_requestFileSystem', |
347 'Window.webkitResolveLocalFileSystemURL': 'resolveLocalFileSystemUrl', | 345 'Window.webkitResolveLocalFileSystemURL': 'resolveLocalFileSystemUrl', |
348 'Element.querySelector': 'query', | |
349 'Element.webkitMatchesSelector' : 'matches', | 346 'Element.webkitMatchesSelector' : 'matches', |
350 'Navigator.webkitGetUserMedia': '_getUserMedia', | 347 'Navigator.webkitGetUserMedia': '_getUserMedia', |
351 'Node.appendChild': 'append', | 348 'Node.appendChild': 'append', |
352 'Node.cloneNode': 'clone', | 349 'Node.cloneNode': 'clone', |
353 'Node.nextSibling': 'nextNode', | 350 'Node.nextSibling': 'nextNode', |
354 'Node.ownerDocument': 'document', | 351 'Node.ownerDocument': 'document', |
355 'Node.parentElement': 'parent', | 352 'Node.parentElement': 'parent', |
356 'Node.previousSibling': 'previousNode', | 353 'Node.previousSibling': 'previousNode', |
357 'Node.textContent': 'text', | 354 'Node.textContent': 'text', |
358 'SVGElement.className': '_svgClassName', | 355 'SVGElement.className': '_svgClassName', |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
939 | 936 |
940 # We're looking for a sequence of letters which start with capital letter | 937 # We're looking for a sequence of letters which start with capital letter |
941 # then a series of caps and finishes with either the end of the string or | 938 # then a series of caps and finishes with either the end of the string or |
942 # a capital letter. | 939 # a capital letter. |
943 # The [0-9] check is for names such as 2D or 3D | 940 # The [0-9] check is for names such as 2D or 3D |
944 # The following test cases should match as: | 941 # The following test cases should match as: |
945 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 942 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
946 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 943 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
947 # IFrameElement: (I)()(F)rameElement (no change) | 944 # IFrameElement: (I)()(F)rameElement (no change) |
948 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 945 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
OLD | NEW |