| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 'RTCDTMFToneChangeEvent': 'RtcDtmfToneChangeEvent', | 50 'RTCDTMFToneChangeEvent': 'RtcDtmfToneChangeEvent', |
| 51 'RTCErrorCallback': '_RtcErrorCallback', | 51 'RTCErrorCallback': '_RtcErrorCallback', |
| 52 'RTCSessionDescriptionCallback': '_RtcSessionDescriptionCallback', | 52 'RTCSessionDescriptionCallback': '_RtcSessionDescriptionCallback', |
| 53 'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts. | 53 'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts. |
| 54 'SVGElement': 'SvgElement', # Manual to avoid name conflicts. | 54 'SVGElement': 'SvgElement', # Manual to avoid name conflicts. |
| 55 'SVGException': 'SvgException', # Manual of avoid conflict with Exception. | 55 'SVGException': 'SvgException', # Manual of avoid conflict with Exception. |
| 56 'SVGGradientElement': '_GradientElement', | 56 'SVGGradientElement': '_GradientElement', |
| 57 'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts. | 57 'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts. |
| 58 'StringCallback': '_StringCallback', | 58 'StringCallback': '_StringCallback', |
| 59 'WebGLVertexArrayObjectOES': 'VertexArrayObject', | 59 'WebGLVertexArrayObjectOES': 'VertexArrayObject', |
| 60 'WebKitCSSFilterRule': '_WebKitCssFilterRule', | |
| 61 'WebKitCSSKeyframeRule': '_WebKitCssKeyframeRule', | |
| 62 'WebKitCSSKeyframesRule': '_WebKitCssKeyframesRule', | |
| 63 'WebKitCSSRegionRule': '_WebKitCssRegionRule', | |
| 64 'XMLHttpRequest': 'HttpRequest', | 60 'XMLHttpRequest': 'HttpRequest', |
| 65 'XMLHttpRequestProgressEvent': 'HttpRequestProgressEvent', | 61 'XMLHttpRequestProgressEvent': 'HttpRequestProgressEvent', |
| 66 'XMLHttpRequestUpload': 'HttpRequestUpload', | 62 'XMLHttpRequestUpload': 'HttpRequestUpload', |
| 67 }, **typed_array_renames)) | 63 }, **typed_array_renames)) |
| 68 | 64 |
| 69 # Interfaces that are suppressed, but need to still exist for Dartium and to | 65 # Interfaces that are suppressed, but need to still exist for Dartium and to |
| 70 # properly wrap DOM objects if/when encountered. | 66 # properly wrap DOM objects if/when encountered. |
| 71 _removed_html_interfaces = [ | 67 _removed_html_interfaces = [ |
| 72 'CSSPrimitiveValue', | 68 'CSSPrimitiveValue', |
| 73 'CSSValue', | 69 'CSSValue', |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 'SVGGlyphElement', | 108 'SVGGlyphElement', |
| 113 'SVGGlyphRefElement', | 109 'SVGGlyphRefElement', |
| 114 'SVGHKernElement', | 110 'SVGHKernElement', |
| 115 'SVGMPathElement', | 111 'SVGMPathElement', |
| 116 'SVGPaint', | 112 'SVGPaint', |
| 117 'SVGMissingGlyphElement', | 113 'SVGMissingGlyphElement', |
| 118 'SVGTRefElement', | 114 'SVGTRefElement', |
| 119 'SVGVKernElement', | 115 'SVGVKernElement', |
| 120 'SharedWorker', # Workers | 116 'SharedWorker', # Workers |
| 121 'SharedWorkerContext', # Workers | 117 'SharedWorkerContext', # Workers |
| 122 'WebKitCSSFilterValue', | |
| 123 'WebKitCSSMatrix', | |
| 124 'WebKitCSSMixFunctionValue', | |
| 125 'WebKitCSSTransformValue', | |
| 126 'WorkerContext', # Workers | 118 'WorkerContext', # Workers |
| 127 'WorkerLocation', # Workers | 119 'WorkerLocation', # Workers |
| 128 'WorkerNavigator', # Workers | 120 'WorkerNavigator', # Workers |
| 129 ] | 121 ] |
| 130 | 122 |
| 131 for interface in _removed_html_interfaces: | 123 for interface in _removed_html_interfaces: |
| 132 html_interface_renames[interface] = '_' + interface | 124 html_interface_renames[interface] = '_' + interface |
| 133 | 125 |
| 134 convert_to_future_members = monitored.Set( | 126 convert_to_future_members = monitored.Set( |
| 135 'htmlrenamer.converted_to_future_members', [ | 127 'htmlrenamer.converted_to_future_members', [ |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 | 772 |
| 781 # We're looking for a sequence of letters which start with capital letter | 773 # We're looking for a sequence of letters which start with capital letter |
| 782 # then a series of caps and finishes with either the end of the string or | 774 # then a series of caps and finishes with either the end of the string or |
| 783 # a capital letter. | 775 # a capital letter. |
| 784 # The [0-9] check is for names such as 2D or 3D | 776 # The [0-9] check is for names such as 2D or 3D |
| 785 # The following test cases should match as: | 777 # The following test cases should match as: |
| 786 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 778 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
| 787 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 779 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
| 788 # IFrameElement: (I)()(F)rameElement (no change) | 780 # IFrameElement: (I)()(F)rameElement (no change) |
| 789 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 781 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
| OLD | NEW |