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

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

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