| 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 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 'WorkerGlobalScope.webkitIndexedDB', | 843 'WorkerGlobalScope.webkitIndexedDB', |
| 844 'XMLHttpRequest.open', | 844 'XMLHttpRequest.open', |
| 845 # TODO(jacobr): should these be removed? | 845 # TODO(jacobr): should these be removed? |
| 846 'Document.close', | 846 'Document.close', |
| 847 'Document.hasFocus', | 847 'Document.hasFocus', |
| 848 ]) | 848 ]) |
| 849 | 849 |
| 850 # Manual dart: library name lookup. | 850 # Manual dart: library name lookup. |
| 851 _library_names = monitored.Dict('htmlrenamer._library_names', { | 851 _library_names = monitored.Dict('htmlrenamer._library_names', { |
| 852 'ANGLEInstancedArrays': 'web_gl', | 852 'ANGLEInstancedArrays': 'web_gl', |
| 853 'CHROMIUMSubscribeUniform': 'web_gl', |
| 853 'Database': 'web_sql', | 854 'Database': 'web_sql', |
| 854 'Navigator': 'html', | 855 'Navigator': 'html', |
| 855 'Window': 'html', | 856 'Window': 'html', |
| 856 }) | 857 }) |
| 857 | 858 |
| 858 _library_ids = monitored.Dict('htmlrenamer._library_names', { | 859 _library_ids = monitored.Dict('htmlrenamer._library_names', { |
| 859 'ANGLEInstancedArrays': 'WebGl', | 860 'ANGLEInstancedArrays': 'WebGl', |
| 861 'CHROMIUMSubscribeUniform': 'WebGl', |
| 860 'Database': 'WebSql', | 862 'Database': 'WebSql', |
| 861 'Navigator': 'Html', | 863 'Navigator': 'Html', |
| 862 'Window': 'Html', | 864 'Window': 'Html', |
| 863 }) | 865 }) |
| 864 | 866 |
| 865 class HtmlRenamer(object): | 867 class HtmlRenamer(object): |
| 866 def __init__(self, database, metadata): | 868 def __init__(self, database, metadata): |
| 867 self._database = database | 869 self._database = database |
| 868 self._metadata = metadata | 870 self._metadata = metadata |
| 869 | 871 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1053 | 1055 |
| 1054 # We're looking for a sequence of letters which start with capital letter | 1056 # We're looking for a sequence of letters which start with capital letter |
| 1055 # then a series of caps and finishes with either the end of the string or | 1057 # then a series of caps and finishes with either the end of the string or |
| 1056 # a capital letter. | 1058 # a capital letter. |
| 1057 # The [0-9] check is for names such as 2D or 3D | 1059 # The [0-9] check is for names such as 2D or 3D |
| 1058 # The following test cases should match as: | 1060 # The following test cases should match as: |
| 1059 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 1061 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
| 1060 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 1062 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
| 1061 # IFrameElement: (I)()(F)rameElement (no change) | 1063 # IFrameElement: (I)()(F)rameElement (no change) |
| 1062 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 1064 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
| OLD | NEW |