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

Unified Diff: sdk/lib/html/templates/html/impl/impl_WheelEvent.darttemplate

Issue 11691009: Moved most of html lib generating scripts into tools. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/html/templates/html/impl/impl_WheelEvent.darttemplate
diff --git a/sdk/lib/html/templates/html/impl/impl_WheelEvent.darttemplate b/sdk/lib/html/templates/html/impl/impl_WheelEvent.darttemplate
deleted file mode 100644
index d660a21e2f5ac083a59791313fe4009a0fd021b6..0000000000000000000000000000000000000000
--- a/sdk/lib/html/templates/html/impl/impl_WheelEvent.darttemplate
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) 2012, 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.
-
-part of html;
-
-/// @domName $DOMNAME
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
-$!MEMBERS
-
-$if DART2JS
- /** @domName WheelEvent.deltaY */
- num get deltaY {
- if (JS('bool', '#.deltaY !== undefined', this)) {
- // W3C WheelEvent
- return this._deltaY;
- } else if (JS('bool', '#.wheelDelta !== undefined', this)) {
- // Chrome and IE
- return this._wheelDelta;
- } else if (JS('bool', '#.detail !== undefined', this)) {
- // Firefox
-
- // Handle DOMMouseScroll case where it uses detail and the axis to
- // differentiate.
- if (JS('bool', '#.axis == MouseScrollEvent.VERTICAL_AXIS', this)) {
- var detail = this._detail;
- // Firefox is normally the number of lines to scale (normally 3)
- // so multiply it by 40 to get pixels to move, matching IE & WebKit.
- if (detail < 100) {
- return detail * 40;
- }
- return detail;
- }
- return 0;
- }
- throw new UnsupportedError(
- 'deltaY is not supported');
- }
-
- /** @domName WheelEvent.deltaX */
- num get deltaX {
- if (JS('bool', '#.deltaX !== undefined', this)) {
- // W3C WheelEvent
- return this._deltaX;
- } else if (JS('bool', '#.wheelDeltaX !== undefined', this)) {
- // Chrome
- return this._wheelDeltaX;
- } else if (JS('bool', '#.detail !== undefined', this)) {
- // Firefox and IE.
- // IE will have detail set but will not set axis.
-
- // Handle DOMMouseScroll case where it uses detail and the axis to
- // differentiate.
- if (JS('bool', '#.axis !== undefined && #.axis == MouseScrollEvent.HORIZONTAL_AXIS', this, this)) {
- var detail = this._detail;
- // Firefox is normally the number of lines to scale (normally 3)
- // so multiply it by 40 to get pixels to move, matching IE & WebKit.
- if (detail < 100) {
- return detail * 40;
- }
- return detail;
- }
- return 0;
- }
- throw new UnsupportedError(
- 'deltaX is not supported');
- }
-
- int get deltaMode {
- if (JS('bool', '!!#.deltaMode', this)) {
- // If not available then we're poly-filling and doing pixel scroll.
- return 0;
- }
- return this._deltaMode;
- }
-
- num get _deltaY => JS('num', '#.deltaY', this);
- num get _deltaX => JS('num', '#.deltaX', this);
- num get _wheelDelta => JS('num', '#.wheelDelta', this);
- num get _wheelDeltaX => JS('num', '#.wheelDeltaX', this);
- num get _detail => JS('num', '#.detail', this);
- int get _deltaMode => JS('int', '#.deltaMode', this);
-
-$else
- /** @domName WheelEvent.deltaX */
- num get deltaX => $dom_wheelDeltaX;
- /** @domName WheelEvent.deltaY */
- num get deltaY => $dom_wheelDeltaY;
- /** @domName WheelEvent.deltaMode */
- int get deltaMode => 0;
-
-$endif
-}

Powered by Google App Engine
This is Rietveld 408576698