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

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

Issue 23889005: Cleaning up a bunch of DOM generation tables (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 '*.touchstart': ('touchStart', 'TouchEvent'), 106 '*.touchstart': ('touchStart', 'TouchEvent'),
107 '*.unload': ('unload', 'Event'), 107 '*.unload': ('unload', 'Event'),
108 '*.volumechange': ('volumeChange', 'Event'), 108 '*.volumechange': ('volumeChange', 'Event'),
109 '*.waiting': ('waiting', 'Event'), 109 '*.waiting': ('waiting', 'Event'),
110 '*.webkitAnimationEnd': ('animationEnd', 'AnimationEvent'), 110 '*.webkitAnimationEnd': ('animationEnd', 'AnimationEvent'),
111 '*.webkitAnimationIteration': ('animationIteration', 'AnimationEvent'), 111 '*.webkitAnimationIteration': ('animationIteration', 'AnimationEvent'),
112 '*.webkitAnimationStart': ('animationStart', 'AnimationEvent'), 112 '*.webkitAnimationStart': ('animationStart', 'AnimationEvent'),
113 '*.transitionend': ('transitionEnd', 'TransitionEvent'), 113 '*.transitionend': ('transitionEnd', 'TransitionEvent'),
114 '*.webkitfullscreenchange': ('fullscreenChange', 'Event'), 114 '*.webkitfullscreenchange': ('fullscreenChange', 'Event'),
115 '*.webkitfullscreenerror': ('fullscreenError', 'Event'), 115 '*.webkitfullscreenerror': ('fullscreenError', 'Event'),
116 '*.wheel': ('wheel', 'WheelEvent'),
116 'AbstractWorker.error': ('error', 'ErrorEvent'), 117 'AbstractWorker.error': ('error', 'ErrorEvent'),
117 'AudioContext.complete': ('complete', 'Event'), 118 'AudioContext.complete': ('complete', 'Event'),
118 'ApplicationCache.cached': ('cached', 'Event'), 119 'ApplicationCache.cached': ('cached', 'Event'),
119 'ApplicationCache.checking': ('checking', 'Event'), 120 'ApplicationCache.checking': ('checking', 'Event'),
120 'ApplicationCache.downloading': ('downloading', 'Event'), 121 'ApplicationCache.downloading': ('downloading', 'Event'),
121 'ApplicationCache.noupdate': ('noUpdate', 'Event'), 122 'ApplicationCache.noupdate': ('noUpdate', 'Event'),
122 'ApplicationCache.obsolete': ('obsolete', 'Event'), 123 'ApplicationCache.obsolete': ('obsolete', 'Event'),
123 'ApplicationCache.progress': ('progress', 'ProgressEvent'), 124 'ApplicationCache.progress': ('progress', 'ProgressEvent'),
124 'ApplicationCache.updateready': ('updateReady', 'Event'), 125 'ApplicationCache.updateready': ('updateReady', 'Event'),
125 'Document.readystatechange': ('readyStateChange', 'Event'), 126 'Document.readystatechange': ('readyStateChange', 'Event'),
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 'MediaStreamTrack.mute': ('mute', 'Event'), 170 'MediaStreamTrack.mute': ('mute', 'Event'),
170 'MediaStreamTrack.unmute': ('unmute', 'Event'), 171 'MediaStreamTrack.unmute': ('unmute', 'Event'),
171 'MIDIAccess.connect': ('connect', 'MidiConnectionEvent'), 172 'MIDIAccess.connect': ('connect', 'MidiConnectionEvent'),
172 'MIDIAccess.disconnect': ('disconnect', 'MidiConnectionEvent'), 173 'MIDIAccess.disconnect': ('disconnect', 'MidiConnectionEvent'),
173 'MIDIInput.midimessage': ('midiMessage', 'MidiMessageEvent'), 174 'MIDIInput.midimessage': ('midiMessage', 'MidiMessageEvent'),
174 'MIDIPort.disconnect': ('disconnect', 'MidiConnectionEvent'), 175 'MIDIPort.disconnect': ('disconnect', 'MidiConnectionEvent'),
175 'Notification.click': ('click', 'Event'), 176 'Notification.click': ('click', 'Event'),
176 'Notification.close': ('close', 'Event'), 177 'Notification.close': ('close', 'Event'),
177 'Notification.display': ('display', 'Event'), 178 'Notification.display': ('display', 'Event'),
178 'Notification.show': ('show', 'Event'), 179 'Notification.show': ('show', 'Event'),
180 'Performance.webkitresourcetimingbufferfull': ('resourceTimingBufferFull', 'Ev ent'),
Emily Fortuna 2013/09/04 17:23:32 long line
blois 2013/09/04 17:34:33 Similar to other long lines in this file- blink st
Emily Fortuna 2013/09/04 17:39:59 Yes, but these auto-gen scripts are part of the *d
blois 2013/09/04 18:17:35 Updated for expedience. Take a look at systemnati
179 'RTCDTMFSender.tonechange': ('toneChange', 'RtcDtmfToneChangeEvent'), 181 'RTCDTMFSender.tonechange': ('toneChange', 'RtcDtmfToneChangeEvent'),
180 'RTCDataChannel.close': ('close', 'Event'), 182 'RTCDataChannel.close': ('close', 'Event'),
181 'RTCDataChannel.open': ('open', 'Event'), 183 'RTCDataChannel.open': ('open', 'Event'),
182 'RTCPeerConnection.addstream': ('addStream', 'MediaStreamEvent'), 184 'RTCPeerConnection.addstream': ('addStream', 'MediaStreamEvent'),
183 'RTCPeerConnection.datachannel': ('dataChannel', 'RtcDataChannelEvent'), 185 'RTCPeerConnection.datachannel': ('dataChannel', 'RtcDataChannelEvent'),
184 'RTCPeerConnection.icecandidate': ('iceCandidate', 'RtcIceCandidateEvent'), 186 'RTCPeerConnection.icecandidate': ('iceCandidate', 'RtcIceCandidateEvent'),
185 'RTCPeerConnection.iceconnectionstatechange': ('iceConnectionStateChange', 'Ev ent'), 187 'RTCPeerConnection.iceconnectionstatechange': ('iceConnectionStateChange', 'Ev ent'),
186 'RTCPeerConnection.negotiationneeded': ('negotiationNeeded', 'Event'), 188 'RTCPeerConnection.negotiationneeded': ('negotiationNeeded', 'Event'),
187 'RTCPeerConnection.removestream': ('removeStream', 'MediaStreamEvent'), 189 'RTCPeerConnection.removestream': ('removeStream', 'MediaStreamEvent'),
188 'RTCPeerConnection.signalingstatechange': ('signalingStateChange', 'Event'), 190 'RTCPeerConnection.signalingstatechange': ('signalingStateChange', 'Event'),
191 'ScriptProcessorNode.audioprocess': ('audioProcess', 'AudioProcessingEvent'),
192 'SharedWorkerGlobalScope.connect': ('connect', 'Event'),
189 'SpeechRecognition.audioend': ('audioEnd', 'Event'), 193 'SpeechRecognition.audioend': ('audioEnd', 'Event'),
190 'SpeechRecognition.audiostart': ('audioStart', 'Event'), 194 'SpeechRecognition.audiostart': ('audioStart', 'Event'),
191 'SpeechRecognition.end': ('end', 'Event'), 195 'SpeechRecognition.end': ('end', 'Event'),
192 'SpeechRecognition.error': ('error', 'SpeechRecognitionError'), 196 'SpeechRecognition.error': ('error', 'SpeechRecognitionError'),
193 'SpeechRecognition.nomatch': ('noMatch', 'SpeechRecognitionEvent'), 197 'SpeechRecognition.nomatch': ('noMatch', 'SpeechRecognitionEvent'),
194 'SpeechRecognition.result': ('result', 'SpeechRecognitionEvent'), 198 'SpeechRecognition.result': ('result', 'SpeechRecognitionEvent'),
195 'SpeechRecognition.soundend': ('soundEnd', 'Event'), 199 'SpeechRecognition.soundend': ('soundEnd', 'Event'),
196 'SpeechRecognition.soundstart': ('soundStart', 'Event'), 200 'SpeechRecognition.soundstart': ('soundStart', 'Event'),
197 'SpeechRecognition.speechend': ('speechEnd', 'Event'), 201 'SpeechRecognition.speechend': ('speechEnd', 'Event'),
198 'SpeechRecognition.speechstart': ('speechStart', 'Event'), 202 'SpeechRecognition.speechstart': ('speechStart', 'Event'),
199 'SpeechRecognition.start': ('start', 'Event'), 203 'SpeechRecognition.start': ('start', 'Event'),
200 'SpeechSynthesisUtterance.boundary': ('boundary', 'SpeechSynthesisEvent'), 204 'SpeechSynthesisUtterance.boundary': ('boundary', 'SpeechSynthesisEvent'),
201 'SpeechSynthesisUtterance.end': ('end', 'SpeechSynthesisEvent'), 205 'SpeechSynthesisUtterance.end': ('end', 'SpeechSynthesisEvent'),
202 'SpeechSynthesisUtterance.mark': ('mark', 'SpeechSynthesisEvent'), 206 'SpeechSynthesisUtterance.mark': ('mark', 'SpeechSynthesisEvent'),
203 'SpeechSynthesisUtterance.resume': ('resume', 'SpeechSynthesisEvent'), 207 'SpeechSynthesisUtterance.resume': ('resume', 'SpeechSynthesisEvent'),
204 'SpeechSynthesisUtterance.start': ('start', 'SpeechSynthesisEvent'), 208 'SpeechSynthesisUtterance.start': ('start', 'SpeechSynthesisEvent'),
205 'TextTrack.cuechange': ('cueChange', 'Event'), 209 'TextTrack.cuechange': ('cueChange', 'Event'),
206 'TextTrackCue.enter': ('enter', 'Event'), 210 'TextTrackCue.enter': ('enter', 'Event'),
207 'TextTrackCue.exit': ('exit', 'Event'), 211 'TextTrackCue.exit': ('exit', 'Event'),
208 'TextTrackList.addtrack': ('addTrack', 'TrackEvent'), 212 'TextTrackList.addtrack': ('addTrack', 'TrackEvent'),
209 'WebSocket.close': ('close', 'CloseEvent'), 213 'WebSocket.close': ('close', 'CloseEvent'),
210 'WebSocket.open': ('open', 'Event'), # should be OpenEvent, but not exposed. 214 'WebSocket.open': ('open', 'Event'), # should be OpenEvent, but not exposed.
211 'Window.DOMContentLoaded': ('contentLoaded', 'Event'), 215 'Window.DOMContentLoaded': ('contentLoaded', 'Event'),
212 'Window.devicemotion': ('deviceMotion', 'DeviceMotionEvent'), 216 'Window.devicemotion': ('deviceMotion', 'DeviceMotionEvent'),
213 'Window.deviceorientation': ('deviceOrientation', 'DeviceOrientationEvent'), 217 'Window.deviceorientation': ('deviceOrientation', 'DeviceOrientationEvent'),
214 'Window.loadstart': ('loadStart', 'Event'), 218 'Window.loadstart': ('loadStart', 'Event'),
215 'Window.pagehide': ('pageHide', 'Event'), 219 'Window.pagehide': ('pageHide', 'Event'),
216 'Window.pageshow': ('pageShow', 'Event'), 220 'Window.pageshow': ('pageShow', 'Event'),
217 'Window.progress': ('progress', 'Event'), 221 'Window.progress': ('progress', 'Event'),
222 'Window.webkittransitionend': ('webkitTransitionEnd', 'TransitionEvent'),
218 'XMLHttpRequestEventTarget.abort': ('abort', 'ProgressEvent'), 223 'XMLHttpRequestEventTarget.abort': ('abort', 'ProgressEvent'),
219 'XMLHttpRequestEventTarget.error': ('error', 'ProgressEvent'), 224 'XMLHttpRequestEventTarget.error': ('error', 'ProgressEvent'),
220 'XMLHttpRequestEventTarget.load': ('load', 'ProgressEvent'), 225 'XMLHttpRequestEventTarget.load': ('load', 'ProgressEvent'),
221 'XMLHttpRequestEventTarget.loadend': ('loadEnd', 'ProgressEvent'), 226 'XMLHttpRequestEventTarget.loadend': ('loadEnd', 'ProgressEvent'),
222 'XMLHttpRequestEventTarget.loadstart': ('loadStart', 'ProgressEvent'), 227 'XMLHttpRequestEventTarget.loadstart': ('loadStart', 'ProgressEvent'),
223 'XMLHttpRequestEventTarget.progress': ('progress', 'ProgressEvent'), 228 'XMLHttpRequestEventTarget.progress': ('progress', 'ProgressEvent'),
229 'XMLHttpRequestEventTarget.timeout': ('timeout', 'ProgressEvent'),
224 'XMLHttpRequest.readystatechange': ('readyStateChange', 'ProgressEvent'), 230 'XMLHttpRequest.readystatechange': ('readyStateChange', 'ProgressEvent'),
225 }) 231 })
226 232
227 # These classes require an explicit declaration for the "on" method even though 233 # These classes require an explicit declaration for the "on" method even though
228 # they don't declare any unique events, because the concrete class hierarchy 234 # they don't declare any unique events, because the concrete class hierarchy
229 # doesn't match the interface hierarchy. 235 # doesn't match the interface hierarchy.
230 _html_explicit_event_classes = set(['DocumentFragment']) 236 _html_explicit_event_classes = set(['DocumentFragment'])
231 237
232 class HtmlEventGenerator(object): 238 class HtmlEventGenerator(object):
233 239
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 """ 403 """
398 key = '%s.%s' % (html_interface_name, dom_event_name) 404 key = '%s.%s' % (html_interface_name, dom_event_name)
399 if key in _html_event_types: 405 if key in _html_event_types:
400 return _html_event_types[key] 406 return _html_event_types[key]
401 key = '*.%s' % dom_event_name 407 key = '*.%s' % dom_event_name
402 if key in _html_event_types: 408 if key in _html_event_types:
403 return _html_event_types[key] 409 return _html_event_types[key]
404 _logger.warn('Cannot resolve event type for %s.%s' % 410 _logger.warn('Cannot resolve event type for %s.%s' %
405 (html_interface_name, dom_event_name)) 411 (html_interface_name, dom_event_name))
406 return None 412 return None
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698