summaryrefslogtreecommitdiffstats
path: root/devtools/shared
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/shared')
-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) {