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

Unified Diff: tools/dom/templates/html/impl/impl_WheelEvent.darttemplate

Issue 12335036: Fixing WheelEvent.deltaMode polyfill after IDL update. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_WheelEvent.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate b/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate
index 1ce11692f5e9be0576c67d7fd5125b38da2ed3d8..c49d8f6b20151666a60e45e2472c7dc6c1aca5be 100644
--- a/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate
+++ b/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate
@@ -134,6 +134,15 @@ $if DART2JS
'deltaX is not supported');
}
+ @DomName('WheelEvent.deltaMode')
+ int get deltaMode {
+ if (JS('bool', '!!(#.deltaMode)', this)) {
+ return JS('int', '#.deltaMode', this);
+ }
+ // If not available then we're poly-filling and doing pixel scroll.
+ return 0;
+ }
+
num get _deltaY => JS('num', '#.deltaY', this);
num get _deltaX => JS('num', '#.deltaX', this);
num get _wheelDelta => JS('num', '#.wheelDelta', this);
@@ -188,6 +197,5 @@ $else
num get deltaX => $dom_wheelDeltaX;
@DomName('WheelEvent.deltaY')
num get deltaY => $dom_wheelDeltaY;
-
$endif
}
« no previous file with comments | « tools/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698