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

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: rebase 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
« no previous file with comments | « Source/web/tests/WebInputEventConversionTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebInputEvent.h
diff --git a/public/web/WebInputEvent.h b/public/web/WebInputEvent.h
index c654875d67e0e1452d682e7f1486af5ebf84019a..eabad6b62a615f1b02a7f12c1b5b084604f2e26b 100644
--- a/public/web/WebInputEvent.h
+++ b/public/web/WebInputEvent.h
@@ -374,6 +374,12 @@ public:
bool scrollByPage;
bool hasPreciseScrollingDeltas;
+ // 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.
+ bool canScroll;
+
WebMouseWheelEvent()
: WebMouseEvent(sizeof(WebMouseWheelEvent))
, deltaX(0.0f)
@@ -388,6 +394,7 @@ public:
, canRubberbandRight(true)
, scrollByPage(false)
, hasPreciseScrollingDeltas(false)
+ , canScroll(true)
{
}
};
« no previous file with comments | « Source/web/tests/WebInputEventConversionTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698