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 | 5 |
6 _html_interface_renames = { | 6 _html_interface_renames = { |
7 'DOMFormData': 'FormData', | 7 'DOMFormData': 'FormData', |
8 'DOMWindow': 'Window', | 8 'DOMWindow': 'Window', |
9 'WebKitAnimation': 'Animation', | 9 'WebKitAnimation': 'Animation', |
10 'WebKitAnimationEvent': 'AnimationEvent', | 10 'WebKitAnimationEvent': 'AnimationEvent', |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 "Node.get:prefix", | 260 "Node.get:prefix", |
261 "Node.set:prefix", | 261 "Node.set:prefix", |
262 "Node.get:DOCUMENT_POSITION_PRECEDING", | 262 "Node.get:DOCUMENT_POSITION_PRECEDING", |
263 "Node.get:nodeValue", | 263 "Node.get:nodeValue", |
264 "Node.set:nodeValue", | 264 "Node.set:nodeValue", |
265 "Node.get:CDATA_SECTION_NODE", | 265 "Node.get:CDATA_SECTION_NODE", |
266 "Node.get:nodeName", | 266 "Node.get:nodeName", |
267 "Node.lookupPrefix", | 267 "Node.lookupPrefix", |
268 "Node.get:PROCESSING_INSTRUCTION_NODE", | 268 "Node.get:PROCESSING_INSTRUCTION_NODE", |
269 "IFrameElement.get:contentDocument", | 269 "IFrameElement.get:contentDocument", |
| 270 "WheelEvent.wheelDelta", |
| 271 "WheelEvent.wheelDeltaX", |
| 272 "WheelEvent.wheelDeltaY", |
270 "Window.get:frameElement", | 273 "Window.get:frameElement", |
271 ]) | 274 ]) |
272 | 275 |
273 class HtmlRenamer(object): | 276 class HtmlRenamer(object): |
274 def __init__(self, database): | 277 def __init__(self, database): |
275 self._database = database | 278 self._database = database |
276 | 279 |
277 def RenameInterface(self, interface): | 280 def RenameInterface(self, interface): |
278 if interface.id.startswith('HTML'): | 281 if interface.id.startswith('HTML'): |
279 if any(interface.id in ['Element', 'Document'] | 282 if any(interface.id in ['Element', 'Document'] |
(...skipping 23 matching lines...) Expand all Loading... |
303 | 306 |
304 def _FindMatch(self, interface, member, member_prefix, candidates): | 307 def _FindMatch(self, interface, member, member_prefix, candidates): |
305 for interface in self._database.Hierarchy(interface): | 308 for interface in self._database.Hierarchy(interface): |
306 html_interface_name = self.RenameInterface(interface) | 309 html_interface_name = self.RenameInterface(interface) |
307 member_name = html_interface_name + '.' + member | 310 member_name = html_interface_name + '.' + member |
308 if member_name in candidates: | 311 if member_name in candidates: |
309 return member_name | 312 return member_name |
310 member_name = html_interface_name + '.' + member_prefix + member | 313 member_name = html_interface_name + '.' + member_prefix + member |
311 if member_name in candidates: | 314 if member_name in candidates: |
312 return member_name | 315 return member_name |
OLD | NEW |