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

Unified Diff: chrome/browser/resources/ntp4/tile_page.js

Issue 10092017: Mac: Prevent NTP mousewheel events from being suppressed on Lion. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Whoops - send message to class, not metaclass. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/ntp4/tile_page.js
diff --git a/chrome/browser/resources/ntp4/tile_page.js b/chrome/browser/resources/ntp4/tile_page.js
index 7a79c0b757441221b8012c2bf134401242fea7cd..5c91e4c1c92d2ed33bbbe111bc329bce84cd2f75 100644
--- a/chrome/browser/resources/ntp4/tile_page.js
+++ b/chrome/browser/resources/ntp4/tile_page.js
@@ -399,7 +399,7 @@ cr.define('ntp', function() {
TilePage.prototype = {
__proto__: HTMLDivElement.prototype,
- initialize: function() {
+ initialize: function(ignoreMouseWheelEvents) {
this.className = 'tile-page';
// Div that acts as a custom scrollbar. The scrollbar has to live
@@ -448,7 +448,6 @@ cr.define('ntp', function() {
this.addEventListener('DOMNodeInsertedIntoDocument',
this.onNodeInsertedIntoDocument_);
- this.addEventListener('mousewheel', this.onMouseWheel_);
this.content_.addEventListener('scroll', this.onScroll_.bind(this));
this.dragWrapper_ = new cr.ui.DragWrapper(this.tileGrid_, this);
@@ -1053,31 +1052,6 @@ cr.define('ntp', function() {
},
/**
- * Scrolls the page in response to a mousewheel event.
- * @param {Event} e The mousewheel event.
- */
- handleMouseWheel: function(e) {
- this.content_.scrollTop -= e.wheelDeltaY / 3;
- },
-
- /**
- * Handles mouse wheels on |this|. We handle this explicitly because we want
- * a consistent experience whether the user scrolls on the page or on the
- * page switcher (handleMouseWheel provides a common conversion factor
- * between wheel delta and scroll delta).
- * @param {Event} e The mousewheel event.
- * @private
- */
- onMouseWheel_: function(e) {
- if (e.wheelDeltaY == 0)
- return;
-
- this.handleMouseWheel(e);
- e.preventDefault();
- e.stopPropagation();
- },
-
- /**
* Handler for the 'scroll' event on |content_|.
* @param {Event} e The scroll event.
* @private

Powered by Google App Engine
This is Rietveld 408576698