| 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 'DOMApplicationCache': 'ApplicationCache', | 12 'DOMApplicationCache': 'ApplicationCache', |
| 13 'DOMCoreException': 'DomException', | 13 'DOMCoreException': 'DomException', |
| 14 'DOMFileSystem': 'FileSystem', | 14 'DOMFileSystem': 'FileSystem', |
| 15 'DOMFileSystemSync': 'FileSystemSync', | 15 'DOMFileSystemSync': 'FileSystemSync', |
| 16 'DOMFormData': 'FormData', | 16 'DOMFormData': 'FormData', |
| 17 'DOMURL': 'Url', | 17 'DOMURL': 'Url', |
| 18 'DOMWindow': 'Window', | 18 'DOMWindow': 'Window', |
| 19 'HTMLDocument' : 'HtmlDocument', | 19 'HTMLDocument' : 'HtmlDocument', |
| 20 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts. | 20 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts. |
| 21 'NamedNodeMap': '_NamedNodeMap', |
| 21 'NavigatorUserMediaErrorCallback': '_NavigatorUserMediaErrorCallback', | 22 'NavigatorUserMediaErrorCallback': '_NavigatorUserMediaErrorCallback', |
| 22 'NavigatorUserMediaSuccessCallback': '_NavigatorUserMediaSuccessCallback', | 23 'NavigatorUserMediaSuccessCallback': '_NavigatorUserMediaSuccessCallback', |
| 23 'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts. | 24 'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts. |
| 24 'SVGElement': 'SvgElement', # Manual to avoid name conflicts. | 25 'SVGElement': 'SvgElement', # Manual to avoid name conflicts. |
| 25 'SVGException': 'SvgException', # Manual of avoid conflict with Exception. | 26 'SVGException': 'SvgException', # Manual of avoid conflict with Exception. |
| 26 'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts. | 27 'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts. |
| 27 'WebGLVertexArrayObjectOES': 'WebGLVertexArrayObject', | 28 'WebGLVertexArrayObjectOES': 'WebGLVertexArrayObject', |
| 28 'WebKitAnimationEvent': 'AnimationEvent', | 29 'WebKitAnimationEvent': 'AnimationEvent', |
| 29 'WebKitCSSKeyframeRule': 'CssKeyframeRule', | 30 'WebKitCSSKeyframeRule': 'CssKeyframeRule', |
| 30 'WebKitCSSKeyframesRule': 'CssKeyframesRule', | 31 'WebKitCSSKeyframesRule': 'CssKeyframesRule', |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 | 590 |
| 590 # We're looking for a sequence of letters which start with capital letter | 591 # We're looking for a sequence of letters which start with capital letter |
| 591 # then a series of caps and finishes with either the end of the string or | 592 # then a series of caps and finishes with either the end of the string or |
| 592 # a capital letter. | 593 # a capital letter. |
| 593 # The [0-9] check is for names such as 2D or 3D | 594 # The [0-9] check is for names such as 2D or 3D |
| 594 # The following test cases should match as: | 595 # The following test cases should match as: |
| 595 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 596 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
| 596 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 597 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
| 597 # IFrameElement: (I)()(F)rameElement (no change) | 598 # IFrameElement: (I)()(F)rameElement (no change) |
| 598 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 599 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
| OLD | NEW |