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

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

Issue 14014004: Use name to sort IDB interfaces into the indexed_db library. (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 | « no previous file | no next file » | 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 html_interface_renames = monitored.Dict('htmlrenamer.html_interface_renames', { 9 html_interface_renames = monitored.Dict('htmlrenamer.html_interface_renames', {
10 'CDATASection': 'CDataSection', 10 'CDATASection': 'CDataSection',
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 return member_name 697 return member_name
698 member_name = interface.id + '.*' 698 member_name = interface.id + '.*'
699 if member_name in candidates: 699 if member_name in candidates:
700 return member_name 700 return member_name
701 701
702 def GetLibraryName(self, interface): 702 def GetLibraryName(self, interface):
703 # Some types have attributes merged in from many other interfaces. 703 # Some types have attributes merged in from many other interfaces.
704 if interface.id in _library_names: 704 if interface.id in _library_names:
705 return _library_names[interface.id] 705 return _library_names[interface.id]
706 706
707 # TODO(ager, blois): The conditional has been removed from indexed db,
708 # so we can no longer determine the library based on the conditionals.
709 if interface.id.startswith("IDB"):
blois 2013/04/10 15:45:13 Ugh. I imagine this is going to happen soon for ot
Mads Ager (google) 2013/04/10 16:10:04 Yes, I would expect that too. This one is easy bas
710 return 'indexed_db'
711
707 if 'Conditional' in interface.ext_attrs: 712 if 'Conditional' in interface.ext_attrs:
708 if 'WEB_AUDIO' in interface.ext_attrs['Conditional']: 713 if 'WEB_AUDIO' in interface.ext_attrs['Conditional']:
709 return 'web_audio' 714 return 'web_audio'
710 if 'SVG' in interface.ext_attrs['Conditional']: 715 if 'SVG' in interface.ext_attrs['Conditional']:
711 return 'svg' 716 return 'svg'
712 if 'INDEXED_DATABASE' in interface.ext_attrs['Conditional']: 717 if 'INDEXED_DATABASE' in interface.ext_attrs['Conditional']:
713 return 'indexed_db' 718 return 'indexed_db'
714 if 'SQL_DATABASE' in interface.ext_attrs['Conditional']: 719 if 'SQL_DATABASE' in interface.ext_attrs['Conditional']:
715 return 'web_sql' 720 return 'web_sql'
716 if 'WEBGL' in interface.ext_attrs['Conditional']: 721 if 'WEBGL' in interface.ext_attrs['Conditional']:
(...skipping 26 matching lines...) Expand all
743 748
744 # We're looking for a sequence of letters which start with capital letter 749 # We're looking for a sequence of letters which start with capital letter
745 # then a series of caps and finishes with either the end of the string or 750 # then a series of caps and finishes with either the end of the string or
746 # a capital letter. 751 # a capital letter.
747 # The [0-9] check is for names such as 2D or 3D 752 # The [0-9] check is for names such as 2D or 3D
748 # The following test cases should match as: 753 # The following test cases should match as:
749 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue 754 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue
750 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) 755 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change)
751 # IFrameElement: (I)()(F)rameElement (no change) 756 # IFrameElement: (I)()(F)rameElement (no change)
752 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) 757 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698