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 re | 5 import re |
6 | 6 |
7 html_interface_renames = { | 7 html_interface_renames = { |
8 'DOMCoreException': 'DOMException', | 8 'DOMCoreException': 'DOMException', |
9 'DOMFormData': 'FormData', | 9 'DOMFormData': 'FormData', |
10 'DOMURL': 'Url', | 10 'DOMURL': 'Url', |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 "Node.get:prefix", | 283 "Node.get:prefix", |
284 "Node.set:prefix", | 284 "Node.set:prefix", |
285 "Node.get:DOCUMENT_POSITION_PRECEDING", | 285 "Node.get:DOCUMENT_POSITION_PRECEDING", |
286 "Node.get:nodeValue", | 286 "Node.get:nodeValue", |
287 "Node.set:nodeValue", | 287 "Node.set:nodeValue", |
288 "Node.get:CDATA_SECTION_NODE", | 288 "Node.get:CDATA_SECTION_NODE", |
289 "Node.get:nodeName", | 289 "Node.get:nodeName", |
290 "Node.lookupPrefix", | 290 "Node.lookupPrefix", |
291 "Node.get:PROCESSING_INSTRUCTION_NODE", | 291 "Node.get:PROCESSING_INSTRUCTION_NODE", |
292 'ShadowRoot.getElementsByTagNameNS', | 292 'ShadowRoot.getElementsByTagNameNS', |
293 "LocalWindow.blur", | |
294 "LocalWindow.clientInformation", | 293 "LocalWindow.clientInformation", |
295 "LocalWindow.get:frames", | 294 "LocalWindow.get:frames", |
296 "LocalWindow.get:length", | 295 "LocalWindow.get:length", |
297 "LocalWindow.focus", | |
298 "LocalWindow.prompt", | 296 "LocalWindow.prompt", |
299 "LocalWindow.webkitCancelRequestAnimationFrame", | 297 "LocalWindow.webkitCancelRequestAnimationFrame", |
300 "WheelEvent.wheelDelta", | 298 "WheelEvent.wheelDelta", |
301 ]) | 299 ]) |
302 | 300 |
303 class HtmlRenamer(object): | 301 class HtmlRenamer(object): |
304 def __init__(self, database): | 302 def __init__(self, database): |
305 self._database = database | 303 self._database = database |
306 | 304 |
307 def RenameInterface(self, interface): | 305 def RenameInterface(self, interface): |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 | 370 |
373 # We're looking for a sequence of letters which start with capital letter | 371 # We're looking for a sequence of letters which start with capital letter |
374 # then a series of caps and finishes with either the end of the string or | 372 # then a series of caps and finishes with either the end of the string or |
375 # a capital letter. | 373 # a capital letter. |
376 # The [0-9] check is for names such as 2D or 3D | 374 # The [0-9] check is for names such as 2D or 3D |
377 # The following test cases should match as: | 375 # The following test cases should match as: |
378 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue | 376 # WebKitCSSFilterValue: WebKit(C)(SS)(F)ilterValue |
379 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) | 377 # XPathNSResolver: (X)()(P)ath(N)(S)(R)esolver (no change) |
380 # IFrameElement: (I)()(F)rameElement (no change) | 378 # IFrameElement: (I)()(F)rameElement (no change) |
381 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) | 379 return re.sub(r'([A-Z])([A-Z]{2,})([A-Z]|$)', toLower, name) |
OLD | NEW |