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

Unified Diff: sdk/lib/html/scripts/htmlrenamer.py

Issue 11434079: Adding dart:indexed_db. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Syncing with latest. Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/html/scripts/htmleventgenerator.py ('k') | sdk/lib/html/scripts/systemhtml.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/scripts/htmlrenamer.py
diff --git a/sdk/lib/html/scripts/htmlrenamer.py b/sdk/lib/html/scripts/htmlrenamer.py
index c55075bf105a95bc2a88d1161b9232777abc4b51..60d1e71f45ecb9701235a5d8776b543e1fe0f3c1 100644
--- a/sdk/lib/html/scripts/htmlrenamer.py
+++ b/sdk/lib/html/scripts/htmlrenamer.py
@@ -11,6 +11,7 @@ html_interface_renames = {
'DOMWindow': 'LocalWindow',
'History': 'LocalHistory',
'HTMLDocument' : 'HtmlDocument',
+ 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts.
'Location': 'LocalLocation',
'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts.
'SVGElement': 'SvgElement', # Manual to avoid name conflicts.
@@ -308,8 +309,10 @@ _removed_html_members = set([
"LocalWindow.get:length",
"LocalWindow.focus",
"LocalWindow.prompt",
+ "LocalWindow.webkitIndexedDB",
"LocalWindow.webkitCancelRequestAnimationFrame",
"WheelEvent.wheelDelta",
+ "WorkerContext.webkitIndexedDB",
])
class HtmlRenamer(object):
@@ -366,6 +369,8 @@ class HtmlRenamer(object):
return 'web_audio'
if 'SVG' in interface.ext_attrs['Conditional']:
return 'svg'
+ if 'INDEXED_DATABASE' in interface.ext_attrs['Conditional']:
+ return 'indexed_db'
return self._GetLibraryName(interface.id)
@@ -377,6 +382,8 @@ class HtmlRenamer(object):
"""
if idl_type_name.startswith('SVG'):
return 'svg'
+ if idl_type_name.startswith('IDB'):
+ return 'indexed_db'
return 'html'
@@ -384,12 +391,15 @@ class HtmlRenamer(object):
def DartifyTypeName(self, type_name):
"""Converts a DOM name to a Dart-friendly class name. """
library_name = self._GetLibraryName(type_name)
- # Only renaming SVG for now.
- if library_name != 'svg':
+ # Rename everything except html.
+ if library_name == 'html':
return type_name
- # Strip off the SVG prefix.
+ # Strip off any SVG prefix.
name = re.sub(r'^SVG', '', type_name)
+ # Strip off any IDB prefix.
+ name = re.sub(r'^IDB', '', name)
+
return self._CamelCaseName(name)
def _DartifyMemberName(self, member_name):
« no previous file with comments | « sdk/lib/html/scripts/htmleventgenerator.py ('k') | sdk/lib/html/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698