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

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

Issue 658903005: Reapply "Stop suppressing generation of bindings with Promise. Add some tests for DOM APIs that ans… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « tools/dom/scripts/generator.py ('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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 'MutationObserver', 182 'MutationObserver',
183 ]) 183 ])
184 184
185 # Members from the standard dom that should not be exposed publicly in dart:html 185 # Members from the standard dom that should not be exposed publicly in dart:html
186 # but need to be exposed internally to implement dart:html on top of a standard 186 # but need to be exposed internally to implement dart:html on top of a standard
187 # browser. They are exposed simply by placing an underscore in front of the 187 # browser. They are exposed simply by placing an underscore in front of the
188 # name. 188 # name.
189 private_html_members = monitored.Set('htmlrenamer.private_html_members', [ 189 private_html_members = monitored.Set('htmlrenamer.private_html_members', [
190 'AudioContext.decodeAudioData', 190 'AudioContext.decodeAudioData',
191 'AudioNode.connect', 191 'AudioNode.connect',
192 'Cache.add',
193 'Cache.delete',
194 'Cache.keys',
195 'Cache.match',
196 'Cache.matchAll',
197 'Cache.put',
192 'CanvasRenderingContext2D.arc', 198 'CanvasRenderingContext2D.arc',
193 'CanvasRenderingContext2D.drawImage', 199 'CanvasRenderingContext2D.drawImage',
194 'CanvasRenderingContext2D.getLineDash', 200 'CanvasRenderingContext2D.getLineDash',
195 'CSSStyleDeclaration.getPropertyValue', 201 'CSSStyleDeclaration.getPropertyValue',
196 'CSSStyleDeclaration.setProperty', 202 'CSSStyleDeclaration.setProperty',
197 'CSSStyleDeclaration.var', 203 'CSSStyleDeclaration.var',
198 'CompositionEvent.initCompositionEvent', 204 'CompositionEvent.initCompositionEvent',
199 'CustomEvent.detail', 205 'CustomEvent.detail',
200 'CustomEvent.initCustomEvent', 206 'CustomEvent.initCustomEvent',
201 'DeviceOrientationEvent.initDeviceOrientationEvent', 207 'DeviceOrientationEvent.initDeviceOrientationEvent',
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 'IDBObjectStore.add', 297 'IDBObjectStore.add',
292 'IDBObjectStore.clear', 298 'IDBObjectStore.clear',
293 'IDBObjectStore.count', 299 'IDBObjectStore.count',
294 'IDBObjectStore.createIndex', 300 'IDBObjectStore.createIndex',
295 'IDBObjectStore.delete', 301 'IDBObjectStore.delete',
296 'IDBObjectStore.get', 302 'IDBObjectStore.get',
297 'IDBObjectStore.openCursor', 303 'IDBObjectStore.openCursor',
298 'IDBObjectStore.put', 304 'IDBObjectStore.put',
299 'KeyboardEvent.initKeyboardEvent', 305 'KeyboardEvent.initKeyboardEvent',
300 'KeyboardEvent.keyIdentifier', 306 'KeyboardEvent.keyIdentifier',
307 'MediaKeys.createSession',
308 'MediaKeySession.update',
301 'MessageEvent.initMessageEvent', 309 'MessageEvent.initMessageEvent',
302 'MouseEvent.initMouseEvent', 310 'MouseEvent.initMouseEvent',
303 'MouseEvent.clientX', 311 'MouseEvent.clientX',
304 'MouseEvent.clientY', 312 'MouseEvent.clientY',
305 'MouseEvent.movementX', 313 'MouseEvent.movementX',
306 'MouseEvent.movementY', 314 'MouseEvent.movementY',
307 'MouseEvent.webkitMovementX', 315 'MouseEvent.webkitMovementX',
308 'MouseEvent.webkitMovementY', 316 'MouseEvent.webkitMovementY',
309 'MouseEvent.offsetX', 317 'MouseEvent.offsetX',
310 'MouseEvent.offsetY', 318 'MouseEvent.offsetY',
(...skipping 10 matching lines...) Expand all
321 'ParentNode.children', 329 'ParentNode.children',
322 'ParentNode.firstElementChild', 330 'ParentNode.firstElementChild',
323 'ParentNode.lastElementChild', 331 'ParentNode.lastElementChild',
324 'RTCPeerConnection.createAnswer', 332 'RTCPeerConnection.createAnswer',
325 'RTCPeerConnection.createOffer', 333 'RTCPeerConnection.createOffer',
326 'RTCPeerConnection.getStats', 334 'RTCPeerConnection.getStats',
327 'Screen.availHeight', 335 'Screen.availHeight',
328 'Screen.availLeft', 336 'Screen.availLeft',
329 'Screen.availTop', 337 'Screen.availTop',
330 'Screen.availWidth', 338 'Screen.availWidth',
331 'ShadowRoot.applyAuthorStyles', 339 'ServiceWorkerGlobalScope.fetch',
332 'ShadowRoot.resetStyleInheritance', 340 'ShadowRoot.resetStyleInheritance',
333 'Storage.clear', 341 'Storage.clear',
334 'Storage.getItem', 342 'Storage.getItem',
335 'Storage.key', 343 'Storage.key',
336 'Storage.length', 344 'Storage.length',
337 'Storage.removeItem', 345 'Storage.removeItem',
338 'Storage.setItem', 346 'Storage.setItem',
339 'StorageEvent.initStorageEvent', 347 'StorageEvent.initStorageEvent',
348 'SubtleCrypto.encrypt',
349 'SubtleCrypto.decrypt',
350 'SubtleCrypto.sign',
351 'SubtleCrypto.digest',
352 'SubtleCrypto.importKey',
353 'SubtleCrypto.unwrapKey',
354 'ShadowRoot.applyAuthorStyles',
355
340 'TextEvent.initTextEvent', 356 'TextEvent.initTextEvent',
341 # TODO(leafp): These have been converted from int to double in Chrome 37. 357 # TODO(leafp): These have been converted from int to double in Chrome 37.
342 # client, page, and screen were already special cased, adding radiusX/radiusY. 358 # client, page, and screen were already special cased, adding radiusX/radiusY.
343 # See impl_Touch.darttemplate for impedance matching code 359 # See impl_Touch.darttemplate for impedance matching code
344 'Touch.clientX', 360 'Touch.clientX',
345 'Touch.clientY', 361 'Touch.clientY',
346 'Touch.pageX', 362 'Touch.pageX',
347 'Touch.pageY', 363 'Touch.pageY',
348 'Touch.screenX', 364 'Touch.screenX',
349 'Touch.screenY', 365 'Touch.screenY',
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 1021
1006 # We're looking for a sequence of letters which start with capital letter 1022 # We're looking for a sequence of letters which start with capital letter
1007 # then a series of caps and finishes with either the end of the string or 1023 # then a series of caps and finishes with either the end of the string or
1008 # a capital letter. 1024 # a capital letter.
1009 # The [0-9] check is for names such as 2D or 3D 1025 # The [0-9] check is for names such as 2D or 3D
1010 # The following test cases should match as: 1026 # The following test cases should match as:
1011 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue 1027 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue
1012 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) 1028 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change)
1013 # IFrameElement: (I)()(F)rameElement (no change) 1029 # IFrameElement: (I)()(F)rameElement (no change)
1014 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) 1030 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name)
OLDNEW
« no previous file with comments | « tools/dom/scripts/generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698