| 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 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 | 855 |
| 856 def ShouldSuppressMember(self, interface, member, member_prefix=''): | 856 def ShouldSuppressMember(self, interface, member, member_prefix=''): |
| 857 """ Returns true if the member should be suppressed.""" | 857 """ Returns true if the member should be suppressed.""" |
| 858 if self._FindMatch(interface, member, member_prefix, removed_html_members): | 858 if self._FindMatch(interface, member, member_prefix, removed_html_members): |
| 859 return True | 859 return True |
| 860 if interface.id in _removed_html_interfaces: | 860 if interface.id in _removed_html_interfaces: |
| 861 return True | 861 return True |
| 862 metadata_member = member | 862 metadata_member = member |
| 863 if member_prefix == 'on:': | 863 if member_prefix == 'on:': |
| 864 metadata_member = 'on' + metadata_member.lower() | 864 metadata_member = 'on' + metadata_member.lower() |
| 865 if self._metadata.IsDeprecated(interface, metadata_member): | 865 if self._metadata.IsSuppressed(interface, metadata_member): |
| 866 return True | 866 return True |
| 867 return False | 867 return False |
| 868 | 868 |
| 869 def ShouldSuppressInterface(self, interface): | 869 def ShouldSuppressInterface(self, interface): |
| 870 """ Returns true if the interface should be suppressed.""" | 870 """ Returns true if the interface should be suppressed.""" |
| 871 if interface.id in _removed_html_interfaces: | 871 if interface.id in _removed_html_interfaces: |
| 872 return True | 872 return True |
| 873 | 873 |
| 874 def _FindMatch(self, interface, member, member_prefix, candidates): | 874 def _FindMatch(self, interface, member, member_prefix, candidates): |
| 875 def find_match(interface_id): | 875 def find_match(interface_id): |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 982 | 982 |
| 983 # We're looking for a sequence of letters which start with capital letter | 983 # We're looking for a sequence of letters which start with capital letter |
| 984 # then a series of caps and finishes with either the end of the string or | 984 # then a series of caps and finishes with either the end of the string or |
| 985 # a capital letter. | 985 # a capital letter. |
| 986 # The [0-9] check is for names such as 2D or 3D | 986 # The [0-9] check is for names such as 2D or 3D |
| 987 # The following test cases should match as: | 987 # The following test cases should match as: |
| 988 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 988 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
| 989 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 989 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
| 990 # IFrameElement: (I)()(F)rameElement (no change) | 990 # IFrameElement: (I)()(F)rameElement (no change) |
| 991 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 991 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
| OLD | NEW |