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