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

Unified Diff: content/browser/web_contents/web_contents_impl_unittest.cc

Issue 819993002: Revert of Explicitly suppress scrolling for wheel events that will trigger zooming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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: content/browser/web_contents/web_contents_impl_unittest.cc
diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc
index 12d04eebe45b1fb463281e275d012360297a88f3..ba1a8f00734c0f34eb5ead8f5146a8ae860aa2e3 100644
--- a/content/browser/web_contents/web_contents_impl_unittest.cc
+++ b/content/browser/web_contents/web_contents_impl_unittest.cc
@@ -2476,18 +2476,15 @@
EXPECT_FALSE(contents()->HandleWheelEvent(event));
EXPECT_EQ(0, delegate->GetAndResetContentsZoomChangedCallCount());
- modifiers = WebInputEvent::ShiftKey | WebInputEvent::AltKey |
- WebInputEvent::ControlKey;
+ modifiers = WebInputEvent::ShiftKey | WebInputEvent::AltKey;
event = SyntheticWebMouseWheelEventBuilder::Build(0, 1, modifiers, false);
EXPECT_FALSE(contents()->HandleWheelEvent(event));
EXPECT_EQ(0, delegate->GetAndResetContentsZoomChangedCallCount());
- // But whenever the ctrl modifier is applied with canScroll=false, they can
- // increase/decrease zoom. Except on MacOS where we never want to adjust zoom
- // with mousewheel.
+ // But whenever the ctrl modifier is applied, they can increase/decrease zoom.
+ // Except on MacOS where we never want to adjust zoom with mousewheel.
modifiers = WebInputEvent::ControlKey;
event = SyntheticWebMouseWheelEventBuilder::Build(0, 1, modifiers, false);
- event.canScroll = false;
bool handled = contents()->HandleWheelEvent(event);
#if defined(OS_MACOSX)
EXPECT_FALSE(handled);
@@ -2501,7 +2498,6 @@
modifiers = WebInputEvent::ControlKey | WebInputEvent::ShiftKey |
WebInputEvent::AltKey;
event = SyntheticWebMouseWheelEventBuilder::Build(2, -5, modifiers, false);
- event.canScroll = false;
handled = contents()->HandleWheelEvent(event);
#if defined(OS_MACOSX)
EXPECT_FALSE(handled);
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/common/input/synthetic_web_input_event_builders.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698