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

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

Issue 11880036: Removing HTML elements by making them private. (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
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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',
11 'DOMFileSystem': 'FileSystem', 11 'DOMFileSystem': 'FileSystem',
12 'DOMFileSystemSync': 'FileSystemSync', 12 'DOMFileSystemSync': 'FileSystemSync',
13 'DOMFormData': 'FormData', 13 'DOMFormData': 'FormData',
14 'DOMURL': 'Url', 14 'DOMURL': 'Url',
15 'DOMWindow': 'Window', 15 'DOMWindow': 'Window',
16 'HTMLDocument' : 'HtmlDocument', 16 'HTMLDocument' : 'HtmlDocument',
17 'HTMLDirectoryElement' : '_DirectoryElement',
blois 2013/01/14 23:21:53 Should also add HTMLDirectoryElement.* to _removed
Andrei Mouravski 2013/01/14 23:54:23 Done.
17 'IDBAny': '_Any', # Suppressed, but needs to exist for Dartium. 18 'IDBAny': '_Any', # Suppressed, but needs to exist for Dartium.
18 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts. 19 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts.
19 'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts. 20 'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts.
20 'SVGElement': 'SvgElement', # Manual to avoid name conflicts. 21 'SVGElement': 'SvgElement', # Manual to avoid name conflicts.
21 'SVGException': 'SvgException', # Manual of avoid conflict with Exception. 22 'SVGException': 'SvgException', # Manual of avoid conflict with Exception.
22 'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts. 23 'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts.
23 'WebGLVertexArrayObjectOES': 'WebGLVertexArrayObject', 24 'WebGLVertexArrayObjectOES': 'WebGLVertexArrayObject',
24 'WebKitAnimation': 'Animation', 25 'WebKitAnimation': 'Animation',
25 'WebKitAnimationEvent': 'AnimationEvent', 26 'WebKitAnimationEvent': 'AnimationEvent',
26 'WebKitBlobBuilder': 'BlobBuilder', 27 'WebKitBlobBuilder': 'BlobBuilder',
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 502
502 # We're looking for a sequence of letters which start with capital letter 503 # We're looking for a sequence of letters which start with capital letter
503 # then a series of caps and finishes with either the end of the string or 504 # then a series of caps and finishes with either the end of the string or
504 # a capital letter. 505 # a capital letter.
505 # The [0-9] check is for names such as 2D or 3D 506 # The [0-9] check is for names such as 2D or 3D
506 # The following test cases should match as: 507 # The following test cases should match as:
507 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue 508 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue
508 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) 509 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change)
509 # IFrameElement: (I)()(F)rameElement (no change) 510 # IFrameElement: (I)()(F)rameElement (no change)
510 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) 511 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name)
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698