OLD | NEW |
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 Loading... |
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 Loading... |
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) |
OLD | NEW |