From 8eb56468216ac1f10ebc599f89621dbaaf605313 Mon Sep 17 00:00:00 2001 From: cblume Date: Thu, 12 Mar 2015 18:14:13 -0700 Subject: Adding support for diagonal scrolling to telemetry. BUG=466867 Review URL: https://codereview.chromium.org/945393002 Cr-Commit-Position: refs/heads/master@{#320419} --- content/renderer/gpu/gpu_benchmarking_extension.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'content') diff --git a/content/renderer/gpu/gpu_benchmarking_extension.cc b/content/renderer/gpu/gpu_benchmarking_extension.cc index 2345995..4e42483 100644 --- a/content/renderer/gpu/gpu_benchmarking_extension.cc +++ b/content/renderer/gpu/gpu_benchmarking_extension.cc @@ -367,7 +367,19 @@ bool BeginSmoothScroll(v8::Isolate* isolate, distance.set_x(-distance_length); else if (direction == "left") distance.set_x(distance_length); - else { + else if (direction == "upleft") { + distance.set_y(distance_length); + distance.set_x(distance_length); + } else if (direction == "upright") { + distance.set_y(distance_length); + distance.set_x(-distance_length); + } else if (direction == "downleft") { + distance.set_y(-distance_length); + distance.set_x(distance_length); + } else if (direction == "downright") { + distance.set_y(-distance_length); + distance.set_x(-distance_length); + } else { return false; } gesture_params->distances.push_back(distance); -- cgit v1.1