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

Side by Side Diff: tools/telemetry/telemetry/internal/actions/gesture_common.js

Issue 1400213002: Update telemetry tests that rely on window.innerWidth/Height. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/public/web/WebView.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file provides common functionality for synthetic gesture actions. 5 // This file provides common functionality for synthetic gesture actions.
6 'use strict'; 6 'use strict';
7 7
8 (function() { 8 (function() {
9 9
10 // Returns the bounding rectangle wrt to the top-most document. 10 // Returns the bounding rectangle wrt to the top-most document.
(...skipping 21 matching lines...) Expand all
32 var rect = getBoundingRect(el); 32 var rect = getBoundingRect(el);
33 if (rect.top < 0) { 33 if (rect.top < 0) {
34 rect.height += rect.top; 34 rect.height += rect.top;
35 rect.top = 0; 35 rect.top = 0;
36 } 36 }
37 if (rect.left < 0) { 37 if (rect.left < 0) {
38 rect.width += rect.left; 38 rect.width += rect.left;
39 rect.left = 0; 39 rect.left = 0;
40 } 40 }
41 41
42 var outsideHeight = (rect.top + rect.height) - window.innerHeight; 42 var outsideHeight = (rect.top + rect.height) -
43 var outsideWidth = (rect.left + rect.width) - window.innerWidth; 43 chrome.gpuBenchmarking.visualViewportHeight();
Sami 2015/10/14 10:44:38 Some telemetry tests run against older reference b
ymalik 2015/10/14 15:56:10 Done. We do have plans in the future (perhaps ne
44 var outsideWidth = (rect.left + rect.width) -
45 chrome.gpuBenchmarking.visualViewportWidth();
44 46
45 if (outsideHeight > 0) { 47 if (outsideHeight > 0) {
46 rect.height -= outsideHeight; 48 rect.height -= outsideHeight;
47 } 49 }
48 if (outsideWidth > 0) { 50 if (outsideWidth > 0) {
49 rect.width -= outsideWidth; 51 rect.width -= outsideWidth;
50 } 52 }
51 return rect; 53 return rect;
52 }; 54 };
53 55
54 window.__GestureCommon_GetBoundingVisibleRect = getBoundingVisibleRect; 56 window.__GestureCommon_GetBoundingVisibleRect = getBoundingVisibleRect;
55 })(); 57 })();
OLDNEW
« no previous file with comments | « third_party/WebKit/public/web/WebView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698