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 typed_array_renames = { | 9 typed_array_renames = { |
10 'ArrayBuffer': 'ByteBuffer', | 10 'ArrayBuffer': 'ByteBuffer', |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 154 |
155 # "Private" members in the form $dom_foo. | 155 # "Private" members in the form $dom_foo. |
156 # TODO(efortuna): Remove this set. This allows us to make the change of removing | 156 # TODO(efortuna): Remove this set. This allows us to make the change of removing |
157 # $dom in installments instead of all at once, but the intent is to move all of | 157 # $dom in installments instead of all at once, but the intent is to move all of |
158 # these either into private_html_members or remove them from this list entirely. | 158 # these either into private_html_members or remove them from this list entirely. |
159 dom_private_html_members = monitored.Set('htmlrenamer.private_html_members', [ | 159 dom_private_html_members = monitored.Set('htmlrenamer.private_html_members', [ |
160 'EventTarget.addEventListener', | 160 'EventTarget.addEventListener', |
161 'EventTarget.removeEventListener', | 161 'EventTarget.removeEventListener', |
162 ]) | 162 ]) |
163 | 163 |
| 164 # Classes where we have customized constructors, but we need to keep the old |
| 165 # constructor for dispatch purposes. |
| 166 custom_html_constructors = monitored.Set( |
| 167 'htmlrenamer.custom_html_constructors', [ |
| 168 'HTMLOptionElement', |
| 169 ]) |
| 170 |
164 # Members from the standard dom that should not be exposed publicly in dart:html | 171 # Members from the standard dom that should not be exposed publicly in dart:html |
165 # but need to be exposed internally to implement dart:html on top of a standard | 172 # but need to be exposed internally to implement dart:html on top of a standard |
166 # browser. They are exposed simply by placing an underscore in front of the | 173 # browser. They are exposed simply by placing an underscore in front of the |
167 # name. | 174 # name. |
168 private_html_members = monitored.Set('htmlrenamer.private_html_members', [ | 175 private_html_members = monitored.Set('htmlrenamer.private_html_members', [ |
169 'AudioNode.connect', | 176 'AudioNode.connect', |
170 'CanvasRenderingContext2D.arc', | 177 'CanvasRenderingContext2D.arc', |
171 'CanvasRenderingContext2D.drawImage', | 178 'CanvasRenderingContext2D.drawImage', |
172 'CompositionEvent.initCompositionEvent', | 179 'CompositionEvent.initCompositionEvent', |
173 'CustomEvent.initCustomEvent', | 180 'CustomEvent.initCustomEvent', |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
895 | 902 |
896 # We're looking for a sequence of letters which start with capital letter | 903 # We're looking for a sequence of letters which start with capital letter |
897 # then a series of caps and finishes with either the end of the string or | 904 # then a series of caps and finishes with either the end of the string or |
898 # a capital letter. | 905 # a capital letter. |
899 # The [0-9] check is for names such as 2D or 3D | 906 # The [0-9] check is for names such as 2D or 3D |
900 # The following test cases should match as: | 907 # The following test cases should match as: |
901 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 908 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
902 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 909 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
903 # IFrameElement: (I)()(F)rameElement (no change) | 910 # IFrameElement: (I)()(F)rameElement (no change) |
904 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 911 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
OLD | NEW |