| 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 'DOMFileSystemSync': 'FileSystemSync', | 17 'DOMFileSystemSync': 'FileSystemSync', |
| 18 'DOMFormData': 'FormData', | 18 'DOMFormData': 'FormData', |
| 19 'DOMURL': 'Url', | 19 'DOMURL': 'Url', |
| 20 'DOMWindow': 'Window', | 20 'DOMWindow': 'Window', |
| 21 'HTMLDocument' : 'HtmlDocument', | 21 'HTMLDocument' : 'HtmlDocument', |
| 22 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts. | 22 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts. |
| 23 'NamedNodeMap': '_NamedNodeMap', | 23 'NamedNodeMap': '_NamedNodeMap', |
| 24 'NavigatorUserMediaErrorCallback': '_NavigatorUserMediaErrorCallback', | 24 'NavigatorUserMediaErrorCallback': '_NavigatorUserMediaErrorCallback', |
| 25 'NavigatorUserMediaSuccessCallback': '_NavigatorUserMediaSuccessCallback', | 25 'NavigatorUserMediaSuccessCallback': '_NavigatorUserMediaSuccessCallback', |
| 26 'PositionCallback': '_PositionCallback', | 26 'PositionCallback': '_PositionCallback', |
| 27 'PositionErrorCallback': '_PositionErrorCallback', | 27 'PositionErrorCallback': '_PositionErrorCallback', |
| 28 'Rect': 'CssRect', |
| 29 'RGBColor': 'CssRgbColor', |
| 28 'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts. | 30 'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts. |
| 29 'SVGElement': 'SvgElement', # Manual to avoid name conflicts. | 31 'SVGElement': 'SvgElement', # Manual to avoid name conflicts. |
| 30 'SVGException': 'SvgException', # Manual of avoid conflict with Exception. | 32 'SVGException': 'SvgException', # Manual of avoid conflict with Exception. |
| 31 'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts. | 33 'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts. |
| 32 'WebGLVertexArrayObjectOES': 'WebGLVertexArrayObject', | 34 'WebGLVertexArrayObjectOES': 'WebGLVertexArrayObject', |
| 33 'WebKitAnimationEvent': 'AnimationEvent', | 35 'WebKitAnimationEvent': 'AnimationEvent', |
| 34 'WebKitCSSKeyframeRule': 'CssKeyframeRule', | 36 'WebKitCSSKeyframeRule': 'CssKeyframeRule', |
| 35 'WebKitCSSKeyframesRule': 'CssKeyframesRule', | 37 'WebKitCSSKeyframesRule': 'CssKeyframesRule', |
| 36 'WebKitCSSMatrix': 'CssMatrix', | 38 'WebKitCSSMatrix': 'CssMatrix', |
| 37 'WebKitCSSTransformValue': 'CssTransformValue', | 39 'WebKitCSSTransformValue': 'CssTransformValue', |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 | 634 |
| 633 # We're looking for a sequence of letters which start with capital letter | 635 # We're looking for a sequence of letters which start with capital letter |
| 634 # then a series of caps and finishes with either the end of the string or | 636 # then a series of caps and finishes with either the end of the string or |
| 635 # a capital letter. | 637 # a capital letter. |
| 636 # The [0-9] check is for names such as 2D or 3D | 638 # The [0-9] check is for names such as 2D or 3D |
| 637 # The following test cases should match as: | 639 # The following test cases should match as: |
| 638 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 640 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
| 639 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 641 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
| 640 # IFrameElement: (I)()(F)rameElement (no change) | 642 # IFrameElement: (I)()(F)rameElement (no change) |
| 641 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 643 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
| OLD | NEW |