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

Side by Side Diff: lib/dom/scripts/systemhtml.py

Issue 9949057: Add touchenter event even though it doesn't have an ontouchenter method in the DOM. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 | « no previous file | lib/html/dartium/html_dartium.dart » ('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 shared functionality for the system to generate 6 """This module provides shared functionality for the system to generate
7 Dart:html APIs from the IDL database.""" 7 Dart:html APIs from the IDL database."""
8 8
9 from systemfrog import * 9 from systemfrog import *
10 from systeminterface import * 10 from systeminterface import *
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 "Node.get:PROCESSING_INSTRUCTION_NODE", 268 "Node.get:PROCESSING_INSTRUCTION_NODE",
269 "Notification.dispatchEvent", 269 "Notification.dispatchEvent",
270 "Notification.addEventListener", 270 "Notification.addEventListener",
271 "Notification.removeEventListener"]) 271 "Notification.removeEventListener"])
272 272
273 # Events without onEventName attributes in the IDL we want to support. 273 # Events without onEventName attributes in the IDL we want to support.
274 # We can automatically extract most event event names by checking for 274 # We can automatically extract most event event names by checking for
275 # onEventName methods in the IDL but some events aren't listed so we need 275 # onEventName methods in the IDL but some events aren't listed so we need
276 # to manually add them here so that they are easy for users to find. 276 # to manually add them here so that they are easy for users to find.
277 _html_manual_events = { 277 _html_manual_events = {
278 'Element': ['touchleave', 'webkitTransitionEnd'], 278 'Element': ['touchleave', 'touchenter', 'webkitTransitionEnd'],
279 'Window': ['DOMContentLoaded'] 279 'Window': ['DOMContentLoaded']
280 } 280 }
281 281
282 # These event names must be camel case when attaching event listeners 282 # These event names must be camel case when attaching event listeners
283 # using addEventListener even though the onEventName properties in the DOM for 283 # using addEventListener even though the onEventName properties in the DOM for
284 # them are not camel case. 284 # them are not camel case.
285 _on_attribute_to_event_name_mapping = { 285 _on_attribute_to_event_name_mapping = {
286 'webkitanimationend': 'webkitAnimationEnd', 286 'webkitanimationend': 'webkitAnimationEnd',
287 'webkitanimationiteration': 'webkitAnimationIteration', 287 'webkitanimationiteration': 'webkitAnimationIteration',
288 'webkitanimationstart': 'webkitAnimationStart', 288 'webkitanimationstart': 'webkitAnimationStart',
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 'selectionchange': 'selectionChange', 372 'selectionchange': 'selectionChange',
373 'selectstart': 'selectStart', 373 'selectstart': 'selectStart',
374 'show': 'show', 374 'show': 'show',
375 'stalled': 'stalled', 375 'stalled': 'stalled',
376 'storage': 'storage', 376 'storage': 'storage',
377 'submit': 'submit', 377 'submit': 'submit',
378 'suspend': 'suspend', 378 'suspend': 'suspend',
379 'timeupdate': 'timeUpdate', 379 'timeupdate': 'timeUpdate',
380 'touchcancel': 'touchCancel', 380 'touchcancel': 'touchCancel',
381 'touchend': 'touchEnd', 381 'touchend': 'touchEnd',
382 'touchenter': 'touchEnter',
382 'touchmove': 'touchMove', 383 'touchmove': 'touchMove',
383 'touchstart': 'touchStart', 384 'touchstart': 'touchStart',
384 'unload': 'unload', 385 'unload': 'unload',
385 'updateready': 'updateReady', 386 'updateready': 'updateReady',
386 'volumechange': 'volumeChange', 387 'volumechange': 'volumeChange',
387 'waiting': 'waiting', 388 'waiting': 'waiting',
388 'webkitAnimationEnd': 'animationEnd', 389 'webkitAnimationEnd': 'animationEnd',
389 'webkitAnimationIteration': 'animationIteration', 390 'webkitAnimationIteration': 'animationIteration',
390 'webkitAnimationStart': 'animationStart', 391 'webkitAnimationStart': 'animationStart',
391 'webkitfullscreenchange': 'fullscreenChange', 392 'webkitfullscreenchange': 'fullscreenChange',
(...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1645 # dispatch has removed f(X), leaving only f(Y), but there is no guarantee 1646 # dispatch has removed f(X), leaving only f(Y), but there is no guarantee
1646 # that Y = Z-X, so we need to check for Y. 1647 # that Y = Z-X, so we need to check for Y.
1647 true_code = emitter.Emit( 1648 true_code = emitter.Emit(
1648 '$(INDENT)if ($COND) {\n' 1649 '$(INDENT)if ($COND) {\n'
1649 '$!TRUE' 1650 '$!TRUE'
1650 '$(INDENT)}\n', 1651 '$(INDENT)}\n',
1651 COND=test, INDENT=indent) 1652 COND=test, INDENT=indent)
1652 self.GenerateDispatch( 1653 self.GenerateDispatch(
1653 true_code, info, indent + ' ', position + 1, positive) 1654 true_code, info, indent + ' ', position + 1, positive)
1654 return True 1655 return True
OLDNEW
« no previous file with comments | « no previous file | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698