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

Unified Diff: content/common/input/web_input_event_traits.cc

Issue 835523006: Explicitly suppress scrolling for wheel events that will trigger zooming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add DCHECK Created 5 years, 11 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: content/common/input/web_input_event_traits.cc
diff --git a/content/common/input/web_input_event_traits.cc b/content/common/input/web_input_event_traits.cc
index fff5673131bdf0b4d02b678b60ead7d5c8777731..6ca962b5720d9741d2b6bc4d4d251f7e9a86b9ec 100644
--- a/content/common/input/web_input_event_traits.cc
+++ b/content/common/input/web_input_event_traits.cc
@@ -58,7 +58,7 @@ void ApppendEventDetails(const WebMouseWheelEvent& event, std::string* result) {
StringAppendF(result,
"{\n Delta: (%f, %f)\n WheelTicks: (%f, %f)\n Accel: (%f, %f)\n"
" ScrollByPage: %d\n HasPreciseScrollingDeltas: %d\n"
- " Phase: (%d, %d)\n CanRubberband: (%d, %d)\n}",
+ " Phase: (%d, %d)\n CanRubberband: (%d, %d)\n CanScroll: %d\n}",
event.deltaX,
event.deltaY,
event.wheelTicksX,
@@ -70,7 +70,8 @@ void ApppendEventDetails(const WebMouseWheelEvent& event, std::string* result) {
event.phase,
event.momentumPhase,
event.canRubberbandLeft,
- event.canRubberbandRight);
+ event.canRubberbandRight,
+ event.canScroll);
}
void ApppendEventDetails(const WebGestureEvent& event, std::string* result) {
@@ -149,7 +150,8 @@ bool CanCoalesce(const WebMouseWheelEvent& event_to_coalesce,
event.phase == event_to_coalesce.phase &&
event.momentumPhase == event_to_coalesce.momentumPhase &&
event.hasPreciseScrollingDeltas ==
- event_to_coalesce.hasPreciseScrollingDeltas;
+ event_to_coalesce.hasPreciseScrollingDeltas &&
+ event.canScroll == event_to_coalesce.canScroll;
}
float GetUnacceleratedDelta(float accelerated_delta, float acceleration_ratio) {
« no previous file with comments | « content/common/input/synthetic_web_input_event_builders.cc ('k') | content/common/input/web_input_event_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698