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

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

Issue 1327083002: Revert "Patched in Dartium JsInterop" (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 months 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
« no previous file with comments | « tools/dom/scripts/htmldartgenerator.py ('k') | tools/dom/scripts/systemhtml.py » ('j') | 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 'Window.webkitRequestFileSystem', 169 'Window.webkitRequestFileSystem',
170 'Window.webkitResolveLocalFileSystemURL', 170 'Window.webkitResolveLocalFileSystemURL',
171 'WorkerGlobalScope.webkitRequestFileSystem', 171 'WorkerGlobalScope.webkitRequestFileSystem',
172 'WorkerGlobalScope.webkitResolveLocalFileSystemURL', 172 'WorkerGlobalScope.webkitResolveLocalFileSystemURL',
173 ]) 173 ])
174 174
175 # Classes where we have customized constructors, but we need to keep the old 175 # Classes where we have customized constructors, but we need to keep the old
176 # constructor for dispatch purposes. 176 # constructor for dispatch purposes.
177 custom_html_constructors = monitored.Set( 177 custom_html_constructors = monitored.Set(
178 'htmlrenamer.custom_html_constructors', [ 178 'htmlrenamer.custom_html_constructors', [
179 'HTMLAudioElement',
180 'HTMLOptionElement', 179 'HTMLOptionElement',
181 'MutationObserver', 180 'MutationObserver',
182 ]) 181 ])
183 182
184 # Members from the standard dom that should not be exposed publicly in dart:html 183 # Members from the standard dom that should not be exposed publicly in dart:html
185 # but need to be exposed internally to implement dart:html on top of a standard 184 # but need to be exposed internally to implement dart:html on top of a standard
186 # browser. They are exposed simply by placing an underscore in front of the 185 # browser. They are exposed simply by placing an underscore in front of the
187 # name. 186 # name.
188 private_html_members = monitored.Set('htmlrenamer.private_html_members', [ 187 private_html_members = monitored.Set('htmlrenamer.private_html_members', [
189 'AudioContext.decodeAudioData', 188 'AudioContext.decodeAudioData',
190 'AudioNode.connect', 189 'AudioNode.connect',
191 'Cache.add', 190 'Cache.add',
192 'Cache.delete', 191 'Cache.delete',
193 'Cache.keys', 192 'Cache.keys',
194 'Cache.match', 193 'Cache.match',
195 'Cache.matchAll', 194 'Cache.matchAll',
196 'Cache.put', 195 'Cache.put',
197 'CanvasRenderingContext2D.arc', 196 'CanvasRenderingContext2D.arc',
198 'CanvasRenderingContext2D.drawImage', 197 'CanvasRenderingContext2D.drawImage',
199 'CanvasRenderingContext2D.getLineDash', 198 'CanvasRenderingContext2D.getLineDash',
200 'CSSStyleDeclaration.getPropertyValue', 199 'CSSStyleDeclaration.getPropertyValue',
201 'CSSStyleDeclaration.setProperty', 200 'CSSStyleDeclaration.setProperty',
202 'CSSStyleDeclaration.var', 201 'CSSStyleDeclaration.var',
203 'CompositionEvent.initCompositionEvent', 202 'CompositionEvent.initCompositionEvent',
204 'CustomEvent.detail', 203 'CustomEvent.detail',
205 'CustomEvent.initCustomEvent', 204 'CustomEvent.initCustomEvent',
206 'DeviceOrientationEvent.initDeviceOrientationEvent', 205 'DeviceOrientationEvent.initDeviceOrientationEvent',
207 'Document.createElement', 206 'Document.createElement',
208 'Document.createElementNS',
209 'Document.createEvent', 207 'Document.createEvent',
210 'Document.createNodeIterator', 208 'Document.createNodeIterator',
211 'Document.createTextNode', 209 'Document.createTextNode',
212 'Document.createTouch', 210 'Document.createTouch',
213 'Document.createTouchList', 211 'Document.createTouchList',
214 'Document.createTreeWalker', 212 'Document.createTreeWalker',
215 'Document.querySelectorAll', 213 'Document.querySelectorAll',
216 'DocumentFragment.querySelectorAll', 214 'DocumentFragment.querySelectorAll',
217 215
218 # Moved to HTMLDocument. 216 # Moved to HTMLDocument.
219 'Document.body', 217 'Document.body',
220 'Document.caretRangeFromPoint', 218 'Document.caretRangeFromPoint',
221 'Document.elementFromPoint', 219 'Document.elementFromPoint',
222 'Document.getCSSCanvasContext', 220 'Document.getCSSCanvasContext',
223 'Document.head', 221 'Document.head',
224 'Document.lastModified', 222 'Document.lastModified',
225 'Document.preferredStylesheetSet', 223 'Document.preferredStylesheetSet',
226 'Document.referrer', 224 'Document.referrer',
227 'Document.selectedStylesheetSet', 225 'Document.selectedStylesheetSet',
228 'Document.styleSheets', 226 'Document.styleSheets',
229 'Document.title', 227 'Document.title',
230 'Document.webkitCancelFullScreen', 228 'Document.webkitCancelFullScreen',
231 'Document.webkitExitFullscreen', 229 'Document.webkitExitFullscreen',
232 'Document.webkitFullscreenElement', 230 'Document.webkitFullscreenElement',
233 'Document.webkitFullscreenEnabled', 231 'Document.webkitFullscreenEnabled',
234 'Document.webkitHidden', 232 'Document.webkitHidden',
235 'Document.webkitIsFullScreen', 233 'Document.webkitIsFullScreen',
236 'Document.webkitVisibilityState', 234 'Document.webkitVisibilityState',
237 235
238 'Element.animate',
239 'Element.children', 236 'Element.children',
240 'Element.childElementCount', 237 'Element.childElementCount',
241 'Element.firstElementChild', 238 'Element.firstElementChild',
242 'Element.getElementsByTagName', 239 'Element.getElementsByTagName',
243 'Element.insertAdjacentHTML', 240 'Element.insertAdjacentHTML',
244 'Element.scrollIntoView', 241 'Element.scrollIntoView',
245 'Element.scrollIntoViewIfNeeded', 242 'Element.scrollIntoViewIfNeeded',
246 'Element.removeAttribute', 243 'Element.removeAttribute',
247 'Element.removeAttributeNS', 244 'Element.removeAttributeNS',
248 'Element.hasAttribute', 245 'Element.hasAttribute',
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 'HTMLTitleElement.text', 773 'HTMLTitleElement.text',
777 'HTMLUListElement.compact', 774 'HTMLUListElement.compact',
778 'HTMLUListElement.type', 775 'HTMLUListElement.type',
779 'Location.valueOf', 776 'Location.valueOf',
780 'MessageEvent.ports', 777 'MessageEvent.ports',
781 'MessageEvent.webkitInitMessageEvent', 778 'MessageEvent.webkitInitMessageEvent',
782 'MouseEvent.x', 779 'MouseEvent.x',
783 'MouseEvent.y', 780 'MouseEvent.y',
784 'Navigator.registerServiceWorker', 781 'Navigator.registerServiceWorker',
785 'Navigator.unregisterServiceWorker', 782 'Navigator.unregisterServiceWorker',
786 'Navigator.isProtocolHandlerRegistered',
787 'Navigator.unregisterProtocolHandler',
788 'Node.compareDocumentPosition', 783 'Node.compareDocumentPosition',
789 'Node.get:DOCUMENT_POSITION_CONTAINED_BY', 784 'Node.get:DOCUMENT_POSITION_CONTAINED_BY',
790 'Node.get:DOCUMENT_POSITION_CONTAINS', 785 'Node.get:DOCUMENT_POSITION_CONTAINS',
791 'Node.get:DOCUMENT_POSITION_DISCONNECTED', 786 'Node.get:DOCUMENT_POSITION_DISCONNECTED',
792 'Node.get:DOCUMENT_POSITION_FOLLOWING', 787 'Node.get:DOCUMENT_POSITION_FOLLOWING',
793 'Node.get:DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC', 788 'Node.get:DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC',
794 'Node.get:DOCUMENT_POSITION_PRECEDING', 789 'Node.get:DOCUMENT_POSITION_PRECEDING',
795 'Node.get:childNodes', 790 'Node.get:childNodes',
796 'Node.get:prefix', 791 'Node.get:prefix',
797 'Node.hasAttributes', 792 'Node.hasAttributes',
(...skipping 21 matching lines...) Expand all
819 'SVGElementInstance.on:wheel', 814 'SVGElementInstance.on:wheel',
820 'Touch.get:webkitRadiusX', 815 'Touch.get:webkitRadiusX',
821 'Touch.get:webkitRadiusY', 816 'Touch.get:webkitRadiusY',
822 'Touch.get:webkitForce', 817 'Touch.get:webkitForce',
823 'WheelEvent.wheelDelta', 818 'WheelEvent.wheelDelta',
824 'WheelEvent.wheelDeltaX', 819 'WheelEvent.wheelDeltaX',
825 'WheelEvent.wheelDeltaY', 820 'WheelEvent.wheelDeltaY',
826 'Window.on:wheel', 821 'Window.on:wheel',
827 'WindowEventHandlers.on:beforeUnload', 822 'WindowEventHandlers.on:beforeUnload',
828 'WorkerGlobalScope.webkitIndexedDB', 823 'WorkerGlobalScope.webkitIndexedDB',
829 'XMLHttpRequest.open',
830 # TODO(jacobr): should these be removed? 824 # TODO(jacobr): should these be removed?
831 'Document.close', 825 'Document.close',
832 'Document.hasFocus', 826 'Document.hasFocus',
833 ]) 827 ])
834 828
835 # Manual dart: library name lookup. 829 # Manual dart: library name lookup.
836 _library_names = monitored.Dict('htmlrenamer._library_names', { 830 _library_names = monitored.Dict('htmlrenamer._library_names', {
837 'ANGLEInstancedArrays': 'web_gl', 831 'ANGLEInstancedArrays': 'web_gl',
838 'Database': 'web_sql', 832 'Database': 'web_sql',
839 'Navigator': 'html', 833 'Navigator': 'html',
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 1030
1037 # We're looking for a sequence of letters which start with capital letter 1031 # We're looking for a sequence of letters which start with capital letter
1038 # then a series of caps and finishes with either the end of the string or 1032 # then a series of caps and finishes with either the end of the string or
1039 # a capital letter. 1033 # a capital letter.
1040 # The [0-9] check is for names such as 2D or 3D 1034 # The [0-9] check is for names such as 2D or 3D
1041 # The following test cases should match as: 1035 # The following test cases should match as:
1042 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue 1036 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue
1043 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) 1037 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change)
1044 # IFrameElement: (I)()(F)rameElement (no change) 1038 # IFrameElement: (I)()(F)rameElement (no change)
1045 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) 1039 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name)
OLDNEW
« no previous file with comments | « tools/dom/scripts/htmldartgenerator.py ('k') | tools/dom/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698