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

Unified Diff: public/web/WebInputEvent.h

Issue 759073002: Add canScroll bit to WebMouseWheelEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modify unit test 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: public/web/WebInputEvent.h
diff --git a/public/web/WebInputEvent.h b/public/web/WebInputEvent.h
index ab7e4aba73b7186d8a9a70ec2efc8ebdd5da7618..3a137ce2665f9de5cfa4c835de790cada9358ae9 100644
--- a/public/web/WebInputEvent.h
+++ b/public/web/WebInputEvent.h
@@ -362,6 +362,13 @@ public:
Phase momentumPhase;
// See comment at the top of the file for why an int is used here.
+ // When false, this wheel event should not trigger scrolling (or any other default
+ // action) if the event goes unhandled by JavaScript. This is used, for example,
+ // when the browser decides the default behavior for Ctrl+Wheel should be to zoom
+ // instead of scroll.
+ int canScroll;
+
+ // See comment at the top of the file for why an int is used here.
// Rubberbanding is an OSX visual effect. When a user scrolls the content
// area with a track pad, and the content area is already at its limit in
// the direction being scrolled, the entire content area is allowed to
@@ -391,6 +398,7 @@ public:
, hasPreciseScrollingDeltas(false)
, phase(PhaseNone)
, momentumPhase(PhaseNone)
+ , canScroll(true)
, canRubberbandLeft(true)
, canRubberbandRight(true)
{

Powered by Google App Engine
This is Rietveld 408576698