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

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

Issue 14426006: Rename dart:typeddata to dart:typed_data. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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/systemhtml.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 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 if 'SVG' in interface.ext_attrs['Conditional']: 720 if 'SVG' in interface.ext_attrs['Conditional']:
721 return 'svg' 721 return 'svg'
722 if 'INDEXED_DATABASE' in interface.ext_attrs['Conditional']: 722 if 'INDEXED_DATABASE' in interface.ext_attrs['Conditional']:
723 return 'indexed_db' 723 return 'indexed_db'
724 if 'SQL_DATABASE' in interface.ext_attrs['Conditional']: 724 if 'SQL_DATABASE' in interface.ext_attrs['Conditional']:
725 return 'web_sql' 725 return 'web_sql'
726 if 'WEBGL' in interface.ext_attrs['Conditional']: 726 if 'WEBGL' in interface.ext_attrs['Conditional']:
727 return 'web_gl' 727 return 'web_gl'
728 728
729 if interface.id in typed_array_renames: 729 if interface.id in typed_array_renames:
730 return 'typeddata' 730 return 'typed_data'
731 731
732 return 'html' 732 return 'html'
733 733
734 def DartifyTypeName(self, type_name): 734 def DartifyTypeName(self, type_name):
735 """Converts a DOM name to a Dart-friendly class name. """ 735 """Converts a DOM name to a Dart-friendly class name. """
736 736
737 if type_name in html_interface_renames: 737 if type_name in html_interface_renames:
738 return html_interface_renames[type_name] 738 return html_interface_renames[type_name]
739 739
740 # Strip off any standard prefixes. 740 # Strip off any standard prefixes.
(...skipping 15 matching lines...) Expand all
756 756
757 # We're looking for a sequence of letters which start with capital letter 757 # We're looking for a sequence of letters which start with capital letter
758 # then a series of caps and finishes with either the end of the string or 758 # then a series of caps and finishes with either the end of the string or
759 # a capital letter. 759 # a capital letter.
760 # The [0-9] check is for names such as 2D or 3D 760 # The [0-9] check is for names such as 2D or 3D
761 # The following test cases should match as: 761 # The following test cases should match as:
762 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue 762 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue
763 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) 763 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change)
764 # IFrameElement: (I)()(F)rameElement (no change) 764 # IFrameElement: (I)()(F)rameElement (no change)
765 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) 765 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/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698