| 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 13 matching lines...) Expand all Loading... |
| 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 'DOMApplicationCache': 'ApplicationCache', | 31 'DOMApplicationCache': 'ApplicationCache', |
| 32 'DOMFileSystem': 'FileSystem', | 32 'DOMFileSystem': 'FileSystem', |
| 33 'DOMPoint': '_DomPoint', | 33 'DOMPoint': '_DomPoint', |
| 34 'Entity': '_Entity', # Not sure if we want to expose this yet, may conflict
with other libs. |
| 34 'EntryCallback': '_EntryCallback', | 35 'EntryCallback': '_EntryCallback', |
| 35 'EntriesCallback': '_EntriesCallback', | 36 'EntriesCallback': '_EntriesCallback', |
| 36 'ErrorCallback': '_ErrorCallback', | 37 'ErrorCallback': '_ErrorCallback', |
| 37 'FileCallback': '_FileCallback', | 38 'FileCallback': '_FileCallback', |
| 38 'FileSystemCallback': '_FileSystemCallback', | 39 'FileSystemCallback': '_FileSystemCallback', |
| 39 'FileWriterCallback': '_FileWriterCallback', | 40 'FileWriterCallback': '_FileWriterCallback', |
| 40 'HTMLDocument' : 'HtmlDocument', | 41 'HTMLDocument' : 'HtmlDocument', |
| 41 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts. | 42 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts. |
| 42 'NamedNodeMap': '_NamedNodeMap', | 43 'NamedNodeMap': '_NamedNodeMap', |
| 43 'NavigatorUserMediaErrorCallback': '_NavigatorUserMediaErrorCallback', | 44 'NavigatorUserMediaErrorCallback': '_NavigatorUserMediaErrorCallback', |
| (...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 | 771 |
| 771 # We're looking for a sequence of letters which start with capital letter | 772 # We're looking for a sequence of letters which start with capital letter |
| 772 # then a series of caps and finishes with either the end of the string or | 773 # then a series of caps and finishes with either the end of the string or |
| 773 # a capital letter. | 774 # a capital letter. |
| 774 # The [0-9] check is for names such as 2D or 3D | 775 # The [0-9] check is for names such as 2D or 3D |
| 775 # The following test cases should match as: | 776 # The following test cases should match as: |
| 776 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 777 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
| 777 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 778 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
| 778 # IFrameElement: (I)()(F)rameElement (no change) | 779 # IFrameElement: (I)()(F)rameElement (no change) |
| 779 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 780 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
| OLD | NEW |