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

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

Issue 15012015: Dart.idl cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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/idl/dart/dart.idl ('k') | no next file » | 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 'UIEvent.pageY', 302 'UIEvent.pageY',
303 'WheelEvent.wheelDeltaX', 303 'WheelEvent.wheelDeltaX',
304 'WheelEvent.wheelDeltaY', 304 'WheelEvent.wheelDeltaY',
305 'WheelEvent.initWebKitWheelEvent', 305 'WheelEvent.initWebKitWheelEvent',
306 'DOMWindow.getComputedStyle', 306 'DOMWindow.getComputedStyle',
307 ]) 307 ])
308 308
309 # Members from the standard dom that exist in the dart:html library with 309 # Members from the standard dom that exist in the dart:html library with
310 # identical functionality but with cleaner names. 310 # identical functionality but with cleaner names.
311 renamed_html_members = monitored.Dict('htmlrenamer.renamed_html_members', { 311 renamed_html_members = monitored.Dict('htmlrenamer.renamed_html_members', {
312 'CSSStyleDeclaration.getPropertyValue': '_getPropertyValue',
312 'DirectoryEntry.getDirectory': '_getDirectory', 313 'DirectoryEntry.getDirectory': '_getDirectory',
313 'DirectoryEntry.getFile': '_getFile', 314 'DirectoryEntry.getFile': '_getFile',
314 'Document.createCDATASection': 'createCDataSection', 315 'Document.createCDATASection': 'createCDataSection',
315 'Document.defaultView': 'window', 316 'Document.defaultView': 'window',
316 'Document.querySelector': 'query', 317 'Document.querySelector': 'query',
317 'DOMURL.createObjectURL': 'createObjectUrl', 318 'DOMURL.createObjectURL': 'createObjectUrl',
318 'DOMURL.revokeObjectURL': 'revokeObjectUrl', 319 'DOMURL.revokeObjectURL': 'revokeObjectUrl',
319 'DOMWindow.clearTimeout': '_clearTimeout', 320 'DOMWindow.clearTimeout': '_clearTimeout',
320 'DOMWindow.clearInterval': '_clearInterval', 321 'DOMWindow.clearInterval': '_clearInterval',
321 'DOMWindow.setTimeout': '_setTimeout', 322 'DOMWindow.setTimeout': '_setTimeout',
322 'DOMWindow.setInterval': '_setInterval', 323 'DOMWindow.setInterval': '_setInterval',
323 'DOMWindow.webkitConvertPointFromNodeToPage': '_convertPointFromNodeToPage', 324 'DOMWindow.webkitConvertPointFromNodeToPage': '_convertPointFromNodeToPage',
324 'DOMWindow.webkitConvertPointFromPageToNode': '_convertPointFromPageToNode', 325 'DOMWindow.webkitConvertPointFromPageToNode': '_convertPointFromPageToNode',
325 'DOMWindow.webkitNotifications': 'notifications', 326 'DOMWindow.webkitNotifications': 'notifications',
326 'DOMWindow.webkitRequestFileSystem': '_requestFileSystem', 327 'DOMWindow.webkitRequestFileSystem': '_requestFileSystem',
327 'DOMWindow.webkitResolveLocalFileSystemURL': 'resolveLocalFileSystemUrl', 328 'DOMWindow.webkitResolveLocalFileSystemURL': 'resolveLocalFileSystemUrl',
328 'Element.querySelector': 'query', 329 'Element.querySelector': 'query',
329 'Element.webkitCreateShadowRoot': 'createShadowRoot', 330 'Element.webkitCreateShadowRoot': 'createShadowRoot',
330 'Element.webkitMatchesSelector' : 'matches', 331 'Element.webkitMatchesSelector' : 'matches',
332 'MutationObserver.observe': '_observe',
331 'Navigator.webkitGetUserMedia': '_getUserMedia', 333 'Navigator.webkitGetUserMedia': '_getUserMedia',
332 'Node.appendChild': 'append', 334 'Node.appendChild': 'append',
333 'Node.cloneNode': 'clone', 335 'Node.cloneNode': 'clone',
334 'Node.nextSibling': 'nextNode', 336 'Node.nextSibling': 'nextNode',
335 'Node.ownerDocument': 'document', 337 'Node.ownerDocument': 'document',
336 'Node.parentElement': 'parent', 338 'Node.parentElement': 'parent',
337 'Node.previousSibling': 'previousNode', 339 'Node.previousSibling': 'previousNode',
338 'Node.textContent': 'text', 340 'Node.textContent': 'text',
339 'RTCPeerConnection.createAnswer': '_createAnswer', 341 'RTCPeerConnection.createAnswer': '_createAnswer',
340 'RTCPeerConnection.createOffer': '_createOffer', 342 'RTCPeerConnection.createOffer': '_createOffer',
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 758
757 # We're looking for a sequence of letters which start with capital letter 759 # We're looking for a sequence of letters which start with capital letter
758 # then a series of caps and finishes with either the end of the string or 760 # then a series of caps and finishes with either the end of the string or
759 # a capital letter. 761 # a capital letter.
760 # The [0-9] check is for names such as 2D or 3D 762 # The [0-9] check is for names such as 2D or 3D
761 # The following test cases should match as: 763 # The following test cases should match as:
762 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue 764 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue
763 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) 765 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change)
764 # IFrameElement: (I)()(F)rameElement (no change) 766 # IFrameElement: (I)()(F)rameElement (no change)
765 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) 767 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name)
OLDNEW
« no previous file with comments | « tools/dom/idl/dart/dart.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698