Chromium Code Reviews| Index: sdk/lib/html/scripts/htmlrenamer.py |
| diff --git a/sdk/lib/html/scripts/htmlrenamer.py b/sdk/lib/html/scripts/htmlrenamer.py |
| index 9c43084c8a516ff39cbfbb2a5deb6e99eb3b9fb6..38e678813d846a2e7c22a31f61f9efc6c154159b 100644 |
| --- a/sdk/lib/html/scripts/htmlrenamer.py |
| +++ b/sdk/lib/html/scripts/htmlrenamer.py |
| @@ -5,24 +5,30 @@ |
| import re |
| html_interface_renames = { |
| - 'DOMCoreException': 'DOMException', |
| + 'CDATASection': 'CDataSection', |
| + 'DOMApplicationCache': 'ApplicationCache', |
| + 'DOMCoreException': 'DomException', |
| + 'DOMFileSystem': 'FileSystem', |
| + 'DOMFileSystemSync': 'FileSystemSync', |
| 'DOMFormData': 'FormData', |
| 'DOMURL': 'Url', |
| '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. |
| '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', |
| @@ -305,8 +311,10 @@ _removed_html_members = set([ |
| "LocalWindow.get:length", |
| "LocalWindow.focus", |
| "LocalWindow.prompt", |
| + "LocalWindow.webkitIndexedDB", |
| "LocalWindow.webkitCancelRequestAnimationFrame", |
| "WheelEvent.wheelDelta", |
| + "WorkerContext.webkitIndexedDB", |
| ]) |
| class HtmlRenamer(object): |
| @@ -367,6 +375,10 @@ class HtmlRenamer(object): |
| """ |
| if idl_type_name.startswith('SVG'): |
| return 'svg' |
| + |
| + if idl_type_name.startswith('IDB'): |
| + return 'indexed_db' |
| + |
| if 'Audio' in idl_type_name: |
| return 'web_audio' |
| @@ -382,12 +394,12 @@ 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': |
| - return type_name |
| - # Strip off the SVG prefix. |
| + # Strip off any SVG prefix. |
|
Emily Fortuna
2012/12/04 01:57:19
remove "SVG" from this line.
blois
2012/12/04 17:35:36
Done.
|
| 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): |