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

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

Issue 952133004: Changes to support roll 39 IDLs (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cleanup Created 5 years, 9 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/idlnode.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 11 matching lines...) Expand all
22 } 22 }
23 23
24 html_interface_renames = monitored.Dict('htmlrenamer.html_interface_renames', 24 html_interface_renames = monitored.Dict('htmlrenamer.html_interface_renames',
25 dict({ 25 dict({
26 'Attr': '_Attr', 26 'Attr': '_Attr',
27 'CDATASection': 'CDataSection', 27 'CDATASection': 'CDataSection',
28 'Clipboard': 'DataTransfer', 28 'Clipboard': 'DataTransfer',
29 'Database': 'SqlDatabase', # Avoid conflict with Index DB's Database. 29 'Database': 'SqlDatabase', # Avoid conflict with Index DB's Database.
30 'DatabaseSync': 'SqlDatabaseSync', 30 'DatabaseSync': 'SqlDatabaseSync',
31 'DOMFileSystem': 'FileSystem', 31 'DOMFileSystem': 'FileSystem',
32 'WebKitPoint': '_DomPoint',
33 'DOMRect': '_DomRect', 32 'DOMRect': '_DomRect',
34 'Entity': '_Entity', # Not sure if we want to expose this yet, may conflict with other libs. 33 'Entity': '_Entity', # Not sure if we want to expose this yet, may conflict with other libs.
35 'EntryCallback': '_EntryCallback', 34 'EntryCallback': '_EntryCallback',
36 'EntriesCallback': '_EntriesCallback', 35 'EntriesCallback': '_EntriesCallback',
37 'ErrorCallback': '_ErrorCallback', 36 'ErrorCallback': '_ErrorCallback',
38 'FileCallback': '_FileCallback', 37 'FileCallback': '_FileCallback',
39 'FileSystemCallback': '_FileSystemCallback', 38 'FileSystemCallback': '_FileSystemCallback',
40 'FileWriterCallback': '_FileWriterCallback', 39 'FileWriterCallback': '_FileWriterCallback',
41 'HTMLDocument' : 'HtmlDocument', 40 'HTMLDocument' : 'HtmlDocument',
42 'HTMLElement' : 'HtmlElement', 41 'HTMLElement' : 'HtmlElement',
43 'HTMLHtmlElement' : 'HtmlHtmlElement', 42 'HTMLHtmlElement' : 'HtmlHtmlElement',
44 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts. 43 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts.
44 'Iterator': 'DomIterator',
45 'Key': 'CryptoKey', 45 'Key': 'CryptoKey',
46 'NamedNodeMap': '_NamedNodeMap', 46 'NamedNodeMap': '_NamedNodeMap',
47 'NavigatorUserMediaErrorCallback': '_NavigatorUserMediaErrorCallback', 47 'NavigatorUserMediaErrorCallback': '_NavigatorUserMediaErrorCallback',
48 'NavigatorUserMediaSuccessCallback': '_NavigatorUserMediaSuccessCallback', 48 'NavigatorUserMediaSuccessCallback': '_NavigatorUserMediaSuccessCallback',
49 'NotificationPermissionCallback': '_NotificationPermissionCallback', 49 'NotificationPermissionCallback': '_NotificationPermissionCallback',
50 'PositionCallback': '_PositionCallback', 50 'PositionCallback': '_PositionCallback',
51 'PositionErrorCallback': '_PositionErrorCallback', 51 'PositionErrorCallback': '_PositionErrorCallback',
52 'Request': '_Request', 52 'Request': '_Request',
53 'RTCDTMFSender': 'RtcDtmfSender', 53 'RTCDTMFSender': 'RtcDtmfSender',
54 'RTCDTMFToneChangeEvent': 'RtcDtmfToneChangeEvent', 54 'RTCDTMFToneChangeEvent': 'RtcDtmfToneChangeEvent',
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 1028
1029 # We're looking for a sequence of letters which start with capital letter 1029 # We're looking for a sequence of letters which start with capital letter
1030 # then a series of caps and finishes with either the end of the string or 1030 # then a series of caps and finishes with either the end of the string or
1031 # a capital letter. 1031 # a capital letter.
1032 # The [0-9] check is for names such as 2D or 3D 1032 # The [0-9] check is for names such as 2D or 3D
1033 # The following test cases should match as: 1033 # The following test cases should match as:
1034 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue 1034 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue
1035 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) 1035 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change)
1036 # IFrameElement: (I)()(F)rameElement (no change) 1036 # IFrameElement: (I)()(F)rameElement (no change)
1037 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) 1037 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/idlnode.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698