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

Unified Diff: chrome/browser/android/vr_shell/vr_shell.cc

Issue 2533493002: VR: Fix click during scrolling (Closed)
Patch Set: Rebase + Address Comments Created 4 years, 1 month 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 | « chrome/browser/android/vr_shell/vr_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/vr_shell.cc
diff --git a/chrome/browser/android/vr_shell/vr_shell.cc b/chrome/browser/android/vr_shell/vr_shell.cc
index 5c58081dcd53aee0a7ef018c996fff160a104ce2..3a89d7359123db1fdbb3c19f1c2d207aff492d3e 100644
--- a/chrome/browser/android/vr_shell/vr_shell.cc
+++ b/chrome/browser/android/vr_shell/vr_shell.cc
@@ -501,9 +501,16 @@ void VrShell::SendEventsToTarget(VrInputManager* input_target,
if (gesture->type == WebInputEvent::GestureScrollEnd) {
CHECK(gesture_list.size() == 2);
- std::unique_ptr<WebGestureEvent> fling_gesture =
+ std::unique_ptr<WebGestureEvent> followup_gesture =
std::move(gesture_list.back());
- content_input_manager_->ProcessUpdatedGesture(*fling_gesture.get());
+ if (followup_gesture->type == WebInputEvent::GestureTapDown) {
+ followup_gesture->data.tapDown.width = pixel_x;
+ followup_gesture->data.tapDown.height = pixel_y;
+ if (input_target != nullptr)
+ input_target->ProcessUpdatedGesture(*followup_gesture.get());
+ } else if (followup_gesture->type == WebInputEvent::GestureFlingStart) {
+ content_input_manager_->ProcessUpdatedGesture(*followup_gesture.get());
+ }
}
WebInputEvent::Type original_type = gesture->type;
« no previous file with comments | « chrome/browser/android/vr_shell/vr_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698