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

Unified Diff: tools/telemetry/telemetry/page/actions/gesture_common.js

Issue 265933006: Fix Telemetry to calculate bounding visible rect correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 | tools/telemetry/telemetry/page/actions/scroll_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/page/actions/gesture_common.js
diff --git a/tools/telemetry/telemetry/page/actions/gesture_common.js b/tools/telemetry/telemetry/page/actions/gesture_common.js
index d977e37136f53f83fbad8312534bc82c54305f2f..1d21628d47053f97b741ca68680f14360398ecf0 100644
--- a/tools/telemetry/telemetry/page/actions/gesture_common.js
+++ b/tools/telemetry/telemetry/page/actions/gesture_common.js
@@ -13,6 +13,15 @@
left: bound.left,
width: bound.width,
height: bound.height };
+ if (rect.top < 0) {
+ rect.height += rect.top;
+ rect.top = 0;
+ }
+ if (rect.left < 0) {
+ rect.width += rect.left;
+ rect.left = 0;
+ }
+
var outsideHeight = (rect.top + rect.height) - window.innerHeight;
var outsideWidth = (rect.left + rect.width) - window.innerWidth;
« no previous file with comments | « no previous file | tools/telemetry/telemetry/page/actions/scroll_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698