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

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

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