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

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

Issue 41753002: Remove the low hanging deprecation fruit. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 'StringCallback': '_StringCallback', 60 'StringCallback': '_StringCallback',
61 'WebGLVertexArrayObjectOES': 'VertexArrayObject', 61 'WebGLVertexArrayObjectOES': 'VertexArrayObject',
62 'WindowTimers': '_WindowTimers', 62 'WindowTimers': '_WindowTimers',
63 'XMLHttpRequest': 'HttpRequest', 63 'XMLHttpRequest': 'HttpRequest',
64 'XMLHttpRequestUpload': 'HttpRequestUpload', 64 'XMLHttpRequestUpload': 'HttpRequestUpload',
65 }, **typed_array_renames)) 65 }, **typed_array_renames))
66 66
67 # Interfaces that are suppressed, but need to still exist for Dartium and to 67 # Interfaces that are suppressed, but need to still exist for Dartium and to
68 # properly wrap DOM objects if/when encountered. 68 # properly wrap DOM objects if/when encountered.
69 _removed_html_interfaces = [ 69 _removed_html_interfaces = [
70 'CDataSection',
70 'CSSPrimitiveValue', 71 'CSSPrimitiveValue',
72 'CSSUnknownRule',
71 'CSSValue', 73 'CSSValue',
72 'Counter', 74 'Counter',
73 'DOMFileSystemSync', # Workers 75 'DOMFileSystemSync', # Workers
74 'DatabaseSync', # Workers 76 'DatabaseSync', # Workers
75 'DataView', # Typed arrays 77 'DataView', # Typed arrays
76 'DirectoryEntrySync', # Workers 78 'DirectoryEntrySync', # Workers
77 'DirectoryReaderSync', # Workers 79 'DirectoryReaderSync', # Workers
78 'EntrySync', # Workers 80 'EntrySync', # Workers
79 'FileEntrySync', # Workers 81 'FileEntrySync', # Workers
80 'FileReaderSync', # Workers 82 'FileReaderSync', # Workers
81 'FileWriterSync', # Workers 83 'FileWriterSync', # Workers
84 'HTMLAllCollection',
82 'HTMLAppletElement', 85 'HTMLAppletElement',
83 'HTMLBaseFontElement', 86 'HTMLBaseFontElement',
84 'HTMLDirectoryElement', 87 'HTMLDirectoryElement',
85 'HTMLFontElement', 88 'HTMLFontElement',
86 'HTMLFrameElement', 89 'HTMLFrameElement',
87 'HTMLFrameSetElement', 90 'HTMLFrameSetElement',
88 'HTMLMarqueeElement', 91 'HTMLMarqueeElement',
89 'IDBAny', 92 'IDBAny',
93 'Notation',
90 'PagePopupController', 94 'PagePopupController',
91 'RGBColor', 95 'RGBColor',
92 'RadioNodeList', # Folded onto NodeList in dart2js. 96 'RadioNodeList', # Folded onto NodeList in dart2js.
93 'Rect', 97 'Rect',
94 'SQLTransactionSync', # Workers 98 'SQLTransactionSync', # Workers
95 'SQLTransactionSyncCallback', # Workers 99 'SQLTransactionSyncCallback', # Workers
96 'SVGAltGlyphDefElement', # Webkit only. 100 'SVGAltGlyphDefElement', # Webkit only.
97 'SVGAltGlyphItemElement', # Webkit only. 101 'SVGAltGlyphItemElement', # Webkit only.
98 'SVGAnimateColorElement', # Deprecated. Use AnimateElement instead. 102 'SVGAnimateColorElement', # Deprecated. Use AnimateElement instead.
99 'SVGColor', 103 'SVGColor',
100 'SVGComponentTransferFunctionElement', # Currently not supported anywhere. 104 'SVGComponentTransferFunctionElement', # Currently not supported anywhere.
101 'SVGCursorElement', # Webkit only. 105 'SVGCursorElement', # Webkit only.
102 'SVGFEDropShadowElement', # Webkit only for the following: 106 'SVGFEDropShadowElement', # Webkit only for the following:
103 'SVGFontElement', 107 'SVGFontElement',
104 'SVGFontFaceElement', 108 'SVGFontFaceElement',
105 'SVGFontFaceFormatElement', 109 'SVGFontFaceFormatElement',
106 'SVGFontFaceNameElement', 110 'SVGFontFaceNameElement',
107 'SVGFontFaceSrcElement', 111 'SVGFontFaceSrcElement',
108 'SVGFontFaceUriElement', 112 'SVGFontFaceUriElement',
109 'SVGGlyphElement', 113 'SVGGlyphElement',
110 'SVGGlyphRefElement', 114 'SVGGlyphRefElement',
111 'SVGHKernElement', 115 'SVGHKernElement',
112 'SVGMPathElement', 116 'SVGMPathElement',
113 'SVGPaint', 117 'SVGPaint',
114 'SVGMissingGlyphElement', 118 'SVGMissingGlyphElement',
115 'SVGTRefElement', 119 'SVGTRefElement',
116 'SVGVKernElement', 120 'SVGVKernElement',
117 'SharedWorker', # Workers 121 'SharedWorker', # Workers
118 'SubtleCrypto', 122 'SubtleCrypto',
123 'WebKitCSSFilterValue',
124 'WebKitCSSMatrix',
125 'WebKitCSSMixFunctionValue',
126 'WebKitCSSTransformValue',
119 'WebKitMediaSource', 127 'WebKitMediaSource',
120 'WebKitSourceBuffer', 128 'WebKitSourceBuffer',
121 'WebKitSourceBufferList', 129 'WebKitSourceBufferList',
122 'WorkerLocation', # Workers 130 'WorkerLocation', # Workers
123 'WorkerNavigator', # Workers 131 'WorkerNavigator', # Workers
124 'XMLHttpRequestProgressEvent', 132 'XMLHttpRequestProgressEvent',
125 ] 133 ]
126 134
127 for interface in _removed_html_interfaces: 135 for interface in _removed_html_interfaces:
128 html_interface_renames[interface] = '_' + interface 136 html_interface_renames[interface] = '_' + interface
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 941
934 # We're looking for a sequence of letters which start with capital letter 942 # We're looking for a sequence of letters which start with capital letter
935 # then a series of caps and finishes with either the end of the string or 943 # then a series of caps and finishes with either the end of the string or
936 # a capital letter. 944 # a capital letter.
937 # The [0-9] check is for names such as 2D or 3D 945 # The [0-9] check is for names such as 2D or 3D
938 # The following test cases should match as: 946 # The following test cases should match as:
939 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue 947 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue
940 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) 948 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change)
941 # IFrameElement: (I)()(F)rameElement (no change) 949 # IFrameElement: (I)()(F)rameElement (no change)
942 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) 950 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name)
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698