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

Unified Diff: lib/dom/scripts/htmlrenamer.py

Issue 10823352: Rename XMLHttpRequest to HttpRequest. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: lib/dom/scripts/htmlrenamer.py
===================================================================
--- lib/dom/scripts/htmlrenamer.py (revision 10850)
+++ lib/dom/scripts/htmlrenamer.py (working copy)
@@ -3,19 +3,25 @@
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
-_html_strip_webkit_prefix_classes = [
- 'Animation',
- 'AnimationEvent',
- 'AnimationList',
- 'BlobBuilder',
- 'CSSKeyframeRule',
- 'CSSKeyframesRule',
- 'CSSMatrix',
- 'CSSTransformValue',
- 'Flags',
- 'LoseContext',
- 'Point',
- 'TransitionEvent']
+_html_interface_renames = {
+ 'DOMWindow': 'Window',
+ 'WebKitAnimation': 'Animation',
+ 'WebKitAnimationEvent': 'AnimationEvent',
+ 'WebKitAnimationList': 'AnimationList',
+ 'WebKitBlobBuilder': 'BlobBuilder',
+ 'WebKitCSSKeyframeRule': 'CSSKeyframeRule',
+ 'WebKitCSSKeyframesRule': 'CSSKeyframesRule',
+ 'WebKitCSSMatrix': 'CSSMatrix',
+ 'WebKitCSSTransformValue': 'CSSTransformValue',
+ 'WebKitFlags': 'Flags',
+ 'WebKitLoseContext': 'LoseContext',
+ 'WebKitPoint': 'Point',
+ 'WebKitTransitionEvent': 'TransitionEvent',
+ 'XMLHttpRequest': 'HttpRequest',
+ 'XMLHttpRequestException': 'HttpRequestException',
+ 'XMLHttpRequestProgressEvent': 'HttpRequestProgressEvent',
+ 'XMLHttpRequestUpload': 'HttpRequestUpload',
+}
# Members from the standard dom that should not be exposed publicly in dart:html
# but need to be exposed internally to implement dart:html on top of a standard
@@ -272,12 +278,8 @@
if any(interface.id in ['Element', 'Document']
for interface in self._database.Hierarchy(interface)):
return interface.id[len('HTML'):]
- elif interface.id.startswith('WebKit'):
- stripped_name = interface.id[len('WebKit'):]
- if stripped_name in _html_strip_webkit_prefix_classes:
- return stripped_name
- elif interface.id == 'DOMWindow':
- return 'Window'
+ elif interface.id in _html_interface_renames.keys():
sra1 2012/08/16 20:20:36 drop ".keys()", 'in' works directly
+ return _html_interface_renames[interface.id]
return interface.id
def RenameMember(self, interface_name, member, member_prefix=''):

Powered by Google App Engine
This is Rietveld 408576698