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', |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 'Node.cloneNode': 'clone', | 146 'Node.cloneNode': 'clone', |
147 'Node.nextSibling': 'nextNode', | 147 'Node.nextSibling': 'nextNode', |
148 'Node.ownerDocument': 'document', | 148 'Node.ownerDocument': 'document', |
149 'Node.parentElement': 'parent', | 149 'Node.parentElement': 'parent', |
150 'Node.previousSibling': 'previousNode', | 150 'Node.previousSibling': 'previousNode', |
151 'Node.textContent': 'text', | 151 'Node.textContent': 'text', |
152 'Stylable.className': '$dom_svgClassName', | 152 'Stylable.className': '$dom_svgClassName', |
153 'SvgElement.className': '$dom_svgClassName', | 153 'SvgElement.className': '$dom_svgClassName', |
154 'Url.createObjectURL': 'createObjectUrl', | 154 'Url.createObjectURL': 'createObjectUrl', |
155 'Url.revokeObjectURL': 'revokeObjectUrl', | 155 'Url.revokeObjectURL': 'revokeObjectUrl', |
| 156 'Window.webkitRequestFileSystem': 'requestFileSystem', |
| 157 'Window.webkitResolveLocalFileSystemURL': 'resolveLocalFileSystemUrl', |
| 158 'WorkerContext.webkitRequestFileSystem': 'requestFileSystem', |
| 159 'WorkerContext.webkitRequestFileSystemSync': 'requestFileSystemSync', |
| 160 'WorkerContext.webkitResolveLocalFileSystemSyncURL': |
| 161 'resolveLocalFileSystemSyncUrl', |
| 162 'WorkerContext.webkitResolveLocalFileSystemURL': |
| 163 'resolveLocalFileSystemUrl', |
156 } | 164 } |
157 | 165 |
158 # Members and classes from the dom that should be removed completely from | 166 # Members and classes from the dom that should be removed completely from |
159 # dart:html. These could be expressed in the IDL instead but expressing this | 167 # dart:html. These could be expressed in the IDL instead but expressing this |
160 # as a simple table instead is more concise. | 168 # as a simple table instead is more concise. |
161 # Syntax is: ClassName.(get\.|set\.)?MemberName | 169 # Syntax is: ClassName.(get\.|set\.)?MemberName |
162 # Using get: and set: is optional and should only be used when a getter needs | 170 # Using get: and set: is optional and should only be used when a getter needs |
163 # to be suppressed but not the setter, etc. | 171 # to be suppressed but not the setter, etc. |
164 # TODO(jacobr): cleanup and augment this list. | 172 # TODO(jacobr): cleanup and augment this list. |
165 _removed_html_members = set([ | 173 _removed_html_members = set([ |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 | 509 |
502 # We're looking for a sequence of letters which start with capital letter | 510 # 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 | 511 # then a series of caps and finishes with either the end of the string or |
504 # a capital letter. | 512 # a capital letter. |
505 # The [0-9] check is for names such as 2D or 3D | 513 # The [0-9] check is for names such as 2D or 3D |
506 # The following test cases should match as: | 514 # The following test cases should match as: |
507 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 515 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
508 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 516 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
509 # IFrameElement: (I)()(F)rameElement (no change) | 517 # IFrameElement: (I)()(F)rameElement (no change) |
510 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 518 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
OLD | NEW |