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

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

Issue 11419300: Dartifying dart:html type names. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Unminifying & fixing Stephen's feedback. 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/dart2js/html_dart2js.dart ('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 60d1e71f45ecb9701235a5d8776b543e1fe0f3c1..89a9389c9135c2d8182029d9177b5c7ba444c2b9 100644
--- a/sdk/lib/html/scripts/htmlrenamer.py
+++ b/sdk/lib/html/scripts/htmlrenamer.py
@@ -5,7 +5,11 @@
import re
html_interface_renames = {
- 'DOMCoreException': 'DOMException',
+ 'CDATASection': 'CDataSection',
+ 'DOMApplicationCache': 'ApplicationCache',
+ 'DOMCoreException': 'DomException',
+ 'DOMFileSystem': 'FileSystem',
+ 'DOMFileSystemSync': 'FileSystemSync',
'DOMFormData': 'FormData',
'DOMURL': 'Url',
'DOMWindow': 'LocalWindow',
@@ -17,13 +21,14 @@ html_interface_renames = {
'SVGElement': 'SvgElement', # Manual to avoid name conflicts.
'SVGException': 'SvgException', # Manual of avoid conflict with Exception.
'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts.
+ 'WebGLVertexArrayObjectOES': 'WebGLVertexArrayObject',
'WebKitAnimation': 'Animation',
'WebKitAnimationEvent': 'AnimationEvent',
'WebKitBlobBuilder': 'BlobBuilder',
- 'WebKitCSSKeyframeRule': 'CSSKeyframeRule',
- 'WebKitCSSKeyframesRule': 'CSSKeyframesRule',
- 'WebKitCSSMatrix': 'CSSMatrix',
- 'WebKitCSSTransformValue': 'CSSTransformValue',
+ 'WebKitCSSKeyframeRule': 'CssKeyframeRule',
+ 'WebKitCSSKeyframesRule': 'CssKeyframesRule',
+ 'WebKitCSSMatrix': 'CssMatrix',
+ 'WebKitCSSTransformValue': 'CssTransformValue',
'WebKitFlags': 'Flags',
'WebKitLoseContext': 'LoseContext',
'WebKitPoint': 'Point',
@@ -382,6 +387,7 @@ class HtmlRenamer(object):
"""
if idl_type_name.startswith('SVG'):
return 'svg'
+
if idl_type_name.startswith('IDB'):
return 'indexed_db'
@@ -391,13 +397,9 @@ class HtmlRenamer(object):
def DartifyTypeName(self, type_name):
"""Converts a DOM name to a Dart-friendly class name. """
library_name = self._GetLibraryName(type_name)
- # Rename everything except html.
- if library_name == 'html':
- return type_name
- # Strip off any SVG prefix.
+ # Strip off any standard prefixes.
name = re.sub(r'^SVG', '', type_name)
- # Strip off any IDB prefix.
name = re.sub(r'^IDB', '', name)
return self._CamelCaseName(name)
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/html/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698