mirror of
https://forge.fsky.io/oneflux/omegafox.git
synced 2026-02-11 06:52:04 -08:00
Don't block setViewport
When window.innerWidth or window.innerHeight is not provided, allow Juggler's setViewport to still work.
This commit is contained in:
parent
c70886fbcd
commit
8ed8a97ae9
1 changed files with 10 additions and 4 deletions
|
|
@ -383,11 +383,17 @@ class PageTarget {
|
||||||
this._tab = tab;
|
this._tab = tab;
|
||||||
this._linkedBrowser = tab.linkedBrowser;
|
this._linkedBrowser = tab.linkedBrowser;
|
||||||
this._browserContext = browserContext;
|
this._browserContext = browserContext;
|
||||||
|
this._viewportSize = undefined;
|
||||||
// Set the viewport size to Camoufox's default value.
|
// Set the viewport size to Camoufox's default value.
|
||||||
|
if (
|
||||||
|
ChromeUtils.camouGetInt("window.innerWidth")
|
||||||
|
|| ChromeUtils.camouGetInt("window.innerHeight")
|
||||||
|
) {
|
||||||
this._viewportSize = {
|
this._viewportSize = {
|
||||||
width: ChromeUtils.camouGetInt("window.innerWidth") || 1280,
|
width: ChromeUtils.camouGetInt("window.innerWidth") || 1280,
|
||||||
height: ChromeUtils.camouGetInt("window.innerHeight") || 720,
|
height: ChromeUtils.camouGetInt("window.innerHeight") || 720,
|
||||||
};;
|
};
|
||||||
|
}
|
||||||
this._initialDPPX = this._linkedBrowser.browsingContext.overrideDPPX;
|
this._initialDPPX = this._linkedBrowser.browsingContext.overrideDPPX;
|
||||||
this._url = 'about:blank';
|
this._url = 'about:blank';
|
||||||
this._openerId = opener ? opener.id() : undefined;
|
this._openerId = opener ? opener.id() : undefined;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue