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

Side by Side Diff: tools/dom/scripts/htmlrenamer.py

Issue 11883025: Detect if webkitNotifications is available and remove webkit prefix (replaced (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 import re 5 import re
6 6
7 html_interface_renames = { 7 html_interface_renames = {
8 'CDATASection': 'CDataSection', 8 'CDATASection': 'CDataSection',
9 'DOMApplicationCache': 'ApplicationCache', 9 'DOMApplicationCache': 'ApplicationCache',
10 'DOMCoreException': 'DomException', 10 'DOMCoreException': 'DomException',
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 'Node.cloneNode': 'clone', 146 'Node.cloneNode': 'clone',
147 'Node.nextSibling': 'nextNode', 147 'Node.nextSibling': 'nextNode',
148 'Node.ownerDocument': 'document', 148 'Node.ownerDocument': 'document',
149 'Node.parentElement': 'parent', 149 'Node.parentElement': 'parent',
150 'Node.previousSibling': 'previousNode', 150 'Node.previousSibling': 'previousNode',
151 'Node.textContent': 'text', 151 'Node.textContent': 'text',
152 'Stylable.className': '$dom_svgClassName', 152 'Stylable.className': '$dom_svgClassName',
153 'SvgElement.className': '$dom_svgClassName', 153 'SvgElement.className': '$dom_svgClassName',
154 'Url.createObjectURL': 'createObjectUrl', 154 'Url.createObjectURL': 'createObjectUrl',
155 'Url.revokeObjectURL': 'revokeObjectUrl', 155 'Url.revokeObjectURL': 'revokeObjectUrl',
156 'Window.webkitNotifications': 'notifications',
156 'Window.webkitRequestFileSystem': 'requestFileSystem', 157 'Window.webkitRequestFileSystem': 'requestFileSystem',
157 'Window.webkitResolveLocalFileSystemURL': 'resolveLocalFileSystemUrl', 158 'Window.webkitResolveLocalFileSystemURL': 'resolveLocalFileSystemUrl',
158 'WorkerContext.webkitRequestFileSystem': 'requestFileSystem', 159 'WorkerContext.webkitRequestFileSystem': 'requestFileSystem',
159 'WorkerContext.webkitRequestFileSystemSync': 'requestFileSystemSync', 160 'WorkerContext.webkitRequestFileSystemSync': 'requestFileSystemSync',
160 'WorkerContext.webkitResolveLocalFileSystemSyncURL': 161 'WorkerContext.webkitResolveLocalFileSystemSyncURL':
161 'resolveLocalFileSystemSyncUrl', 162 'resolveLocalFileSystemSyncUrl',
162 'WorkerContext.webkitResolveLocalFileSystemURL': 163 'WorkerContext.webkitResolveLocalFileSystemURL':
163 'resolveLocalFileSystemUrl', 164 'resolveLocalFileSystemUrl',
164 } 165 }
165 166
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 510
510 # We're looking for a sequence of letters which start with capital letter 511 # We're looking for a sequence of letters which start with capital letter
511 # then a series of caps and finishes with either the end of the string or 512 # then a series of caps and finishes with either the end of the string or
512 # a capital letter. 513 # a capital letter.
513 # The [0-9] check is for names such as 2D or 3D 514 # The [0-9] check is for names such as 2D or 3D
514 # The following test cases should match as: 515 # The following test cases should match as:
515 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue 516 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue
516 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) 517 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change)
517 # IFrameElement: (I)()(F)rameElement (no change) 518 # IFrameElement: (I)()(F)rameElement (no change)
518 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) 519 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698