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

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

Issue 23163010: rollback problem blink merge cl (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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
« no previous file with comments | « tools/dom/scripts/htmldartgenerator.py ('k') | tools/dom/scripts/htmlrenamer.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5
6 """This module provides functionality to generate dart:html event classes.""" 6 """This module provides functionality to generate dart:html event classes."""
7 7
8 import logging 8 import logging
9 import monitored 9 import monitored
10 10
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 + provider), call_name)), 321 + provider), call_name)),
322 TYPE=event_type) 322 TYPE=event_type)
323 323
324 def _GetRawEvents(self, interface): 324 def _GetRawEvents(self, interface):
325 all_interfaces = ([ interface ] + 325 all_interfaces = ([ interface ] +
326 self._database.TransitiveSecondaryParents(interface)) 326 self._database.TransitiveSecondaryParents(interface))
327 events = set([]) 327 events = set([])
328 for super_interface in all_interfaces: 328 for super_interface in all_interfaces:
329 events = events.union( 329 events = events.union(
330 set([attr.id for attr in super_interface.attributes 330 set([attr.id for attr in super_interface.attributes
331 if (attr.type.id == 'EventHandler' 331 if attr.type.id == 'EventListener']))
332 or attr.type.id == 'EventListener')]))
333 return events 332 return events
334 333
335 def _GetEvents(self, interface, custom_events): 334 def _GetEvents(self, interface, custom_events):
336 """ Gets a list of all of the events for the specified interface. 335 """ Gets a list of all of the events for the specified interface.
337 """ 336 """
338 html_interface_name = interface.doc_js_name 337 html_interface_name = interface.doc_js_name
339 338
340 events = self._GetRawEvents(interface) 339 events = self._GetRawEvents(interface)
341 340
342 if html_interface_name in _html_manual_events: 341 if html_interface_name in _html_manual_events:
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 """ 402 """
404 key = '%s.%s' % (html_interface_name, dom_event_name) 403 key = '%s.%s' % (html_interface_name, dom_event_name)
405 if key in _html_event_types: 404 if key in _html_event_types:
406 return _html_event_types[key] 405 return _html_event_types[key]
407 key = '*.%s' % dom_event_name 406 key = '*.%s' % dom_event_name
408 if key in _html_event_types: 407 if key in _html_event_types:
409 return _html_event_types[key] 408 return _html_event_types[key]
410 _logger.warn('Cannot resolve event type for %s.%s' % 409 _logger.warn('Cannot resolve event type for %s.%s' %
411 (html_interface_name, dom_event_name)) 410 (html_interface_name, dom_event_name))
412 return None 411 return None
OLDNEW
« no previous file with comments | « tools/dom/scripts/htmldartgenerator.py ('k') | tools/dom/scripts/htmlrenamer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698