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

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

Issue 444743002: Use Blink IDL parser for dart libraries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: cleanup Created 6 years, 3 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 'SVGElement.className': '_svgClassName', 383 'SVGElement.className': '_svgClassName',
384 'SVGStopElement.offset': 'gradientOffset', 384 'SVGStopElement.offset': 'gradientOffset',
385 'URL.createObjectURL': 'createObjectUrl', 385 'URL.createObjectURL': 'createObjectUrl',
386 'URL.revokeObjectURL': 'revokeObjectUrl', 386 'URL.revokeObjectURL': 'revokeObjectUrl',
387 #'WorkerContext.webkitRequestFileSystem': '_requestFileSystem', 387 #'WorkerContext.webkitRequestFileSystem': '_requestFileSystem',
388 #'WorkerContext.webkitRequestFileSystemSync': '_requestFileSystemSync', 388 #'WorkerContext.webkitRequestFileSystemSync': '_requestFileSystemSync',
389 }) 389 })
390 390
391 # Members that have multiple definitions, but their types are vary, so we rename 391 # Members that have multiple definitions, but their types are vary, so we rename
392 # them to make them distinct. 392 # them to make them distinct.
393 renamed_overloads = monitored.Dict('htmldartgenreator.renamed_overloads', { 393 renamed_overloads = monitored.Dict('htmldartgenerator.renamed_overloads', {
394 'AudioContext.createBuffer(ArrayBuffer buffer, boolean mixToMono)': 394 'AudioContext.createBuffer(ArrayBuffer buffer, boolean mixToMono)':
395 'createBufferFromBuffer', 395 'createBufferFromBuffer',
396 'CSS.supports(DOMString conditionText)': 'supportsCondition', 396 'CSS.supports(DOMString conditionText)': 'supportsCondition',
397 'CanvasRenderingContext2D.createPattern(HTMLImageElement image, ' 397 'CanvasRenderingContext2D.createPattern(HTMLImageElement image, '
398 'DOMString repetitionType)': 'createPatternFromImage', 398 'DOMString repetitionType)': 'createPatternFromImage',
399 'DataTransferItemList.add(File file)': 'addFile', 399 'DataTransferItemList.add(File file)': 'addFile',
400 'DataTransferItemList.add(DOMString data, DOMString type)': 'addData', 400 'DataTransferItemList.add(DOMString data, DOMString type)': 'addData',
401 'FormData.append(DOMString name, Blob value, DOMString filename)': 401 'FormData.append(DOMString name, Blob value, DOMString filename)':
402 'appendBlob', 402 'appendBlob',
403 'IDBDatabase.transaction(DOMStringList storeNames, DOMString mode)': 403 'IDBDatabase.transaction(DOMStringList storeNames, DOMString mode)':
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 981
982 # We're looking for a sequence of letters which start with capital letter 982 # We're looking for a sequence of letters which start with capital letter
983 # then a series of caps and finishes with either the end of the string or 983 # then a series of caps and finishes with either the end of the string or
984 # a capital letter. 984 # a capital letter.
985 # The [0-9] check is for names such as 2D or 3D 985 # The [0-9] check is for names such as 2D or 3D
986 # The following test cases should match as: 986 # The following test cases should match as:
987 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue 987 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue
988 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) 988 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change)
989 # IFrameElement: (I)()(F)rameElement (no change) 989 # IFrameElement: (I)()(F)rameElement (no change)
990 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) 990 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698