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

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

Issue 2883623004: fix KeyEvent and KeyboardEvent (Closed)
Patch Set: Created 3 years, 7 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
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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 # See impl_Touch.darttemplate for impedance matching code 390 # See impl_Touch.darttemplate for impedance matching code
391 'Touch.clientX', 391 'Touch.clientX',
392 'Touch.clientY', 392 'Touch.clientY',
393 'Touch.pageX', 393 'Touch.pageX',
394 'Touch.pageY', 394 'Touch.pageY',
395 'Touch.screenX', 395 'Touch.screenX',
396 'Touch.screenY', 396 'Touch.screenY',
397 'Touch.radiusX', 397 'Touch.radiusX',
398 'Touch.radiusY', 398 'Touch.radiusY',
399 'TouchEvent.initTouchEvent', 399 'TouchEvent.initTouchEvent',
400 'UIEvent.charCode',
401 'UIEvent.initUIEvent', 400 'UIEvent.initUIEvent',
402 'UIEvent.keyCode',
403 'UIEvent.layerX', 401 'UIEvent.layerX',
404 'UIEvent.layerY', 402 'UIEvent.layerY',
405 'UIEvent.pageX', 403 'UIEvent.pageX',
406 'UIEvent.pageY', 404 'UIEvent.pageY',
407 'UIEvent.which', 405 'UIEvent.which',
406 'KeyboardEvent.charCode',
407 'KeyboardEvent.keyCode',
408 'KeyboardEvent.which',
409
408 'WheelEvent.initWebKitWheelEvent', 410 'WheelEvent.initWebKitWheelEvent',
409 'WheelEvent.deltaX', 411 'WheelEvent.deltaX',
410 'WheelEvent.deltaY', 412 'WheelEvent.deltaY',
411 'WorkerGlobalScope.webkitNotifications', 413 'WorkerGlobalScope.webkitNotifications',
412 'Window.getComputedStyle', 414 'Window.getComputedStyle',
413 'Window.clearInterval', 415 'Window.clearInterval',
414 'Window.clearTimeout', 416 'Window.clearTimeout',
415 # TODO(tll): These have been converted from int to double in Chrome 39 for 417 # TODO(tll): These have been converted from int to double in Chrome 39 for
416 # subpixel precision. Special case for backward compatibility. 418 # subpixel precision. Special case for backward compatibility.
417 'Window.scrollX', 419 'Window.scrollX',
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 'HTMLTableRowElement.chOff', 777 'HTMLTableRowElement.chOff',
776 'HTMLTableRowElement.vAlign', 778 'HTMLTableRowElement.vAlign',
777 'HTMLTableSectionElement.align', 779 'HTMLTableSectionElement.align',
778 'HTMLTableSectionElement.ch', 780 'HTMLTableSectionElement.ch',
779 'HTMLTableSectionElement.chOff', 781 'HTMLTableSectionElement.chOff',
780 'HTMLTableSectionElement.vAlign', 782 'HTMLTableSectionElement.vAlign',
781 'HTMLTitleElement.text', 783 'HTMLTitleElement.text',
782 'HTMLUListElement.compact', 784 'HTMLUListElement.compact',
783 'HTMLUListElement.type', 785 'HTMLUListElement.type',
784 'IDBDatabase.transaction', # We do this in a template without the generated implementation at all. 786 'IDBDatabase.transaction', # We do this in a template without the generated implementation at all.
785 'KeyboardEvent.charCode',
786 'KeyboardEvent.keyCode',
787 'KeyboardEvent.which',
788 'Location.valueOf', 787 'Location.valueOf',
789 'MessageEvent.data', 788 'MessageEvent.data',
790 'MessageEvent.ports', 789 'MessageEvent.ports',
791 'MessageEvent.webkitInitMessageEvent', 790 'MessageEvent.webkitInitMessageEvent',
792 'MouseEvent.webkitMovementX', 791 'MouseEvent.webkitMovementX',
793 'MouseEvent.webkitMovementY', 792 'MouseEvent.webkitMovementY',
794 'MouseEvent.x', 793 'MouseEvent.x',
795 'MouseEvent.y', 794 'MouseEvent.y',
796 'Navigator.bluetooth', 795 'Navigator.bluetooth',
797 'Navigator.registerServiceWorker', 796 'Navigator.registerServiceWorker',
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 1101
1103 # We're looking for a sequence of letters which start with capital letter 1102 # We're looking for a sequence of letters which start with capital letter
1104 # then a series of caps and finishes with either the end of the string or 1103 # then a series of caps and finishes with either the end of the string or
1105 # a capital letter. 1104 # a capital letter.
1106 # The [0-9] check is for names such as 2D or 3D 1105 # The [0-9] check is for names such as 2D or 3D
1107 # The following test cases should match as: 1106 # The following test cases should match as:
1108 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue 1107 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue
1109 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) 1108 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change)
1110 # IFrameElement: (I)()(F)rameElement (no change) 1109 # IFrameElement: (I)()(F)rameElement (no change)
1111 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) 1110 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698