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

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

Issue 16365020: Fixing CSS Animations cross-platform issues. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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
« no previous file with comments | « tools/dom/scripts/generator.py ('k') | tools/dom/scripts/systemhtml.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 'UIEvent.pageX', 298 'UIEvent.pageX',
299 'UIEvent.pageY', 299 'UIEvent.pageY',
300 'WheelEvent.initWebKitWheelEvent', 300 'WheelEvent.initWebKitWheelEvent',
301 'DOMWindow.getComputedStyle', 301 'DOMWindow.getComputedStyle',
302 ]) 302 ])
303 303
304 # Members from the standard dom that exist in the dart:html library with 304 # Members from the standard dom that exist in the dart:html library with
305 # identical functionality but with cleaner names. 305 # identical functionality but with cleaner names.
306 renamed_html_members = monitored.Dict('htmlrenamer.renamed_html_members', { 306 renamed_html_members = monitored.Dict('htmlrenamer.renamed_html_members', {
307 'CanvasRenderingContext2D.drawImage': '_drawImage', 307 'CanvasRenderingContext2D.drawImage': '_drawImage',
308 'CSSKeyframesRule.insertRule': 'appendRule',
308 'CSSStyleDeclaration.getPropertyValue': '_getPropertyValue', 309 'CSSStyleDeclaration.getPropertyValue': '_getPropertyValue',
309 'CSSStyleDeclaration.setProperty': '_setProperty', 310 'CSSStyleDeclaration.setProperty': '_setProperty',
310 'DirectoryEntry.getDirectory': '_getDirectory', 311 'DirectoryEntry.getDirectory': '_getDirectory',
311 'DirectoryEntry.getFile': '_getFile', 312 'DirectoryEntry.getFile': '_getFile',
312 'Document.createCDATASection': 'createCDataSection', 313 'Document.createCDATASection': 'createCDataSection',
313 'Document.defaultView': 'window', 314 'Document.defaultView': 'window',
314 'Document.querySelector': 'query', 315 'Document.querySelector': 'query',
315 'DOMWindow.CSS': 'css', 316 'DOMWindow.CSS': 'css',
316 'DOMWindow.clearTimeout': '_clearTimeout', 317 'DOMWindow.clearTimeout': '_clearTimeout',
317 'DOMWindow.clearInterval': '_clearInterval', 318 'DOMWindow.clearInterval': '_clearInterval',
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 774
774 # We're looking for a sequence of letters which start with capital letter 775 # We're looking for a sequence of letters which start with capital letter
775 # then a series of caps and finishes with either the end of the string or 776 # then a series of caps and finishes with either the end of the string or
776 # a capital letter. 777 # a capital letter.
777 # The [0-9] check is for names such as 2D or 3D 778 # The [0-9] check is for names such as 2D or 3D
778 # The following test cases should match as: 779 # The following test cases should match as:
779 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue 780 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue
780 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) 781 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change)
781 # IFrameElement: (I)()(F)rameElement (no change) 782 # IFrameElement: (I)()(F)rameElement (no change)
782 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) 783 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name)
OLDNEW
« no previous file with comments | « tools/dom/scripts/generator.py ('k') | tools/dom/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698