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

Unified Diff: content/renderer/gpu/gpu_benchmarking_extension.cc

Issue 945393002: Adding support for diagonal scrolling to telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a bug which would take the minimum of two numbers (even though one would likely be negative).… Created 5 years, 10 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/renderer/gpu/gpu_benchmarking_extension.cc
diff --git a/content/renderer/gpu/gpu_benchmarking_extension.cc b/content/renderer/gpu/gpu_benchmarking_extension.cc
index 1f2369df8a7fd79cd923efea81ba9ecc622b5b4c..d082f8849bac8ed9b422e697ca2cbdc29d9d67b0 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);
« no previous file with comments | « no previous file | tools/perf/benchmarks/smoothness.py » ('j') | tools/telemetry/telemetry/page/actions/scroll_unittest.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698