Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1236)

Side by Side Diff: tools/dom/scripts/htmlrenamer.py

Issue 150783005: Fixes for 1750 roll (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More fixes for 1750 Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/dom/scripts/generator.py ('k') | tools/dom/scripts/systemnative.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 'SVGMissingGlyphElement', 121 'SVGMissingGlyphElement',
122 'SVGTRefElement', 122 'SVGTRefElement',
123 'SVGVKernElement', 123 'SVGVKernElement',
124 'SharedWorker', # Workers 124 'SharedWorker', # Workers
125 'SubtleCrypto', 125 'SubtleCrypto',
126 'WebKitCSSFilterValue', 126 'WebKitCSSFilterValue',
127 'WebKitCSSMatrix', 127 'WebKitCSSMatrix',
128 'WebKitCSSMixFunctionValue', 128 'WebKitCSSMixFunctionValue',
129 'WebKitCSSTransformValue', 129 'WebKitCSSTransformValue',
130 'WebKitMediaSource', 130 'WebKitMediaSource',
131 'WebKitNotification',
131 'WebKitSourceBuffer', 132 'WebKitSourceBuffer',
132 'WebKitSourceBufferList', 133 'WebKitSourceBufferList',
133 'WorkerLocation', # Workers 134 'WorkerLocation', # Workers
134 'WorkerNavigator', # Workers 135 'WorkerNavigator', # Workers
135 'XMLHttpRequestProgressEvent', 136 'XMLHttpRequestProgressEvent',
136 ] 137 ]
137 138
138 for interface in _removed_html_interfaces: 139 for interface in _removed_html_interfaces:
139 html_interface_renames[interface] = '_' + interface 140 html_interface_renames[interface] = '_' + interface
140 141
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 'Element.removeAttributeNode', 597 'Element.removeAttributeNode',
597 'Element.set:outerHTML', 598 'Element.set:outerHTML',
598 'Element.setAttributeNode', 599 'Element.setAttributeNode',
599 'Element.setAttributeNodeNS', 600 'Element.setAttributeNodeNS',
600 'Element.webkitCreateShadowRoot', 601 'Element.webkitCreateShadowRoot',
601 'Element.webkitPseudo', 602 'Element.webkitPseudo',
602 'Element.webkitShadowRoot', 603 'Element.webkitShadowRoot',
603 '=Event.returnValue', # Only suppress on Event, allow for BeforeUnloadEvnt. 604 '=Event.returnValue', # Only suppress on Event, allow for BeforeUnloadEvnt.
604 'Event.srcElement', 605 'Event.srcElement',
605 'EventSource.URL', 606 'EventSource.URL',
607 'FontFace.ready',
606 'FontFaceSet.load', 608 'FontFaceSet.load',
607 'FontFaceSet.ready', 609 'FontFaceSet.ready',
608 'HTMLAnchorElement.charset', 610 'HTMLAnchorElement.charset',
609 'HTMLAnchorElement.coords', 611 'HTMLAnchorElement.coords',
610 'HTMLAnchorElement.rev', 612 'HTMLAnchorElement.rev',
611 'HTMLAnchorElement.shape', 613 'HTMLAnchorElement.shape',
612 'HTMLAnchorElement.text', 614 'HTMLAnchorElement.text',
613 'HTMLAppletElement.*', 615 'HTMLAppletElement.*',
614 'HTMLAreaElement.noHref', 616 'HTMLAreaElement.noHref',
615 'HTMLBRElement.clear', 617 'HTMLBRElement.clear',
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 """ 808 """
807 interface = self._database.GetInterface(interface_name) 809 interface = self._database.GetInterface(interface_name)
808 810
809 if not member: 811 if not member:
810 if 'ImplementedAs' in member_node.ext_attrs: 812 if 'ImplementedAs' in member_node.ext_attrs:
811 member = member_node.ext_attrs['ImplementedAs'] 813 member = member_node.ext_attrs['ImplementedAs']
812 814
813 if self.ShouldSuppressMember(interface, member, member_prefix): 815 if self.ShouldSuppressMember(interface, member, member_prefix):
814 return None 816 return None
815 817
816 if 'CheckSecurityForNode' in member_node.ext_attrs: 818 if 'CheckSecurity' in member_node.ext_attrs:
817 return None 819 return None
818 820
819 name = self._FindMatch(interface, member, member_prefix, 821 name = self._FindMatch(interface, member, member_prefix,
820 renamed_html_members) 822 renamed_html_members)
821 823
822 target_name = renamed_html_members[name] if name else member 824 target_name = renamed_html_members[name] if name else member
823 if self._FindMatch(interface, member, member_prefix, private_html_members): 825 if self._FindMatch(interface, member, member_prefix, private_html_members):
824 if not target_name.startswith('_'): # e.g. _svgClassName 826 if not target_name.startswith('_'): # e.g. _svgClassName
825 target_name = '_' + target_name 827 target_name = '_' + target_name
826 828
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 963
962 # We're looking for a sequence of letters which start with capital letter 964 # We're looking for a sequence of letters which start with capital letter
963 # then a series of caps and finishes with either the end of the string or 965 # then a series of caps and finishes with either the end of the string or
964 # a capital letter. 966 # a capital letter.
965 # The [0-9] check is for names such as 2D or 3D 967 # The [0-9] check is for names such as 2D or 3D
966 # The following test cases should match as: 968 # The following test cases should match as:
967 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue 969 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue
968 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) 970 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change)
969 # IFrameElement: (I)()(F)rameElement (no change) 971 # IFrameElement: (I)()(F)rameElement (no change)
970 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) 972 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name)
OLDNEW
« no previous file with comments | « tools/dom/scripts/generator.py ('k') | tools/dom/scripts/systemnative.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698