Bug 1538256 - Do not subtract scrollbar width from node screenshots. r=gl
authorRazvan Caliman <rcaliman@mozilla.com>
Mon, 23 Mar 2020 23:43:36 +0000
changeset 520207 7e34f1465dd6134c90dc230003a152ff64ebeac0
parent 520206 7ccf355bd17eddde68097a1d8833cb57d36734bf
child 520208 d3e66b376d6b409a4b604188ff428e09550c0426
push id37245
push useropoprus@mozilla.com
push dateTue, 24 Mar 2020 21:46:41 +0000
treeherdermozilla-central@dbabf2e388fa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1538256
milestone76.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1538256 - Do not subtract scrollbar width from node screenshots. r=gl Differential Revision: https://phabricator.services.mozilla.com/D67906
devtools/shared/screenshot/capture.js
--- a/devtools/shared/screenshot/capture.js
+++ b/devtools/shared/screenshot/capture.js
@@ -74,17 +74,17 @@ function createScreenshotDataURL(documen
   } else {
     left = window.scrollX;
     top = window.scrollY;
     width = window.innerWidth;
     height = window.innerHeight;
   }
 
   // Only adjust for scrollbars when considering the full window
-  if (!args.selector) {
+  if (args.fullpage) {
     const winUtils = window.windowUtils;
     const scrollbarHeight = {};
     const scrollbarWidth = {};
     winUtils.getScrollbarSize(false, scrollbarWidth, scrollbarHeight);
     width -= scrollbarWidth.value;
     height -= scrollbarHeight.value;
   }