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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 'Document.getCSSCanvasContext', | 234 'Document.getCSSCanvasContext', |
235 'Document.head', | 235 'Document.head', |
236 'Document.lastModified', | 236 'Document.lastModified', |
237 'Document.preferredStylesheetSet', | 237 'Document.preferredStylesheetSet', |
238 'Document.referrer', | 238 'Document.referrer', |
239 'Document.selectedStylesheetSet', | 239 'Document.selectedStylesheetSet', |
240 'Document.styleSheets', | 240 'Document.styleSheets', |
241 'Document.title', | 241 'Document.title', |
242 'Document.webkitCancelFullScreen', | 242 'Document.webkitCancelFullScreen', |
243 'Document.webkitExitFullscreen', | 243 'Document.webkitExitFullscreen', |
| 244 # Not prefixed. |
244 'Document.webkitFullscreenElement', | 245 'Document.webkitFullscreenElement', |
245 'Document.webkitFullscreenEnabled', | 246 'Document.webkitFullscreenEnabled', |
246 'Document.webkitHidden', | 247 'Document.webkitHidden', |
247 'Document.webkitIsFullScreen', | 248 'Document.webkitIsFullScreen', |
248 'Document.webkitVisibilityState', | 249 'Document.webkitVisibilityState', |
| 250 # Not prefixed but requires custom implementation for cross-browser compatibi
lity. |
| 251 'Document.visibilityState', |
249 | 252 |
250 'Element.animate', | 253 'Element.animate', |
251 'Element.children', | 254 'Element.children', |
252 'Element.childElementCount', | 255 'Element.childElementCount', |
253 'Element.firstElementChild', | 256 'Element.firstElementChild', |
254 'Element.getElementsByTagName', | 257 'Element.getElementsByTagName', |
255 'Element.insertAdjacentHTML', | 258 'Element.insertAdjacentHTML', |
256 'Element.scrollIntoView', | 259 'Element.scrollIntoView', |
257 'Element.scrollIntoViewIfNeeded', | 260 'Element.scrollIntoViewIfNeeded', |
258 'Element.removeAttribute', | 261 'Element.removeAttribute', |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 # Members and classes from the dom that should be removed completely from | 505 # Members and classes from the dom that should be removed completely from |
503 # dart:html. These could be expressed in the IDL instead but expressing this | 506 # dart:html. These could be expressed in the IDL instead but expressing this |
504 # as a simple table instead is more concise. | 507 # as a simple table instead is more concise. |
505 # Syntax is: ClassName.(get\:|set\:|call\:|on\:)?MemberName | 508 # Syntax is: ClassName.(get\:|set\:|call\:|on\:)?MemberName |
506 # Using get: and set: is optional and should only be used when a getter needs | 509 # Using get: and set: is optional and should only be used when a getter needs |
507 # to be suppressed but not the setter, etc. | 510 # to be suppressed but not the setter, etc. |
508 # Prepending ClassName with = will only match against direct class, not for | 511 # Prepending ClassName with = will only match against direct class, not for |
509 # subclasses. | 512 # subclasses. |
510 # TODO(jacobr): cleanup and augment this list. | 513 # TODO(jacobr): cleanup and augment this list. |
511 removed_html_members = monitored.Set('htmlrenamer.removed_html_members', [ | 514 removed_html_members = monitored.Set('htmlrenamer.removed_html_members', [ |
| 515 'Attr.textContent', # Not needed as it is the same as Node.textContent. |
512 'AudioBufferSourceNode.looping', # TODO(vsm): Use deprecated IDL annotation | 516 'AudioBufferSourceNode.looping', # TODO(vsm): Use deprecated IDL annotation |
513 'CSSStyleDeclaration.getPropertyCSSValue', | 517 'CSSStyleDeclaration.getPropertyCSSValue', |
514 'CanvasRenderingContext2D.clearShadow', | 518 'CanvasRenderingContext2D.clearShadow', |
515 'CanvasRenderingContext2D.drawImageFromRect', | 519 'CanvasRenderingContext2D.drawImageFromRect', |
516 'CanvasRenderingContext2D.setAlpha', | 520 'CanvasRenderingContext2D.setAlpha', |
517 'CanvasRenderingContext2D.setCompositeOperation', | 521 'CanvasRenderingContext2D.setCompositeOperation', |
518 'CanvasRenderingContext2D.setFillColor', | 522 'CanvasRenderingContext2D.setFillColor', |
519 'CanvasRenderingContext2D.setLineCap', | 523 'CanvasRenderingContext2D.setLineCap', |
520 'CanvasRenderingContext2D.setLineJoin', | 524 'CanvasRenderingContext2D.setLineJoin', |
521 'CanvasRenderingContext2D.setLineWidth', | 525 'CanvasRenderingContext2D.setLineWidth', |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 | 1028 |
1025 # We're looking for a sequence of letters which start with capital letter | 1029 # We're looking for a sequence of letters which start with capital letter |
1026 # then a series of caps and finishes with either the end of the string or | 1030 # then a series of caps and finishes with either the end of the string or |
1027 # a capital letter. | 1031 # a capital letter. |
1028 # The [0-9] check is for names such as 2D or 3D | 1032 # The [0-9] check is for names such as 2D or 3D |
1029 # The following test cases should match as: | 1033 # The following test cases should match as: |
1030 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 1034 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
1031 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 1035 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
1032 # IFrameElement: (I)()(F)rameElement (no change) | 1036 # IFrameElement: (I)()(F)rameElement (no change) |
1033 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 1037 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
OLD | NEW |