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

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

Issue 12233003: Follow up to IDL roll. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | « sdk/lib/indexed_db/dartium/indexed_db_dartium.dart ('k') | no next file » | 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 from generator import GetAnnotationsAndComments, FormatAnnotationsAndComments 9 from generator import GetAnnotationsAndComments, FormatAnnotationsAndComments
10 10
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 'FileWriter.writestart': ('writeStart', 'ProgressEvent'), 294 'FileWriter.writestart': ('writeStart', 'ProgressEvent'),
295 'HTMLBodyElement.storage': ('storage', 'StorageEvent'), 295 'HTMLBodyElement.storage': ('storage', 'StorageEvent'),
296 'HTMLInputElement.webkitSpeechChange': ('speechChange', 'Event'), 296 'HTMLInputElement.webkitSpeechChange': ('speechChange', 'Event'),
297 'HTMLMediaElement.loadstart': ('loadStart', 'Event'), 297 'HTMLMediaElement.loadstart': ('loadStart', 'Event'),
298 'HTMLMediaElement.progress': ('progress', 'Event'), 298 'HTMLMediaElement.progress': ('progress', 'Event'),
299 'HTMLMediaElement.show': ('show', 'Event'), 299 'HTMLMediaElement.show': ('show', 'Event'),
300 'HTMLMediaElement.webkitkeyadded': ('keyAdded', 'MediaKeyEvent'), 300 'HTMLMediaElement.webkitkeyadded': ('keyAdded', 'MediaKeyEvent'),
301 'HTMLMediaElement.webkitkeyerror': ('keyError', 'MediaKeyEvent'), 301 'HTMLMediaElement.webkitkeyerror': ('keyError', 'MediaKeyEvent'),
302 'HTMLMediaElement.webkitkeymessage': ('keyMessage', 'MediaKeyEvent'), 302 'HTMLMediaElement.webkitkeymessage': ('keyMessage', 'MediaKeyEvent'),
303 'HTMLMediaElement.webkitneedkey': ('needKey', 'MediaKeyEvent'), 303 'HTMLMediaElement.webkitneedkey': ('needKey', 'MediaKeyEvent'),
304 'IDBDatabase.versionchange': ('versionChange', 'UpgradeNeededEvent'), 304 'IDBDatabase.versionchange': ('versionChange', 'VersionChangeEvent'),
305 'IDBOpenDBRequest.blocked': ('blocked', 'Event'), 305 'IDBOpenDBRequest.blocked': ('blocked', 'Event'),
306 'IDBOpenDBRequest.upgradeneeded': ('upgradeNeeded', 'VersionChangeEvent'), 306 'IDBOpenDBRequest.upgradeneeded': ('upgradeNeeded', 'VersionChangeEvent'),
307 'IDBRequest.success': ('success', 'Event'), 307 'IDBRequest.success': ('success', 'Event'),
308 'IDBTransaction.complete': ('complete', 'Event'), 308 'IDBTransaction.complete': ('complete', 'Event'),
309 'IDBVersionChangeRequest.blocked': ('blocked', 'Event'), 309 'IDBVersionChangeRequest.blocked': ('blocked', 'Event'),
310 'MediaController.play': ('play', 'Event'), 310 'MediaController.play': ('play', 'Event'),
311 'MediaStreamTrack.mute': ('mute', 'Event'), 311 'MediaStreamTrack.mute': ('mute', 'Event'),
312 'MediaStreamTrack.unmute': ('unmute', 'Event'), 312 'MediaStreamTrack.unmute': ('unmute', 'Event'),
313 'MediaStreamTrackList.addtrack': ('addTrack', 'MediaStreamTrackEvent'), 313 'MediaStreamTrackList.addtrack': ('addTrack', 'MediaStreamTrackEvent'),
314 'MediaStreamTrackList.removetrack': ('removeTrack', 'MediaStreamTrackEvent'), 314 'MediaStreamTrackList.removetrack': ('removeTrack', 'MediaStreamTrackEvent'),
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 parent_events_class_name = 'Events' 591 parent_events_class_name = 'Events'
592 interfaces_with_events = set() 592 interfaces_with_events = set()
593 for parent in self._database.Hierarchy(interface): 593 for parent in self._database.Hierarchy(interface):
594 if parent != interface and parent.id in self._event_classes: 594 if parent != interface and parent.id in self._event_classes:
595 parent_name = self._renamer.RenameInterface(parent) 595 parent_name = self._renamer.RenameInterface(parent)
596 parent_events_class_name = parent_name + 'Events' 596 parent_events_class_name = parent_name + 'Events'
597 interfaces_with_events.add(parent) 597 interfaces_with_events.add(parent)
598 if len(interfaces_with_events) > 1: 598 if len(interfaces_with_events) > 1:
599 raise Exception('Only one parent event class allowed ' + interface.id) 599 raise Exception('Only one parent event class allowed ' + interface.id)
600 return parent_events_class_name 600 return parent_events_class_name
OLDNEW
« no previous file with comments | « sdk/lib/indexed_db/dartium/indexed_db_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698