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

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

Issue 23829002: Checkpoint in changes to match push (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: We were missing onReadyStateChange 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
« no previous file with comments | « tools/dom/scripts/generator.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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 'AbstractWorker.error': ('error', 'ErrorEvent'), 116 'AbstractWorker.error': ('error', 'ErrorEvent'),
117 'AudioContext.complete': ('complete', 'Event'), 117 'AudioContext.complete': ('complete', 'Event'),
118 'DOMApplicationCache.cached': ('cached', 'Event'), 118 'ApplicationCache.cached': ('cached', 'Event'),
119 'DOMApplicationCache.checking': ('checking', 'Event'), 119 'ApplicationCache.checking': ('checking', 'Event'),
120 'DOMApplicationCache.downloading': ('downloading', 'Event'), 120 'ApplicationCache.downloading': ('downloading', 'Event'),
121 'DOMApplicationCache.noupdate': ('noUpdate', 'Event'), 121 'ApplicationCache.noupdate': ('noUpdate', 'Event'),
122 'DOMApplicationCache.obsolete': ('obsolete', 'Event'), 122 'ApplicationCache.obsolete': ('obsolete', 'Event'),
123 'DOMApplicationCache.progress': ('progress', 'ProgressEvent'), 123 'ApplicationCache.progress': ('progress', 'ProgressEvent'),
124 'DOMApplicationCache.updateready': ('updateReady', 'Event'), 124 'ApplicationCache.updateready': ('updateReady', 'Event'),
125 'Document.readystatechange': ('readyStateChange', 'Event'), 125 'Document.readystatechange': ('readyStateChange', 'Event'),
126 'Document.securitypolicyviolation': ('securityPolicyViolation', 'SecurityPolic yViolationEvent'), 126 'Document.securitypolicyviolation': ('securityPolicyViolation', 'SecurityPolic yViolationEvent'),
127 'Document.selectionchange': ('selectionChange', 'Event'), 127 'Document.selectionchange': ('selectionChange', 'Event'),
128 'Document.webkitpointerlockchange': ('pointerLockChange', 'Event'), 128 'Document.webkitpointerlockchange': ('pointerLockChange', 'Event'),
129 'Document.webkitpointerlockerror': ('pointerLockError', 'Event'), 129 'Document.webkitpointerlockerror': ('pointerLockError', 'Event'),
130 'EventSource.open': ('open', 'Event'), 130 'EventSource.open': ('open', 'Event'),
131 'FileReader.abort': ('abort', 'ProgressEvent'), 131 'FileReader.abort': ('abort', 'ProgressEvent'),
132 'FileReader.load': ('load', 'ProgressEvent'), 132 'FileReader.load': ('load', 'ProgressEvent'),
133 'FileReader.loadend': ('loadEnd', 'ProgressEvent'), 133 'FileReader.loadend': ('loadEnd', 'ProgressEvent'),
134 'FileReader.loadstart': ('loadStart', 'ProgressEvent'), 134 'FileReader.loadstart': ('loadStart', 'ProgressEvent'),
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 'TextTrackList.addtrack': ('addTrack', 'TrackEvent'), 208 'TextTrackList.addtrack': ('addTrack', 'TrackEvent'),
209 'WebSocket.close': ('close', 'CloseEvent'), 209 'WebSocket.close': ('close', 'CloseEvent'),
210 'WebSocket.open': ('open', 'Event'), # should be OpenEvent, but not exposed. 210 'WebSocket.open': ('open', 'Event'), # should be OpenEvent, but not exposed.
211 'Window.DOMContentLoaded': ('contentLoaded', 'Event'), 211 'Window.DOMContentLoaded': ('contentLoaded', 'Event'),
212 'Window.devicemotion': ('deviceMotion', 'DeviceMotionEvent'), 212 'Window.devicemotion': ('deviceMotion', 'DeviceMotionEvent'),
213 'Window.deviceorientation': ('deviceOrientation', 'DeviceOrientationEvent'), 213 'Window.deviceorientation': ('deviceOrientation', 'DeviceOrientationEvent'),
214 'Window.loadstart': ('loadStart', 'Event'), 214 'Window.loadstart': ('loadStart', 'Event'),
215 'Window.pagehide': ('pageHide', 'Event'), 215 'Window.pagehide': ('pageHide', 'Event'),
216 'Window.pageshow': ('pageShow', 'Event'), 216 'Window.pageshow': ('pageShow', 'Event'),
217 'Window.progress': ('progress', 'Event'), 217 'Window.progress': ('progress', 'Event'),
218 'XMLHttpRequest.abort': ('abort', 'ProgressEvent'), 218 'XMLHttpRequestEventTarget.abort': ('abort', 'ProgressEvent'),
219 'XMLHttpRequest.error': ('error', 'ProgressEvent'), 219 'XMLHttpRequestEventTarget.error': ('error', 'ProgressEvent'),
220 'XMLHttpRequest.load': ('load', 'ProgressEvent'), 220 'XMLHttpRequestEventTarget.load': ('load', 'ProgressEvent'),
221 'XMLHttpRequest.loadend': ('loadEnd', 'ProgressEvent'), 221 'XMLHttpRequestEventTarget.loadend': ('loadEnd', 'ProgressEvent'),
222 'XMLHttpRequest.loadstart': ('loadStart', 'ProgressEvent'), 222 'XMLHttpRequestEventTarget.loadstart': ('loadStart', 'ProgressEvent'),
223 'XMLHttpRequest.progress': ('progress', 'ProgressEvent'), 223 'XMLHttpRequestEventTarget.progress': ('progress', 'ProgressEvent'),
224 'XMLHttpRequest.readystatechange': ('readyStateChange', 'ProgressEvent'), 224 'XMLHttpRequest.readystatechange': ('readyStateChange', 'ProgressEvent'),
225 'XMLHttpRequestUpload.abort': ('abort', 'ProgressEvent'),
226 'XMLHttpRequestUpload.error': ('error', 'ProgressEvent'),
227 'XMLHttpRequestUpload.load': ('load', 'ProgressEvent'),
228 'XMLHttpRequestUpload.loadend': ('loadEnd', 'ProgressEvent'),
229 'XMLHttpRequestUpload.loadstart': ('loadStart', 'ProgressEvent'),
230 'XMLHttpRequestUpload.progress': ('progress', 'ProgressEvent'),
231 }) 225 })
232 226
233 # These classes require an explicit declaration for the "on" method even though 227 # These classes require an explicit declaration for the "on" method even though
234 # they don't declare any unique events, because the concrete class hierarchy 228 # they don't declare any unique events, because the concrete class hierarchy
235 # doesn't match the interface hierarchy. 229 # doesn't match the interface hierarchy.
236 _html_explicit_event_classes = set(['DocumentFragment']) 230 _html_explicit_event_classes = set(['DocumentFragment'])
237 231
238 class HtmlEventGenerator(object): 232 class HtmlEventGenerator(object):
239 233
240 def __init__(self, database, renamer, metadata, template_loader): 234 def __init__(self, database, renamer, metadata, template_loader):
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 """ 397 """
404 key = '%s.%s' % (html_interface_name, dom_event_name) 398 key = '%s.%s' % (html_interface_name, dom_event_name)
405 if key in _html_event_types: 399 if key in _html_event_types:
406 return _html_event_types[key] 400 return _html_event_types[key]
407 key = '*.%s' % dom_event_name 401 key = '*.%s' % dom_event_name
408 if key in _html_event_types: 402 if key in _html_event_types:
409 return _html_event_types[key] 403 return _html_event_types[key]
410 _logger.warn('Cannot resolve event type for %s.%s' % 404 _logger.warn('Cannot resolve event type for %s.%s' %
411 (html_interface_name, dom_event_name)) 405 (html_interface_name, dom_event_name))
412 return None 406 return None
OLDNEW
« no previous file with comments | « tools/dom/scripts/generator.py ('k') | tools/dom/scripts/htmlrenamer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698