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

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

Issue 14232015: Regenerated to put SQL database back. (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 | « sdk/lib/web_sql/dartium/web_sql_dartium.dart ('k') | 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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 'WheelEvent.wheelDelta', 610 'WheelEvent.wheelDelta',
611 'WorkerContext.webkitIndexedDB', 611 'WorkerContext.webkitIndexedDB',
612 # TODO(jacobr): should these be removed? 612 # TODO(jacobr): should these be removed?
613 'Document.close', 613 'Document.close',
614 'Document.hasFocus', 614 'Document.hasFocus',
615 ]) 615 ])
616 616
617 # Manual dart: library name lookup. 617 # Manual dart: library name lookup.
618 _library_names = monitored.Dict('htmlrenamer._library_names', { 618 _library_names = monitored.Dict('htmlrenamer._library_names', {
619 'DOMWindow': 'html', 619 'DOMWindow': 'html',
620 'Database': 'web_sql',
620 'Navigator': 'html', 621 'Navigator': 'html',
621 'WorkerContext': 'html', 622 'WorkerContext': 'html',
622 }) 623 })
623 624
624 class HtmlRenamer(object): 625 class HtmlRenamer(object):
625 def __init__(self, database): 626 def __init__(self, database):
626 self._database = database 627 self._database = database
627 628
628 def RenameInterface(self, interface): 629 def RenameInterface(self, interface):
629 if 'Callback' in interface.ext_attrs: 630 if 'Callback' in interface.ext_attrs:
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 698
698 def GetLibraryName(self, interface): 699 def GetLibraryName(self, interface):
699 # Some types have attributes merged in from many other interfaces. 700 # Some types have attributes merged in from many other interfaces.
700 if interface.id in _library_names: 701 if interface.id in _library_names:
701 return _library_names[interface.id] 702 return _library_names[interface.id]
702 703
703 # TODO(ager, blois): The conditional has been removed from indexed db, 704 # TODO(ager, blois): The conditional has been removed from indexed db,
704 # so we can no longer determine the library based on the conditionals. 705 # so we can no longer determine the library based on the conditionals.
705 if interface.id.startswith("IDB"): 706 if interface.id.startswith("IDB"):
706 return 'indexed_db' 707 return 'indexed_db'
708 if interface.id.startswith("SQL"):
709 return 'web_sql'
707 710
708 if 'Conditional' in interface.ext_attrs: 711 if 'Conditional' in interface.ext_attrs:
709 if 'WEB_AUDIO' in interface.ext_attrs['Conditional']: 712 if 'WEB_AUDIO' in interface.ext_attrs['Conditional']:
710 return 'web_audio' 713 return 'web_audio'
711 if 'SVG' in interface.ext_attrs['Conditional']: 714 if 'SVG' in interface.ext_attrs['Conditional']:
712 return 'svg' 715 return 'svg'
713 if 'INDEXED_DATABASE' in interface.ext_attrs['Conditional']: 716 if 'INDEXED_DATABASE' in interface.ext_attrs['Conditional']:
714 return 'indexed_db' 717 return 'indexed_db'
715 if 'SQL_DATABASE' in interface.ext_attrs['Conditional']: 718 if 'SQL_DATABASE' in interface.ext_attrs['Conditional']:
716 return 'web_sql' 719 return 'web_sql'
(...skipping 27 matching lines...) Expand all
744 747
745 # We're looking for a sequence of letters which start with capital letter 748 # We're looking for a sequence of letters which start with capital letter
746 # then a series of caps and finishes with either the end of the string or 749 # then a series of caps and finishes with either the end of the string or
747 # a capital letter. 750 # a capital letter.
748 # The [0-9] check is for names such as 2D or 3D 751 # The [0-9] check is for names such as 2D or 3D
749 # The following test cases should match as: 752 # The following test cases should match as:
750 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue 753 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue
751 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) 754 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change)
752 # IFrameElement: (I)()(F)rameElement (no change) 755 # IFrameElement: (I)()(F)rameElement (no change)
753 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) 756 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name)
OLDNEW
« no previous file with comments | « sdk/lib/web_sql/dartium/web_sql_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698