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

Unified Diff: telemetry/telemetry/internal/actions/drag.js

Issue 2138883002: Fix computation of scroll amount in scroll actions. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: Address comments Created 4 years, 5 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
« no previous file with comments | « no previous file | telemetry/telemetry/internal/actions/drag.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/internal/actions/drag.js
diff --git a/telemetry/telemetry/internal/actions/drag.js b/telemetry/telemetry/internal/actions/drag.js
index cee51ae9e9c2b410b51945cf5dd1d21e51a9dbec..8c5613c955c249a1c6df1805b56db74f80828df7 100644
--- a/telemetry/telemetry/internal/actions/drag.js
+++ b/telemetry/telemetry/internal/actions/drag.js
@@ -10,26 +10,28 @@
(function() {
function DragGestureOptions(opt_options) {
- this.element_ = opt_options.element;
- this.left_start_ratio_ = opt_options.left_start_ratio;
- this.top_start_ratio_ = opt_options.top_start_ratio;
- this.left_end_ratio_ = opt_options.left_end_ratio;
- this.top_end_ratio_ = opt_options.top_end_ratio;
- this.speed_ = opt_options.speed;
- this.gesture_source_type_ = opt_options.gesture_source_type;
+ this.element_ = opt_options.element;
+ this.left_start_ratio_ = opt_options.left_start_ratio;
+ this.top_start_ratio_ = opt_options.top_start_ratio;
+ this.left_end_ratio_ = opt_options.left_end_ratio;
+ this.top_end_ratio_ = opt_options.top_end_ratio;
+ this.speed_ = opt_options.speed;
+ this.gesture_source_type_ = opt_options.gesture_source_type;
}
function supportedByBrowser() {
return !!(window.chrome &&
chrome.gpuBenchmarking &&
- chrome.gpuBenchmarking.smoothDrag);
+ chrome.gpuBenchmarking.smoothDrag &&
+ chrome.gpuBenchmarking.visualViewportHeight &&
+ chrome.gpuBenchmarking.visualViewportWidth);
}
// This class performs drag action using given start and end positions,
// by a single drag gesture.
function DragAction(opt_callback) {
- this.beginMeasuringHook = function() {}
- this.endMeasuringHook = function() {}
+ this.beginMeasuringHook = function() {};
+ this.endMeasuringHook = function() {};
this.callback_ = opt_callback;
}
« no previous file with comments | « no previous file | telemetry/telemetry/internal/actions/drag.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698