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

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

Issue 27232003: Revert "Making all callbacks use zones" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/src/EventStreamProvider.dart » ('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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 html_interface_renames[interface] = '_' + interface 127 html_interface_renames[interface] = '_' + interface
128 128
129 convert_to_future_members = monitored.Set( 129 convert_to_future_members = monitored.Set(
130 'htmlrenamer.converted_to_future_members', [ 130 'htmlrenamer.converted_to_future_members', [
131 'AudioContext.decodeAudioData', 131 'AudioContext.decodeAudioData',
132 'DataTransferItem.getAsString', 132 'DataTransferItem.getAsString',
133 'DirectoryEntry.getDirectory', 133 'DirectoryEntry.getDirectory',
134 'DirectoryEntry.getFile', 134 'DirectoryEntry.getFile',
135 'DirectoryEntry.removeRecursively', 135 'DirectoryEntry.removeRecursively',
136 'DirectoryReader.readEntries', 136 'DirectoryReader.readEntries',
137 'Window.webkitRequestFileSystem',
138 'Window.webkitResolveLocalFileSystemURL',
137 'Entry.copyTo', 139 'Entry.copyTo',
138 'Entry.getMetadata', 140 'Entry.getMetadata',
139 'Entry.getParent', 141 'Entry.getParent',
140 'Entry.moveTo', 142 'Entry.moveTo',
141 'Entry.remove', 143 'Entry.remove',
142 'FileEntry.createWriter', 144 'FileEntry.createWriter',
143 'FileEntry.file', 145 'FileEntry.file',
144 'FontLoader.notifyWhenFontsReady',
145 'MediaStreamTrack.getSources',
146 'Notification.requestPermission', 146 'Notification.requestPermission',
147 'NotificationCenter.requestPermission', 147 'NotificationCenter.requestPermission',
148 'RTCPeerConnection.getStats',
149 'RTCPeerConnection.setLocalDescription', 148 'RTCPeerConnection.setLocalDescription',
150 'RTCPeerConnection.setRemoteDescription', 149 'RTCPeerConnection.setRemoteDescription',
151 'StorageInfo.requestQuota', 150 'StorageInfo.requestQuota',
152 'StorageQuota.queryUsageAndQuota', 151 'WorkerGlobalScope.webkitResolveLocalFileSystemURL',
153 'StorageQuota.requestQuota',
154 'Window.webkitRequestFileSystem',
155 'Window.webkitResolveLocalFileSystemURL',
156 'WorkerGlobalScope.webkitRequestFileSystem', 152 'WorkerGlobalScope.webkitRequestFileSystem',
157 'WorkerGlobalScope.webkitResolveLocalFileSystemURL',
158 ]) 153 ])
159 154
160 # "Private" members in the form $dom_foo. 155 # "Private" members in the form $dom_foo.
161 # TODO(efortuna): Remove this set. This allows us to make the change of removing 156 # TODO(efortuna): Remove this set. This allows us to make the change of removing
162 # $dom in installments instead of all at once, but the intent is to move all of 157 # $dom in installments instead of all at once, but the intent is to move all of
163 # these either into private_html_members or remove them from this list entirely. 158 # these either into private_html_members or remove them from this list entirely.
164 dom_private_html_members = monitored.Set('htmlrenamer.private_html_members', [ 159 dom_private_html_members = monitored.Set('htmlrenamer.private_html_members', [
165 'EventTarget.addEventListener', 160 'EventTarget.addEventListener',
166 'EventTarget.removeEventListener', 161 'EventTarget.removeEventListener',
167 ]) 162 ])
168 163
169 # Classes where we have customized constructors, but we need to keep the old 164 # Classes where we have customized constructors, but we need to keep the old
170 # constructor for dispatch purposes. 165 # constructor for dispatch purposes.
171 custom_html_constructors = monitored.Set( 166 custom_html_constructors = monitored.Set(
172 'htmlrenamer.custom_html_constructors', [ 167 'htmlrenamer.custom_html_constructors', [
173 'HTMLOptionElement', 168 'HTMLOptionElement',
174 'MutationObserver',
175 ]) 169 ])
176 170
177 # Members from the standard dom that should not be exposed publicly in dart:html 171 # Members from the standard dom that should not be exposed publicly in dart:html
178 # but need to be exposed internally to implement dart:html on top of a standard 172 # but need to be exposed internally to implement dart:html on top of a standard
179 # browser. They are exposed simply by placing an underscore in front of the 173 # browser. They are exposed simply by placing an underscore in front of the
180 # name. 174 # name.
181 private_html_members = monitored.Set('htmlrenamer.private_html_members', [ 175 private_html_members = monitored.Set('htmlrenamer.private_html_members', [
182 'AudioNode.connect', 176 'AudioNode.connect',
183 'CanvasRenderingContext2D.arc', 177 'CanvasRenderingContext2D.arc',
184 'CanvasRenderingContext2D.drawImage', 178 'CanvasRenderingContext2D.drawImage',
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 'UIEvent.layerX', 316 'UIEvent.layerX',
323 'UIEvent.layerY', 317 'UIEvent.layerY',
324 'UIEvent.pageX', 318 'UIEvent.pageX',
325 'UIEvent.pageY', 319 'UIEvent.pageY',
326 'WebGLRenderingContext.texImage2D', 320 'WebGLRenderingContext.texImage2D',
327 'WheelEvent.initWebKitWheelEvent', 321 'WheelEvent.initWebKitWheelEvent',
328 'WheelEvent.deltaX', 322 'WheelEvent.deltaX',
329 'WheelEvent.deltaY', 323 'WheelEvent.deltaY',
330 'Window.createImageBitmap', 324 'Window.createImageBitmap',
331 'Window.getComputedStyle', 325 'Window.getComputedStyle',
326 'Window.moveTo',
327 'Window.clearTimeout',
332 'Window.clearInterval', 328 'Window.clearInterval',
333 'Window.clearTimeout', 329 'Window.setTimeout',
334 'Window.moveTo',
335 'Window.requestAnimationFrame',
336 'Window.setInterval', 330 'Window.setInterval',
337 'Window.setTimeout',
338 ]) 331 ])
339 332
340 # Members from the standard dom that exist in the dart:html library with 333 # Members from the standard dom that exist in the dart:html library with
341 # identical functionality but with cleaner names. 334 # identical functionality but with cleaner names.
342 renamed_html_members = monitored.Dict('htmlrenamer.renamed_html_members', { 335 renamed_html_members = monitored.Dict('htmlrenamer.renamed_html_members', {
343 'CSSKeyframesRule.insertRule': 'appendRule', 336 'CSSKeyframesRule.insertRule': 'appendRule',
344 'DirectoryEntry.getDirectory': '_getDirectory', 337 'DirectoryEntry.getDirectory': '_getDirectory',
345 'DirectoryEntry.getFile': '_getFile', 338 'DirectoryEntry.getFile': '_getFile',
346 'Document.createCDATASection': 'createCDataSection', 339 'Document.createCDATASection': 'createCDataSection',
347 'Document.defaultView': 'window', 340 'Document.defaultView': 'window',
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 939
947 # We're looking for a sequence of letters which start with capital letter 940 # We're looking for a sequence of letters which start with capital letter
948 # then a series of caps and finishes with either the end of the string or 941 # then a series of caps and finishes with either the end of the string or
949 # a capital letter. 942 # a capital letter.
950 # The [0-9] check is for names such as 2D or 3D 943 # The [0-9] check is for names such as 2D or 3D
951 # The following test cases should match as: 944 # The following test cases should match as:
952 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue 945 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue
953 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) 946 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change)
954 # IFrameElement: (I)()(F)rameElement (no change) 947 # IFrameElement: (I)()(F)rameElement (no change)
955 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) 948 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') | tools/dom/src/EventStreamProvider.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698