Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 'DOMApplicationCache': 'ApplicationCache', | 11 'DOMApplicationCache': 'ApplicationCache', |
| 12 'DOMCoreException': 'DomException', | 12 'DOMCoreException': 'DomException', |
| 13 'DOMFileSystem': 'FileSystem', | 13 'DOMFileSystem': 'FileSystem', |
| 14 'DOMFileSystemSync': 'FileSystemSync', | 14 'DOMFileSystemSync': 'FileSystemSync', |
| 15 'DOMFormData': 'FormData', | 15 'DOMFormData': 'FormData', |
| 16 'DOMURL': 'Url', | 16 'DOMURL': 'Url', |
| 17 'DOMWindow': 'Window', | 17 'DOMWindow': 'Window', |
| 18 'HTMLDocument' : 'HtmlDocument', | 18 'HTMLDocument' : 'HtmlDocument', |
| 19 'HTMLAppletElement' : '_AppletElement', | |
| 20 'HTMLBaseFontElement' : '_BaseFontElement', | |
| 19 'HTMLDirectoryElement' : '_DirectoryElement', | 21 'HTMLDirectoryElement' : '_DirectoryElement', |
| 22 'HTMLFrameElement' : '_FrameElement', | |
| 23 'HTMLFrameSetElement' : '_FrameSetElement', | |
| 24 'HTMLFontElement' : '_FontElement', | |
|
blois
2013/01/15 23:05:55
Alphabetize
Andrei Mouravski
2013/01/15 23:57:59
Done.
| |
| 25 'HTMLMarqueeElement' : '_MarqueeElement', | |
|
blois
2013/01/15 23:05:55
Should remove the marquee test from element_types_
Andrei Mouravski
2013/01/15 23:57:59
Done.
| |
| 20 'IDBAny': '_Any', # Suppressed, but needs to exist for Dartium. | 26 'IDBAny': '_Any', # Suppressed, but needs to exist for Dartium. |
| 21 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts. | 27 'IDBFactory': 'IdbFactory', # Manual to avoid name conflicts. |
| 22 'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts. | 28 'SVGDocument': 'SvgDocument', # Manual to avoid name conflicts. |
| 23 'SVGElement': 'SvgElement', # Manual to avoid name conflicts. | 29 'SVGElement': 'SvgElement', # Manual to avoid name conflicts. |
| 24 'SVGException': 'SvgException', # Manual of avoid conflict with Exception. | 30 'SVGException': 'SvgException', # Manual of avoid conflict with Exception. |
| 25 'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts. | 31 'SVGSVGElement': 'SvgSvgElement', # Manual to avoid name conflicts. |
| 26 'WebGLVertexArrayObjectOES': 'WebGLVertexArrayObject', | 32 'WebGLVertexArrayObjectOES': 'WebGLVertexArrayObject', |
| 27 'WebKitAnimation': 'Animation', | 33 'WebKitAnimation': 'Animation', |
| 28 'WebKitAnimationEvent': 'AnimationEvent', | 34 'WebKitAnimationEvent': 'AnimationEvent', |
| 29 'WebKitCSSKeyframeRule': 'CssKeyframeRule', | 35 'WebKitCSSKeyframeRule': 'CssKeyframeRule', |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 207 'Document.createProcessingInstruction', | 213 'Document.createProcessingInstruction', |
| 208 'Document.createTreeWalker', | 214 'Document.createTreeWalker', |
| 209 'Document.designMode', | 215 'Document.designMode', |
| 210 'Document.dir', | 216 'Document.dir', |
| 211 'Document.evaluate', | 217 'Document.evaluate', |
| 212 'Document.fgColor', | 218 'Document.fgColor', |
| 213 'Document.get:URL', | 219 'Document.get:URL', |
| 214 'Document.get:anchors', | 220 'Document.get:anchors', |
| 215 'Document.get:characterSet', | 221 'Document.get:characterSet', |
| 216 'Document.get:compatMode', | 222 'Document.get:compatMode', |
| 217 'Document.get:compatMode', | |
| 218 'Document.get:defaultCharset', | 223 'Document.get:defaultCharset', |
| 219 'Document.get:doctype', | 224 'Document.get:doctype', |
| 220 'Document.get:documentURI', | 225 'Document.get:documentURI', |
| 221 'Document.get:embeds', | 226 'Document.get:embeds', |
| 222 'Document.get:forms', | 227 'Document.get:forms', |
| 223 'Document.get:height', | 228 'Document.get:height', |
| 224 'Document.get:inputEncoding', | 229 'Document.get:inputEncoding', |
| 225 'Document.get:links', | 230 'Document.get:links', |
| 226 'Document.get:plugins', | 231 'Document.get:plugins', |
| 227 'Document.get:scripts', | 232 'Document.get:scripts', |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 257 'Element.set:outerHTML', | 262 'Element.set:outerHTML', |
| 258 'Element.setAttributeNode', | 263 'Element.setAttributeNode', |
| 259 'Element.setAttributeNodeNS', | 264 'Element.setAttributeNodeNS', |
| 260 'Event.srcElement', | 265 'Event.srcElement', |
| 261 'EventSource.URL', | 266 'EventSource.URL', |
| 262 'HTMLAnchorElement.charset', | 267 'HTMLAnchorElement.charset', |
| 263 'HTMLAnchorElement.coords', | 268 'HTMLAnchorElement.coords', |
| 264 'HTMLAnchorElement.rev', | 269 'HTMLAnchorElement.rev', |
| 265 'HTMLAnchorElement.shape', | 270 'HTMLAnchorElement.shape', |
| 266 'HTMLAnchorElement.text', | 271 'HTMLAnchorElement.text', |
| 272 'HTMLAppletElement.*', | |
| 267 'HTMLAreaElement.noHref', | 273 'HTMLAreaElement.noHref', |
| 268 'HTMLBRElement.clear', | 274 'HTMLBRElement.clear', |
| 275 'HTMLBaseFontElement.*', | |
| 269 'HTMLBodyElement.aLink', | 276 'HTMLBodyElement.aLink', |
| 270 'HTMLBodyElement.background', | 277 'HTMLBodyElement.background', |
| 271 'HTMLBodyElement.bgColor', | 278 'HTMLBodyElement.bgColor', |
| 272 'HTMLBodyElement.bgColor', | |
| 273 'HTMLBodyElement.link', | 279 'HTMLBodyElement.link', |
| 274 'HTMLBodyElement.text', | 280 'HTMLBodyElement.text', |
| 275 'HTMLBodyElement.text', | |
| 276 'HTMLBodyElement.vLink', | 281 'HTMLBodyElement.vLink', |
| 277 'HTMLDListElement.compact', | 282 'HTMLDListElement.compact', |
| 278 'HTMLDirectoryElement.*', | 283 'HTMLDirectoryElement.*', |
| 279 'HTMLDivElement.align', | 284 'HTMLDivElement.align', |
| 285 'HTMLFontElement.*', | |
| 280 'HTMLFormElement.get:elements', | 286 'HTMLFormElement.get:elements', |
| 281 'HTMLFrameElement.*', | 287 'HTMLFrameElement.*', |
| 282 'HTMLFrameSetElement.*', | 288 'HTMLFrameSetElement.*', |
| 283 'HTMLHRElement.align', | 289 'HTMLHRElement.align', |
| 284 'HTMLHRElement.noShade', | 290 'HTMLHRElement.noShade', |
| 285 'HTMLHRElement.size', | 291 'HTMLHRElement.size', |
| 286 'HTMLHRElement.width', | 292 'HTMLHRElement.width', |
| 287 'HTMLHeadElement.profile', | 293 'HTMLHeadElement.profile', |
| 288 'HTMLHeadingElement.align', | 294 'HTMLHeadingElement.align', |
| 289 'HTMLHtmlElement.manifest', | 295 'HTMLHtmlElement.manifest', |
| 290 'HTMLHtmlElement.version', | 296 'HTMLHtmlElement.version', |
| 291 'HTMLHtmlElement.version', | |
| 292 'HTMLIFrameElement.align', | 297 'HTMLIFrameElement.align', |
| 293 'HTMLIFrameElement.frameBorder', | 298 'HTMLIFrameElement.frameBorder', |
| 294 'HTMLIFrameElement.longDesc', | 299 'HTMLIFrameElement.longDesc', |
| 295 'HTMLIFrameElement.marginHeight', | 300 'HTMLIFrameElement.marginHeight', |
| 296 'HTMLIFrameElement.marginWidth', | 301 'HTMLIFrameElement.marginWidth', |
| 297 'HTMLIFrameElement.scrolling', | 302 'HTMLIFrameElement.scrolling', |
| 298 'HTMLImageElement.align', | 303 'HTMLImageElement.align', |
| 299 'HTMLImageElement.hspace', | 304 'HTMLImageElement.hspace', |
| 300 'HTMLImageElement.longDesc', | 305 'HTMLImageElement.longDesc', |
| 301 'HTMLImageElement.name', | 306 'HTMLImageElement.name', |
| 302 'HTMLImageElement.vspace', | 307 'HTMLImageElement.vspace', |
| 303 'HTMLInputElement.align', | 308 'HTMLInputElement.align', |
| 304 'HTMLLegendElement.align', | 309 'HTMLLegendElement.align', |
| 305 'HTMLLinkElement.charset', | 310 'HTMLLinkElement.charset', |
| 306 'HTMLLinkElement.rev', | 311 'HTMLLinkElement.rev', |
| 307 'HTMLLinkElement.target', | 312 'HTMLLinkElement.target', |
| 313 'HTMLMarqueeElement.*', | |
| 308 'HTMLMenuElement.compact', | 314 'HTMLMenuElement.compact', |
| 309 'HTMLMetaElement.scheme', | 315 'HTMLMetaElement.scheme', |
| 310 'HTMLOListElement.compact', | 316 'HTMLOListElement.compact', |
| 311 'HTMLObjectElement.align', | 317 'HTMLObjectElement.align', |
| 312 'HTMLObjectElement.archive', | 318 'HTMLObjectElement.archive', |
| 313 'HTMLObjectElement.border', | 319 'HTMLObjectElement.border', |
| 314 'HTMLObjectElement.codeBase', | 320 'HTMLObjectElement.codeBase', |
| 315 'HTMLObjectElement.codeType', | 321 'HTMLObjectElement.codeType', |
| 316 'HTMLObjectElement.declare', | 322 'HTMLObjectElement.declare', |
| 317 'HTMLObjectElement.hspace', | 323 'HTMLObjectElement.hspace', |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 488 | 494 |
| 489 # We're looking for a sequence of letters which start with capital letter | 495 # We're looking for a sequence of letters which start with capital letter |
| 490 # then a series of caps and finishes with either the end of the string or | 496 # then a series of caps and finishes with either the end of the string or |
| 491 # a capital letter. | 497 # a capital letter. |
| 492 # The [0-9] check is for names such as 2D or 3D | 498 # The [0-9] check is for names such as 2D or 3D |
| 493 # The following test cases should match as: | 499 # The following test cases should match as: |
| 494 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 500 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
| 495 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 501 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
| 496 # IFrameElement: (I)()(F)rameElement (no change) | 502 # IFrameElement: (I)()(F)rameElement (no change) |
| 497 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 503 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
| OLD | NEW |