| 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 95c8ab0732542b22c791417b26ccd2f72b485a1d..a541a048873201b4cb6a90b8cd7988f82df1e38b 100644
|
| --- a/sdk/lib/html/dart2js/html_dart2js.dart
|
| +++ b/sdk/lib/html/dart2js/html_dart2js.dart
|
| @@ -26438,6 +26438,11 @@ class WheelEvent extends MouseEvent native "*WheelEvent" {
|
| eventType = 'MouseScrollEvents';
|
| }
|
| final event = document.$dom_createEvent(eventType);
|
| + // If polyfilling, then flip these to match W3C wheel spec.
|
| + if (JS('bool', '#.deltaY === undefined', event)) {
|
| + deltaX = -deltaX;
|
| + deltaY = -deltaY;
|
| + }
|
| if (event._hasInitWheelEvent) {
|
| var modifiers = [];
|
| if (ctrlKey) {
|
| @@ -26514,7 +26519,7 @@ class WheelEvent extends MouseEvent native "*WheelEvent" {
|
| return this._deltaY;
|
| } else if (JS('bool', '#.wheelDelta !== undefined', this)) {
|
| // Chrome and IE
|
| - return this._wheelDelta;
|
| + return -this._wheelDelta;
|
| } else if (JS('bool', '#.detail !== undefined', this)) {
|
| // Firefox
|
|
|
| @@ -26525,9 +26530,9 @@ class WheelEvent extends MouseEvent native "*WheelEvent" {
|
| // 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 * 40;
|
| }
|
| - return detail;
|
| + return -detail;
|
| }
|
| return 0;
|
| }
|
| @@ -26542,7 +26547,7 @@ class WheelEvent extends MouseEvent native "*WheelEvent" {
|
| return this._deltaX;
|
| } else if (JS('bool', '#.wheelDeltaX !== undefined', this)) {
|
| // Chrome
|
| - return this._wheelDeltaX;
|
| + return -this._wheelDeltaX;
|
| } else if (JS('bool', '#.detail !== undefined', this)) {
|
| // Firefox and IE.
|
| // IE will have detail set but will not set axis.
|
| @@ -26555,9 +26560,9 @@ class WheelEvent extends MouseEvent native "*WheelEvent" {
|
| // 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 * 40;
|
| }
|
| - return detail;
|
| + return -detail;
|
| }
|
| return 0;
|
| }
|
|
|