| 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 'DOMApplicationCache': 'ApplicationCache', | 11 'DOMApplicationCache': 'ApplicationCache', |
| 12 'DOMCoreException': 'DomException', | 12 'DOMCoreException': 'DomException', |
| 13 'DOMFileSystem': 'FileSystem', | 13 'DOMFileSystem': 'FileSystem', |
| 14 'DOMFileSystemSync': 'FileSystemSync', | 14 'DOMFileSystemSync': 'FileSystemSync', |
| 15 'DOMFormData': 'FormData', | 15 'DOMFormData': 'FormData', |
| 16 'DOMURL': 'Url', | 16 'DOMURL': 'Url', |
| 17 'DOMWindow': 'Window', | 17 'DOMWindow': 'Window', |
| 18 'HTMLDocument' : 'HtmlDocument', | 18 'HTMLDocument' : 'HtmlDocument', |
| 19 'HTMLDirectoryElement' : '_DirectoryElement', |
| 19 'IDBAny': '_Any', # Suppressed, but needs to exist for Dartium. | 20 'IDBAny': '_Any', # Suppressed, but needs to exist for Dartium. |
| 20 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts. | 21 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts. |
| 21 'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts. | 22 'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts. |
| 22 'SVGElement': 'SvgElement', # Manual to avoid name conflicts. | 23 'SVGElement': 'SvgElement', # Manual to avoid name conflicts. |
| 23 'SVGException': 'SvgException', # Manual of avoid conflict with Exception. | 24 'SVGException': 'SvgException', # Manual of avoid conflict with Exception. |
| 24 'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts. | 25 'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts. |
| 25 'WebGLVertexArrayObjectOES': 'WebGLVertexArrayObject', | 26 'WebGLVertexArrayObjectOES': 'WebGLVertexArrayObject', |
| 26 'WebKitAnimation': 'Animation', | 27 'WebKitAnimation': 'Animation', |
| 27 'WebKitAnimationEvent': 'AnimationEvent', | 28 'WebKitAnimationEvent': 'AnimationEvent', |
| 28 'WebKitCSSKeyframeRule': 'CssKeyframeRule', | 29 'WebKitCSSKeyframeRule': 'CssKeyframeRule', |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 'HTMLBRElement.clear', | 268 'HTMLBRElement.clear', |
| 268 'HTMLBodyElement.aLink', | 269 'HTMLBodyElement.aLink', |
| 269 'HTMLBodyElement.background', | 270 'HTMLBodyElement.background', |
| 270 'HTMLBodyElement.bgColor', | 271 'HTMLBodyElement.bgColor', |
| 271 'HTMLBodyElement.bgColor', | 272 'HTMLBodyElement.bgColor', |
| 272 'HTMLBodyElement.link', | 273 'HTMLBodyElement.link', |
| 273 'HTMLBodyElement.text', | 274 'HTMLBodyElement.text', |
| 274 'HTMLBodyElement.text', | 275 'HTMLBodyElement.text', |
| 275 'HTMLBodyElement.vLink', | 276 'HTMLBodyElement.vLink', |
| 276 'HTMLDListElement.compact', | 277 'HTMLDListElement.compact', |
| 278 'HTMLDirectoryElement.*', |
| 277 'HTMLDivElement.align', | 279 'HTMLDivElement.align', |
| 278 'HTMLFormElement.get:elements', | 280 'HTMLFormElement.get:elements', |
| 279 'HTMLFrameElement.*', | 281 'HTMLFrameElement.*', |
| 280 'HTMLFrameSetElement.*', | 282 'HTMLFrameSetElement.*', |
| 281 'HTMLHRElement.align', | 283 'HTMLHRElement.align', |
| 282 'HTMLHRElement.noShade', | 284 'HTMLHRElement.noShade', |
| 283 'HTMLHRElement.size', | 285 'HTMLHRElement.size', |
| 284 'HTMLHRElement.width', | 286 'HTMLHRElement.width', |
| 285 'HTMLHeadElement.profile', | 287 'HTMLHeadElement.profile', |
| 286 'HTMLHeadingElement.align', | 288 'HTMLHeadingElement.align', |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 | 489 |
| 488 # We're looking for a sequence of letters which start with capital letter | 490 # We're looking for a sequence of letters which start with capital letter |
| 489 # then a series of caps and finishes with either the end of the string or | 491 # then a series of caps and finishes with either the end of the string or |
| 490 # a capital letter. | 492 # a capital letter. |
| 491 # The [0-9] check is for names such as 2D or 3D | 493 # The [0-9] check is for names such as 2D or 3D |
| 492 # The following test cases should match as: | 494 # The following test cases should match as: |
| 493 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 495 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
| 494 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 496 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
| 495 # IFrameElement: (I)()(F)rameElement (no change) | 497 # IFrameElement: (I)()(F)rameElement (no change) |
| 496 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 498 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
| OLD | NEW |