| 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 re | 5 import re |
| 6 | 6 |
| 7 html_interface_renames = { | 7 html_interface_renames = { |
| 8 'CDATASection': 'CDataSection', | 8 'CDATASection': 'CDataSection', |
| 9 'DOMApplicationCache': 'ApplicationCache', | 9 'DOMApplicationCache': 'ApplicationCache', |
| 10 'DOMCoreException': 'DomException', | 10 'DOMCoreException': 'DomException', |
| 11 'DOMFileSystem': 'FileSystem', | 11 'DOMFileSystem': 'FileSystem', |
| 12 'DOMFileSystemSync': 'FileSystemSync', | 12 'DOMFileSystemSync': 'FileSystemSync', |
| 13 'DOMFormData': 'FormData', | 13 'DOMFormData': 'FormData', |
| 14 'DOMURL': 'Url', | 14 'DOMURL': 'Url', |
| 15 'DOMWindow': 'Window', | 15 'DOMWindow': 'Window', |
| 16 'HTMLDocument' : 'HtmlDocument', | 16 'HTMLDocument' : 'HtmlDocument', |
| 17 'IDBAny': '_Any', # Suppressed, but needs to exist for Dartium. | 17 'IDBAny': '_Any', # Suppressed, but needs to exist for Dartium. |
| 18 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts. | 18 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts. |
| 19 'NavigatorUserMediaErrorCallback': '_NavigatorUserMediaErrorCallback', |
| 20 'NavigatorUserMediaSuccessCallback': '_NavigatorUserMediaSuccessCallback', |
| 19 'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts. | 21 'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts. |
| 20 'SVGElement': 'SvgElement', # Manual to avoid name conflicts. | 22 'SVGElement': 'SvgElement', # Manual to avoid name conflicts. |
| 21 'SVGException': 'SvgException', # Manual of avoid conflict with Exception. | 23 'SVGException': 'SvgException', # Manual of avoid conflict with Exception. |
| 22 'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts. | 24 'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts. |
| 23 'WebGLVertexArrayObjectOES': 'WebGLVertexArrayObject', | 25 'WebGLVertexArrayObjectOES': 'WebGLVertexArrayObject', |
| 24 'WebKitAnimation': 'Animation', | 26 'WebKitAnimation': 'Animation', |
| 25 'WebKitAnimationEvent': 'AnimationEvent', | 27 'WebKitAnimationEvent': 'AnimationEvent', |
| 26 'WebKitBlobBuilder': 'BlobBuilder', | 28 'WebKitBlobBuilder': 'BlobBuilder', |
| 27 'WebKitCSSKeyframeRule': 'CssKeyframeRule', | 29 'WebKitCSSKeyframeRule': 'CssKeyframeRule', |
| 28 'WebKitCSSKeyframesRule': 'CssKeyframesRule', | 30 'WebKitCSSKeyframesRule': 'CssKeyframesRule', |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 138 |
| 137 # Members from the standard dom that exist in the dart:html library with | 139 # Members from the standard dom that exist in the dart:html library with |
| 138 # identical functionality but with cleaner names. | 140 # identical functionality but with cleaner names. |
| 139 _renamed_html_members = { | 141 _renamed_html_members = { |
| 140 'AnimatedString.className': '$dom_svgClassName', | 142 'AnimatedString.className': '$dom_svgClassName', |
| 141 'Document.createCDATASection': 'createCDataSection', | 143 'Document.createCDATASection': 'createCDataSection', |
| 142 'Document.defaultView': 'window', | 144 'Document.defaultView': 'window', |
| 143 'Element.scrollIntoViewIfNeeded': 'scrollIntoView', | 145 'Element.scrollIntoViewIfNeeded': 'scrollIntoView', |
| 144 'Element.webkitCreateShadowRoot': 'createShadowRoot', | 146 'Element.webkitCreateShadowRoot': 'createShadowRoot', |
| 145 'Element.webkitMatchesSelector' : 'matches', | 147 'Element.webkitMatchesSelector' : 'matches', |
| 148 'Navigator.webkitGetUserMedia': '_getUserMedia', |
| 146 'Node.cloneNode': 'clone', | 149 'Node.cloneNode': 'clone', |
| 147 'Node.nextSibling': 'nextNode', | 150 'Node.nextSibling': 'nextNode', |
| 148 'Node.ownerDocument': 'document', | 151 'Node.ownerDocument': 'document', |
| 149 'Node.parentElement': 'parent', | 152 'Node.parentElement': 'parent', |
| 150 'Node.previousSibling': 'previousNode', | 153 'Node.previousSibling': 'previousNode', |
| 151 'Node.textContent': 'text', | 154 'Node.textContent': 'text', |
| 152 'Stylable.className': '$dom_svgClassName', | 155 'Stylable.className': '$dom_svgClassName', |
| 153 'SvgElement.className': '$dom_svgClassName', | 156 'SvgElement.className': '$dom_svgClassName', |
| 154 'Url.createObjectURL': 'createObjectUrl', | 157 'Url.createObjectURL': 'createObjectUrl', |
| 155 'Url.revokeObjectURL': 'revokeObjectUrl', | 158 'Url.revokeObjectURL': 'revokeObjectUrl', |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 | 504 |
| 502 # We're looking for a sequence of letters which start with capital letter | 505 # We're looking for a sequence of letters which start with capital letter |
| 503 # then a series of caps and finishes with either the end of the string or | 506 # then a series of caps and finishes with either the end of the string or |
| 504 # a capital letter. | 507 # a capital letter. |
| 505 # The [0-9] check is for names such as 2D or 3D | 508 # The [0-9] check is for names such as 2D or 3D |
| 506 # The following test cases should match as: | 509 # The following test cases should match as: |
| 507 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 510 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
| 508 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 511 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
| 509 # IFrameElement: (I)()(F)rameElement (no change) | 512 # IFrameElement: (I)()(F)rameElement (no change) |
| 510 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 513 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
| OLD | NEW |