Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Side by Side Diff: tools/dom/scripts/htmlrenamer.py

Issue 18920008: Add point to Window class and Window polyfills of screen. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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',
304 'DOMWindow.screenTop',
305 'DOMWindow.screenLeft',
306 'DOMWindow.screenX',
307 'DOMWindow.screenY',
303 ]) 308 ])
304 309
305 # Members from the standard dom that exist in the dart:html library with 310 # Members from the standard dom that exist in the dart:html library with
306 # identical functionality but with cleaner names. 311 # identical functionality but with cleaner names.
307 renamed_html_members = monitored.Dict('htmlrenamer.renamed_html_members', { 312 renamed_html_members = monitored.Dict('htmlrenamer.renamed_html_members', {
308 'CanvasRenderingContext2D.drawImage': '_drawImage', 313 'CanvasRenderingContext2D.drawImage': '_drawImage',
309 'CSSKeyframesRule.insertRule': 'appendRule', 314 'CSSKeyframesRule.insertRule': 'appendRule',
310 'CSSStyleDeclaration.getPropertyValue': '_getPropertyValue', 315 'CSSStyleDeclaration.getPropertyValue': '_getPropertyValue',
311 'CSSStyleDeclaration.setProperty': '_setProperty', 316 'CSSStyleDeclaration.setProperty': '_setProperty',
312 'DirectoryEntry.getDirectory': '_getDirectory', 317 'DirectoryEntry.getDirectory': '_getDirectory',
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 860
856 # We're looking for a sequence of letters which start with capital letter 861 # 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 862 # then a series of caps and finishes with either the end of the string or
858 # a capital letter. 863 # a capital letter.
859 # The [0-9] check is for names such as 2D or 3D 864 # The [0-9] check is for names such as 2D or 3D
860 # The following test cases should match as: 865 # The following test cases should match as:
861 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue 866 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue
862 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) 867 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change)
863 # IFrameElement: (I)()(F)rameElement (no change) 868 # IFrameElement: (I)()(F)rameElement (no change)
864 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) 869 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698