| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 'TouchEvent.initTouchEvent', | 293 'TouchEvent.initTouchEvent', |
| 294 'UIEvent.charCode', | 294 'UIEvent.charCode', |
| 295 'UIEvent.initUIEvent', | 295 'UIEvent.initUIEvent', |
| 296 'UIEvent.keyCode', | 296 'UIEvent.keyCode', |
| 297 'UIEvent.layerX', | 297 'UIEvent.layerX', |
| 298 'UIEvent.layerY', | 298 'UIEvent.layerY', |
| 299 'UIEvent.pageX', | 299 'UIEvent.pageX', |
| 300 'UIEvent.pageY', | 300 'UIEvent.pageY', |
| 301 'WheelEvent.initWebKitWheelEvent', | 301 'WheelEvent.initWebKitWheelEvent', |
| 302 'DOMWindow.getComputedStyle', | 302 'DOMWindow.getComputedStyle', |
| 303 'DOMWindow.moveTo', |
| 303 ]) | 304 ]) |
| 304 | 305 |
| 305 # Members from the standard dom that exist in the dart:html library with | 306 # Members from the standard dom that exist in the dart:html library with |
| 306 # identical functionality but with cleaner names. | 307 # identical functionality but with cleaner names. |
| 307 renamed_html_members = monitored.Dict('htmlrenamer.renamed_html_members', { | 308 renamed_html_members = monitored.Dict('htmlrenamer.renamed_html_members', { |
| 308 'CanvasRenderingContext2D.drawImage': '_drawImage', | 309 'CanvasRenderingContext2D.drawImage': '_drawImage', |
| 309 'CSSKeyframesRule.insertRule': 'appendRule', | 310 'CSSKeyframesRule.insertRule': 'appendRule', |
| 310 'CSSStyleDeclaration.getPropertyValue': '_getPropertyValue', | 311 'CSSStyleDeclaration.getPropertyValue': '_getPropertyValue', |
| 311 'CSSStyleDeclaration.setProperty': '_setProperty', | 312 'CSSStyleDeclaration.setProperty': '_setProperty', |
| 312 'DirectoryEntry.getDirectory': '_getDirectory', | 313 'DirectoryEntry.getDirectory': '_getDirectory', |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 | 856 |
| 856 # We're looking for a sequence of letters which start with capital letter | 857 # We're looking for a sequence of letters which start with capital letter |
| 857 # then a series of caps and finishes with either the end of the string or | 858 # then a series of caps and finishes with either the end of the string or |
| 858 # a capital letter. | 859 # a capital letter. |
| 859 # The [0-9] check is for names such as 2D or 3D | 860 # The [0-9] check is for names such as 2D or 3D |
| 860 # The following test cases should match as: | 861 # The following test cases should match as: |
| 861 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 862 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
| 862 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 863 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
| 863 # IFrameElement: (I)()(F)rameElement (no change) | 864 # IFrameElement: (I)()(F)rameElement (no change) |
| 864 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 865 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
| OLD | NEW |