summaryrefslogtreecommitdiffstats
path: root/devtools/shared/gcli/commands/screenshot.js
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-01 13:30:24 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-01 13:30:24 +0100
commitb43b4f25a8f195da2d54da9ebc5e415fb3b2a133 (patch)
treec07c07c10fdc94aa0e57a4f932b2eeaa0a4eed64 /devtools/shared/gcli/commands/screenshot.js
parent12ea5683594229407ae1852969b6417a59ae16e1 (diff)
downloadUXP-b43b4f25a8f195da2d54da9ebc5e415fb3b2a133.tar
UXP-b43b4f25a8f195da2d54da9ebc5e415fb3b2a133.tar.gz
UXP-b43b4f25a8f195da2d54da9ebc5e415fb3b2a133.tar.lz
UXP-b43b4f25a8f195da2d54da9ebc5e415fb3b2a133.tar.xz
UXP-b43b4f25a8f195da2d54da9ebc5e415fb3b2a133.zip
DevTools - gcli - screenshot - the vertical mode
https://github.com/MoonchildProductions/moebius/pull/166
Diffstat (limited to 'devtools/shared/gcli/commands/screenshot.js')
-rw-r--r--devtools/shared/gcli/commands/screenshot.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/devtools/shared/gcli/commands/screenshot.js b/devtools/shared/gcli/commands/screenshot.js
index e2f38b6d9..11bafcab9 100644
--- a/devtools/shared/gcli/commands/screenshot.js
+++ b/devtools/shared/gcli/commands/screenshot.js
@@ -277,6 +277,12 @@ function createScreenshotData(document, args) {
window.scrollTo(0,0);
width = window.innerWidth + window.scrollMaxX - window.scrollMinX;
height = window.innerHeight + window.scrollMaxY - window.scrollMinY;
+ let writingMode = "horizontal-tb";
+ if (window.getComputedStyle(document.documentElement)) {
+ writingMode = window.getComputedStyle(document.documentElement).writingMode;
+ }
+ let orientation = writingMode.substring(0, writingMode.indexOf("-")).toLowerCase();
+ left = ((orientation != "vertical") ? left : (-width + window.innerWidth));
filename = filename.replace(".png", "-fullpage.png");
}
else if (args.selector) {