| OLD | NEW |
| 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 html_interface_renames = monitored.Dict('htmlrenamer.html_interface_renames', { | 9 html_interface_renames = monitored.Dict('htmlrenamer.html_interface_renames', { |
| 10 'CDATASection': 'CDataSection', | 10 'CDATASection': 'CDataSection', |
| 11 'Clipboard': 'DataTransfer', | 11 'Clipboard': 'DataTransfer', |
| 12 'Database': 'SqlDatabase', # Avoid conflict with Index DB's Database. | 12 'Database': 'SqlDatabase', # Avoid conflict with Index DB's Database. |
| 13 'DatabaseSync': 'SqlDatabaseSync', | 13 'DatabaseSync': 'SqlDatabaseSync', |
| 14 'DOMApplicationCache': 'ApplicationCache', | 14 'DOMApplicationCache': 'ApplicationCache', |
| 15 'DOMCoreException': 'DomException', | 15 'DOMCoreException': 'DomException', |
| 16 'DOMFileSystem': 'FileSystem', | 16 'DOMFileSystem': 'FileSystem', |
| 17 'DOMFormData': 'FormData', | 17 'DOMFormData': 'FormData', |
| 18 'DOMPoint': '_DomPoint', |
| 18 'DOMURL': 'Url', | 19 'DOMURL': 'Url', |
| 19 'DOMWindow': 'Window', | 20 'DOMWindow': 'Window', |
| 20 'EntryCallback': '_EntryCallback', | 21 'EntryCallback': '_EntryCallback', |
| 21 'EntriesCallback': '_EntriesCallback', | 22 'EntriesCallback': '_EntriesCallback', |
| 22 'ErrorCallback': '_ErrorCallback', | 23 'ErrorCallback': '_ErrorCallback', |
| 23 'FileCallback': '_FileCallback', | 24 'FileCallback': '_FileCallback', |
| 24 'FileSystemCallback': '_FileSystemCallback', | 25 'FileSystemCallback': '_FileSystemCallback', |
| 25 'FileWriterCallback': '_FileWriterCallback', | 26 'FileWriterCallback': '_FileWriterCallback', |
| 26 'HTMLDocument' : 'HtmlDocument', | 27 'HTMLDocument' : 'HtmlDocument', |
| 27 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts. | 28 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts. |
| 28 'NamedNodeMap': '_NamedNodeMap', | 29 'NamedNodeMap': '_NamedNodeMap', |
| 29 'NavigatorUserMediaErrorCallback': '_NavigatorUserMediaErrorCallback', | 30 'NavigatorUserMediaErrorCallback': '_NavigatorUserMediaErrorCallback', |
| 30 'NavigatorUserMediaSuccessCallback': '_NavigatorUserMediaSuccessCallback', | 31 'NavigatorUserMediaSuccessCallback': '_NavigatorUserMediaSuccessCallback', |
| 31 'NotificationPermissionCallback': '_NotificationPermissionCallback', | 32 'NotificationPermissionCallback': '_NotificationPermissionCallback', |
| 32 'PositionCallback': '_PositionCallback', | 33 'PositionCallback': '_PositionCallback', |
| 33 'PositionErrorCallback': '_PositionErrorCallback', | 34 'PositionErrorCallback': '_PositionErrorCallback', |
| 34 'RTCDTMFSender': 'RtcDtmfSender', | 35 'RTCDTMFSender': 'RtcDtmfSender', |
| 35 'RTCDTMFToneChangeEvent': 'RtcDtmfToneChangeEvent', | 36 'RTCDTMFToneChangeEvent': 'RtcDtmfToneChangeEvent', |
| 36 'RTCErrorCallback': '_RtcErrorCallback', | 37 'RTCErrorCallback': '_RtcErrorCallback', |
| 37 'RTCSessionDescriptionCallback': '_RtcSessionDescriptionCallback', | 38 'RTCSessionDescriptionCallback': '_RtcSessionDescriptionCallback', |
| 38 'StringCallback': '_StringCallback', | 39 'StringCallback': '_StringCallback', |
| 39 'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts. | 40 'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts. |
| 40 'SVGElement': 'SvgElement', # Manual to avoid name conflicts. | 41 'SVGElement': 'SvgElement', # Manual to avoid name conflicts. |
| 41 'SVGException': 'SvgException', # Manual of avoid conflict with Exception. | 42 'SVGException': 'SvgException', # Manual of avoid conflict with Exception. |
| 42 'SVGGradientElement': '_GradientElement', | 43 'SVGGradientElement': '_GradientElement', |
| 43 'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts. | 44 'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts. |
| 44 'WebGLVertexArrayObjectOES': 'VertexArrayObject', | 45 'WebGLVertexArrayObjectOES': 'VertexArrayObject', |
| 45 'WebKitAnimationEvent': 'AnimationEvent', | |
| 46 'WebKitCSSKeyframeRule': 'CssKeyframeRule', | 46 'WebKitCSSKeyframeRule': 'CssKeyframeRule', |
| 47 'WebKitCSSKeyframesRule': 'CssKeyframesRule', | 47 'WebKitCSSKeyframesRule': 'CssKeyframesRule', |
| 48 'WebKitCSSTransformValue': 'CssTransformValue', | 48 'WebKitCSSTransformValue': 'CssTransformValue', |
| 49 'WebKitPoint': '_DomPoint', | |
| 50 'WebKitTransitionEvent': '_WebKitTransitionEvent', | |
| 51 'XMLHttpRequest': 'HttpRequest', | 49 'XMLHttpRequest': 'HttpRequest', |
| 52 'XMLHttpRequestException': 'HttpRequestException', | 50 'XMLHttpRequestException': 'HttpRequestException', |
| 53 'XMLHttpRequestProgressEvent': 'HttpRequestProgressEvent', | 51 'XMLHttpRequestProgressEvent': 'HttpRequestProgressEvent', |
| 54 'XMLHttpRequestUpload': 'HttpRequestUpload', | 52 'XMLHttpRequestUpload': 'HttpRequestUpload', |
| 55 }) | 53 }) |
| 56 | 54 |
| 57 # Interfaces that are suppressed, but need to still exist for Dartium and to | 55 # Interfaces that are suppressed, but need to still exist for Dartium and to |
| 58 # properly wrap DOM objects if/when encountered. | 56 # properly wrap DOM objects if/when encountered. |
| 59 _removed_html_interfaces = [ | 57 _removed_html_interfaces = [ |
| 60 'CSSPrimitiveValue', | 58 'CSSPrimitiveValue', |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 'CanvasRenderingContext2D.drawImageFromRect', | 350 'CanvasRenderingContext2D.drawImageFromRect', |
| 353 'CanvasRenderingContext2D.setAlpha', | 351 'CanvasRenderingContext2D.setAlpha', |
| 354 'CanvasRenderingContext2D.setCompositeOperation', | 352 'CanvasRenderingContext2D.setCompositeOperation', |
| 355 'CanvasRenderingContext2D.setFillColor', | 353 'CanvasRenderingContext2D.setFillColor', |
| 356 'CanvasRenderingContext2D.setLineCap', | 354 'CanvasRenderingContext2D.setLineCap', |
| 357 'CanvasRenderingContext2D.setLineJoin', | 355 'CanvasRenderingContext2D.setLineJoin', |
| 358 'CanvasRenderingContext2D.setLineWidth', | 356 'CanvasRenderingContext2D.setLineWidth', |
| 359 'CanvasRenderingContext2D.setMiterLimit', | 357 'CanvasRenderingContext2D.setMiterLimit', |
| 360 'CanvasRenderingContext2D.setShadow', | 358 'CanvasRenderingContext2D.setShadow', |
| 361 'CanvasRenderingContext2D.setStrokeColor', | 359 'CanvasRenderingContext2D.setStrokeColor', |
| 362 'CanvasRenderingContext2D.webkitLineDash', | |
| 363 'CanvasRenderingContext2D.webkitLineDashOffset', | |
| 364 'CharacterData.remove', | 360 'CharacterData.remove', |
| 365 'DOMWindow.call:blur', | 361 'DOMWindow.call:blur', |
| 366 'DOMWindow.call:focus', | 362 'DOMWindow.call:focus', |
| 367 'DOMWindow.clientInformation', | 363 'DOMWindow.clientInformation', |
| 368 'DOMWindow.get:frames', | 364 'DOMWindow.get:frames', |
| 369 'DOMWindow.get:length', | 365 'DOMWindow.get:length', |
| 370 'DOMWindow.on:beforeUnload', | 366 'DOMWindow.on:beforeUnload', |
| 371 'DOMWindow.prompt', | 367 'DOMWindow.prompt', |
| 372 'DOMWindow.webkitCancelAnimationFrame', | 368 'DOMWindow.webkitCancelAnimationFrame', |
| 373 'DOMWindow.webkitCancelRequestAnimationFrame', | 369 'DOMWindow.webkitCancelRequestAnimationFrame', |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 | 744 |
| 749 # We're looking for a sequence of letters which start with capital letter | 745 # We're looking for a sequence of letters which start with capital letter |
| 750 # then a series of caps and finishes with either the end of the string or | 746 # then a series of caps and finishes with either the end of the string or |
| 751 # a capital letter. | 747 # a capital letter. |
| 752 # The [0-9] check is for names such as 2D or 3D | 748 # The [0-9] check is for names such as 2D or 3D |
| 753 # The following test cases should match as: | 749 # The following test cases should match as: |
| 754 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 750 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
| 755 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 751 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
| 756 # IFrameElement: (I)()(F)rameElement (no change) | 752 # IFrameElement: (I)()(F)rameElement (no change) |
| 757 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 753 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
| OLD | NEW |