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

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

Issue 12163009: Remove webkit prefix and annotate with experimental tag. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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: tools/dom/scripts/htmlrenamer.py
diff --git a/tools/dom/scripts/htmlrenamer.py b/tools/dom/scripts/htmlrenamer.py
index 69b90af774eeba75c651ee50d2b8362c2c2fc0c1..6ca773a03ab2a626f5475866fc5a1f32c0a7b0ff 100644
--- a/tools/dom/scripts/htmlrenamer.py
+++ b/tools/dom/scripts/htmlrenamer.py
@@ -181,6 +181,8 @@ _private_html_members = monitored.Set('htmlrenamer._private_html_members', [
# Members from the standard dom that exist in the dart:html library with
# identical functionality but with cleaner names.
_renamed_html_members = monitored.Dict('htmlrenamer._renamed_html_members', {
+ 'Document.createCDATASection': 'createCDataSection',
+ 'Document.defaultView': 'window',
'DOMURL.createObjectURL': 'createObjectUrl',
'DOMURL.revokeObjectURL': 'revokeObjectUrl',
'DOMWindow.webkitConvertPointFromNodeToPage': 'convertPointFromNodeToPage',
@@ -190,8 +192,6 @@ _renamed_html_members = monitored.Dict('htmlrenamer._renamed_html_members', {
'DOMWindow.webkitResolveLocalFileSystemURL': 'resolveLocalFileSystemUrl',
'DOMWindow.webkitRequestFileSystem': 'requestFileSystem',
'DOMWindow.webkitResolveLocalFileSystemURL': 'resolveLocalFileSystemUrl',
- 'Document.createCDATASection': 'createCDataSection',
- 'Document.defaultView': 'window',
'Element.scrollIntoViewIfNeeded': 'scrollIntoView',
'Element.webkitCreateShadowRoot': 'createShadowRoot',
'Element.webkitMatchesSelector' : 'matches',
@@ -211,6 +211,10 @@ _renamed_html_members = monitored.Dict('htmlrenamer._renamed_html_members', {
'resolveLocalFileSystemUrl',
})
+# Autopopulated by members that start with webkit that were not explicitly
+# listed.
+webkit_member_prefix_renames = set()
+
# Members and classes from the dom that should be removed completely from
# dart:html. These could be expressed in the IDL instead but expressing this
# as a simple table instead is more concise.
@@ -516,6 +520,11 @@ class HtmlRenamer(object):
if not target_name.startswith('$dom_'): # e.g. $dom_svgClassName
target_name = '$dom_' + target_name
+ if not name and target_name.startswith('webkit'):
+ webkit_member_prefix_renames.add('%s.%s' % (interface.id, member))
+ target_name = member[len('webkit'):]
+ target_name = target_name[:1].lower() + target_name[1:]
+
if dartify_name:
target_name = self._DartifyMemberName(target_name)
return target_name

Powered by Google App Engine
This is Rietveld 408576698