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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 288873002: "Reverting 36191" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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:
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 9be513c9c9ec2a1ab7d986055f1f33dd8e5636e8..48e743efca3aa3fa62874594b46c07d08d455b8e 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -34935,6 +34935,95 @@ abstract class ReadyState {
/**
+ * Helper class to implement custom events which wrap DOM events.
+ */
+class _WrappedEvent implements Event {
+ final Event wrapped;
+
+ /** The CSS selector involved with event delegation. */
+ String _selector;
+
+ _WrappedEvent(this.wrapped);
+
+ bool get bubbles => wrapped.bubbles;
+
+ bool get cancelable => wrapped.cancelable;
+
+ DataTransfer get clipboardData => wrapped.clipboardData;
+
+ EventTarget get currentTarget => wrapped.currentTarget;
+
+ bool get defaultPrevented => wrapped.defaultPrevented;
+
+ int get eventPhase => wrapped.eventPhase;
+
+ EventTarget get target => wrapped.target;
+
+ int get timeStamp => wrapped.timeStamp;
+
+ String get type => wrapped.type;
+
+ void _initEvent(String eventTypeArg, bool canBubbleArg,
+ bool cancelableArg) {
+ throw new UnsupportedError(
+ 'Cannot initialize this Event.');
+ }
+
+ void preventDefault() {
+ wrapped.preventDefault();
+ }
+
+ void stopImmediatePropagation() {
+ wrapped.stopImmediatePropagation();
+ }
+
+ void stopPropagation() {
+ wrapped.stopPropagation();
+ }
+
+ /**
+ * A pointer to the element whose CSS selector matched within which an event
+ * was fired. If this Event was not associated with any Event delegation,
+ * accessing this value will throw an [UnsupportedError].
+ */
+ Element get matchingTarget {
+ if (_selector == null) {
+ throw new UnsupportedError('Cannot call matchingTarget if this Event did'
+ ' not arise as a result of event delegation.');
+ }
+ var currentTarget = this.currentTarget;
+ var target = this.target;
+ var matchedTarget;
+ do {
+ if (target.matches(_selector)) return target;
+ target = target.parent;
+ } while (target != null && target != currentTarget.parent);
+ throw new StateError('No selector matched for populating matchedTarget.');
+ }
+
+ /**
+ * This event's path, taking into account shadow DOM.
+ *
+ * ## Other resources
+ *
+ * * [Shadow DOM extensions to Event]
+ * (http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-event) from
+ * W3C.
+ */
+ // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#extensions-to-event
+ @Experimental()
+ List<Node> get path => wrapped.path;
+
+ dynamic get _get_currentTarget => wrapped._get_currentTarget;
+
+ dynamic get _get_target => wrapped._get_target;
+}
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/**
* A list which just wraps another list, for either intercepting list calls or
* retyping the list (for example, from List<A> to List<B> where B extends A).
*/
@@ -35705,95 +35794,6 @@ class Platform {
// BSD-style license that can be found in the LICENSE file.
-/**
- * Helper class to implement custom events which wrap DOM events.
- */
-class _WrappedEvent implements Event {
- final Event wrapped;
-
- /** The CSS selector involved with event delegation. */
- String _selector;
-
- _WrappedEvent(this.wrapped);
-
- bool get bubbles => wrapped.bubbles;
-
- bool get cancelable => wrapped.cancelable;
-
- DataTransfer get clipboardData => wrapped.clipboardData;
-
- EventTarget get currentTarget => wrapped.currentTarget;
-
- bool get defaultPrevented => wrapped.defaultPrevented;
-
- int get eventPhase => wrapped.eventPhase;
-
- EventTarget get target => wrapped.target;
-
- int get timeStamp => wrapped.timeStamp;
-
- String get type => wrapped.type;
-
- void _initEvent(String eventTypeArg, bool canBubbleArg,
- bool cancelableArg) {
- throw new UnsupportedError(
- 'Cannot initialize this Event.');
- }
-
- void preventDefault() {
- wrapped.preventDefault();
- }
-
- void stopImmediatePropagation() {
- wrapped.stopImmediatePropagation();
- }
-
- void stopPropagation() {
- wrapped.stopPropagation();
- }
-
- /**
- * A pointer to the element whose CSS selector matched within which an event
- * was fired. If this Event was not associated with any Event delegation,
- * accessing this value will throw an [UnsupportedError].
- */
- Element get matchingTarget {
- if (_selector == null) {
- throw new UnsupportedError('Cannot call matchingTarget if this Event did'
- ' not arise as a result of event delegation.');
- }
- var currentTarget = this.currentTarget;
- var target = this.target;
- var matchedTarget;
- do {
- if (target.matches(_selector)) return target;
- target = target.parent;
- } while (target != null && target != currentTarget.parent);
- throw new StateError('No selector matched for populating matchedTarget.');
- }
-
- /**
- * This event's path, taking into account shadow DOM.
- *
- * ## Other resources
- *
- * * [Shadow DOM extensions to Event]
- * (http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-event) from
- * W3C.
- */
- // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#extensions-to-event
- @Experimental()
- List<Node> get path => wrapped.path;
-
- dynamic get _get_currentTarget => wrapped._get_currentTarget;
-
- dynamic get _get_target => wrapped._get_target;
-}
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-
_wrapZone(callback(arg)) {
// For performance reasons avoid wrapping if we are in the root zone.
if (Zone.current == Zone.ROOT) return callback;
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698