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

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

Issue 12274002: Fixing Geolocation on Firefox (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adding manual test Created 7 years, 10 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 logging 5 import logging
6 import monitored 6 import monitored
7 import re 7 import re
8 8
9 html_interface_renames = monitored.Dict('htmlrenamer.html_interface_renames', { 9 html_interface_renames = monitored.Dict('htmlrenamer.html_interface_renames', {
10 'CDATASection': 'CDataSection', 10 'CDATASection': 'CDataSection',
11 'Clipboard': 'DataTransfer', 11 'Clipboard': 'DataTransfer',
12 'DOMApplicationCache': 'ApplicationCache', 12 'DOMApplicationCache': 'ApplicationCache',
13 'DOMCoreException': 'DomException', 13 'DOMCoreException': 'DomException',
14 'DOMFileSystem': 'FileSystem', 14 'DOMFileSystem': 'FileSystem',
15 'DOMFileSystemSync': 'FileSystemSync', 15 'DOMFileSystemSync': 'FileSystemSync',
16 'DOMFormData': 'FormData', 16 'DOMFormData': 'FormData',
17 'DOMURL': 'Url', 17 'DOMURL': 'Url',
18 'DOMWindow': 'Window', 18 'DOMWindow': 'Window',
19 'HTMLDocument' : 'HtmlDocument', 19 'HTMLDocument' : 'HtmlDocument',
20 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts. 20 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts.
21 'NamedNodeMap': '_NamedNodeMap', 21 'NamedNodeMap': '_NamedNodeMap',
22 'NavigatorUserMediaErrorCallback': '_NavigatorUserMediaErrorCallback', 22 'NavigatorUserMediaErrorCallback': '_NavigatorUserMediaErrorCallback',
23 'NavigatorUserMediaSuccessCallback': '_NavigatorUserMediaSuccessCallback', 23 'NavigatorUserMediaSuccessCallback': '_NavigatorUserMediaSuccessCallback',
24 'PositionCallback': '_PositionCallback',
25 'PositionErrorCallback': '_PositionErrorCallback',
24 'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts. 26 'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts.
25 'SVGElement': 'SvgElement', # Manual to avoid name conflicts. 27 'SVGElement': 'SvgElement', # Manual to avoid name conflicts.
26 'SVGException': 'SvgException', # Manual of avoid conflict with Exception. 28 'SVGException': 'SvgException', # Manual of avoid conflict with Exception.
27 'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts. 29 'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts.
28 'WebGLVertexArrayObjectOES': 'WebGLVertexArrayObject', 30 'WebGLVertexArrayObjectOES': 'WebGLVertexArrayObject',
29 'WebKitAnimationEvent': 'AnimationEvent', 31 'WebKitAnimationEvent': 'AnimationEvent',
30 'WebKitCSSKeyframeRule': 'CssKeyframeRule', 32 'WebKitCSSKeyframeRule': 'CssKeyframeRule',
31 'WebKitCSSKeyframesRule': 'CssKeyframesRule', 33 'WebKitCSSKeyframesRule': 'CssKeyframesRule',
32 'WebKitCSSMatrix': 'CssMatrix', 34 'WebKitCSSMatrix': 'CssMatrix',
33 'WebKitCSSTransformValue': 'CssTransformValue', 35 'WebKitCSSTransformValue': 'CssTransformValue',
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 'Element.scrollIntoViewIfNeeded', 141 'Element.scrollIntoViewIfNeeded',
140 'Element.setAttributeNS', 142 'Element.setAttributeNS',
141 'Element.setAttribute', 143 'Element.setAttribute',
142 'Element.setAttributeNS', 144 'Element.setAttributeNS',
143 'ElementTraversal.childElementCount', 145 'ElementTraversal.childElementCount',
144 'ElementTraversal.firstElementChild', 146 'ElementTraversal.firstElementChild',
145 'ElementTraversal.lastElementChild', 147 'ElementTraversal.lastElementChild',
146 'Event.initEvent', 148 'Event.initEvent',
147 'EventTarget.addEventListener', 149 'EventTarget.addEventListener',
148 'EventTarget.removeEventListener', 150 'EventTarget.removeEventListener',
151 'Geolocation.clearWatch',
152 'Geolocation.getCurrentPosition',
153 'Geolocation.watchPosition',
149 'HashChangeEvent.initHashChangeEvent', 154 'HashChangeEvent.initHashChangeEvent',
150 'IDBFactory.deleteDatabase', 155 'IDBFactory.deleteDatabase',
151 'IDBFactory.open', 156 'IDBFactory.open',
152 'IDBObjectStore.put', 157 'IDBObjectStore.put',
153 'IDBObjectStore.getObject', 158 'IDBObjectStore.getObject',
154 'IDBObjectStore.openCursor', 159 'IDBObjectStore.openCursor',
155 'KeyboardEvent.initKeyboardEvent', 160 'KeyboardEvent.initKeyboardEvent',
156 'KeyboardEvent.keyIdentifier', 161 'KeyboardEvent.keyIdentifier',
157 'MessageEvent.initMessageEvent', 162 'MessageEvent.initMessageEvent',
158 'MouseEvent.initMouseEvent', 163 'MouseEvent.initMouseEvent',
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 601
597 # We're looking for a sequence of letters which start with capital letter 602 # We're looking for a sequence of letters which start with capital letter
598 # then a series of caps and finishes with either the end of the string or 603 # then a series of caps and finishes with either the end of the string or
599 # a capital letter. 604 # a capital letter.
600 # The [0-9] check is for names such as 2D or 3D 605 # The [0-9] check is for names such as 2D or 3D
601 # The following test cases should match as: 606 # The following test cases should match as:
602 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue 607 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue
603 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) 608 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change)
604 # IFrameElement: (I)()(F)rameElement (no change) 609 # IFrameElement: (I)()(F)rameElement (no change)
605 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) 610 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698