| 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 | 357 |
| 358 # Members and classes from the dom that should be removed completely from | 358 # Members and classes from the dom that should be removed completely from |
| 359 # dart:html. These could be expressed in the IDL instead but expressing this | 359 # dart:html. These could be expressed in the IDL instead but expressing this |
| 360 # as a simple table instead is more concise. | 360 # as a simple table instead is more concise. |
| 361 # Syntax is: ClassName.(get\:|set\:|call\:|on\:)?MemberName | 361 # Syntax is: ClassName.(get\:|set\:|call\:|on\:)?MemberName |
| 362 # Using get: and set: is optional and should only be used when a getter needs | 362 # Using get: and set: is optional and should only be used when a getter needs |
| 363 # to be suppressed but not the setter, etc. | 363 # to be suppressed but not the setter, etc. |
| 364 # TODO(jacobr): cleanup and augment this list. | 364 # TODO(jacobr): cleanup and augment this list. |
| 365 _removed_html_members = monitored.Set('htmlrenamer._removed_html_members', [ | 365 _removed_html_members = monitored.Set('htmlrenamer._removed_html_members', [ |
| 366 'Attr.*', | 366 'Attr.*', |
| 367 'AudioBufferSourceNode.looping', # TODO(vsm): Use deprecated IDL annotation | |
| 368 'CSSStyleDeclaration.getPropertyCSSValue', | 367 'CSSStyleDeclaration.getPropertyCSSValue', |
| 369 'CanvasRenderingContext2D.clearShadow', | 368 'CanvasRenderingContext2D.clearShadow', |
| 370 'CanvasRenderingContext2D.drawImageFromRect', | 369 'CanvasRenderingContext2D.drawImageFromRect', |
| 371 'CanvasRenderingContext2D.setAlpha', | 370 'CanvasRenderingContext2D.setAlpha', |
| 372 'CanvasRenderingContext2D.setCompositeOperation', | 371 'CanvasRenderingContext2D.setCompositeOperation', |
| 373 'CanvasRenderingContext2D.setFillColor', | 372 'CanvasRenderingContext2D.setFillColor', |
| 374 'CanvasRenderingContext2D.setLineCap', | 373 'CanvasRenderingContext2D.setLineCap', |
| 375 'CanvasRenderingContext2D.setLineJoin', | 374 'CanvasRenderingContext2D.setLineJoin', |
| 376 'CanvasRenderingContext2D.setLineWidth', | 375 'CanvasRenderingContext2D.setLineWidth', |
| 377 'CanvasRenderingContext2D.setMiterLimit', | 376 'CanvasRenderingContext2D.setMiterLimit', |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 'Node.isSameNode', | 607 'Node.isSameNode', |
| 609 'Node.isSupported', | 608 'Node.isSupported', |
| 610 'Node.lookupNamespaceURI', | 609 'Node.lookupNamespaceURI', |
| 611 'Node.lookupPrefix', | 610 'Node.lookupPrefix', |
| 612 'Node.normalize', | 611 'Node.normalize', |
| 613 'Node.set:nodeValue', | 612 'Node.set:nodeValue', |
| 614 'NodeFilter.acceptNode', | 613 'NodeFilter.acceptNode', |
| 615 'NodeIterator.expandEntityReferences', | 614 'NodeIterator.expandEntityReferences', |
| 616 'NodeIterator.filter', | 615 'NodeIterator.filter', |
| 617 'NodeList.item', | 616 'NodeList.item', |
| 618 'Performance.webkitClearMarks', | |
| 619 'Performance.webkitClearMeasures', | |
| 620 'Performance.webkitGetEntries', | |
| 621 'Performance.webkitGetEntriesByName', | |
| 622 'Performance.webkitGetEntriesByType', | |
| 623 'Performance.webkitMark', | |
| 624 'Performance.webkitMeasure', | |
| 625 'ShadowRoot.getElementsByTagNameNS', | 617 'ShadowRoot.getElementsByTagNameNS', |
| 626 'SVGStyledElement.getPresentationAttribute', | 618 'SVGStyledElement.getPresentationAttribute', |
| 627 'WheelEvent.wheelDelta', | 619 'WheelEvent.wheelDelta', |
| 628 'WorkerContext.webkitIndexedDB', | 620 'WorkerContext.webkitIndexedDB', |
| 629 # TODO(jacobr): should these be removed? | 621 # TODO(jacobr): should these be removed? |
| 630 'Document.close', | 622 'Document.close', |
| 631 'Document.hasFocus', | 623 'Document.hasFocus', |
| 632 ]) | 624 ]) |
| 633 | 625 |
| 634 # Manual dart: library name lookup. | 626 # Manual dart: library name lookup. |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 | 760 |
| 769 # We're looking for a sequence of letters which start with capital letter | 761 # We're looking for a sequence of letters which start with capital letter |
| 770 # then a series of caps and finishes with either the end of the string or | 762 # then a series of caps and finishes with either the end of the string or |
| 771 # a capital letter. | 763 # a capital letter. |
| 772 # The [0-9] check is for names such as 2D or 3D | 764 # The [0-9] check is for names such as 2D or 3D |
| 773 # The following test cases should match as: | 765 # The following test cases should match as: |
| 774 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 766 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
| 775 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 767 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
| 776 # IFrameElement: (I)()(F)rameElement (no change) | 768 # IFrameElement: (I)()(F)rameElement (no change) |
| 777 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 769 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
| OLD | NEW |