mirror of
https://forge.fsky.io/oneflux/omegafox.git
synced 2026-02-10 11:02:03 -08:00
Fix viewport hijacking beta.9
Fixes Playwright's setDefaultViewport overriding Camoufox viewport data.
This commit is contained in:
parent
110eb970c9
commit
752a36c9c2
2 changed files with 7 additions and 7 deletions
|
|
@ -13,7 +13,7 @@ const Cr = Components.results;
|
||||||
|
|
||||||
const helper = new Helper();
|
const helper = new Helper();
|
||||||
|
|
||||||
const IDENTITY_NAME = 'JUGGLER ';
|
const IDENTITY_NAME = 'Camoufox ';
|
||||||
const HUNDRED_YEARS = 60 * 60 * 24 * 365 * 100;
|
const HUNDRED_YEARS = 60 * 60 * 24 * 365 * 100;
|
||||||
|
|
||||||
const ALL_PERMISSIONS = [
|
const ALL_PERMISSIONS = [
|
||||||
|
|
@ -571,10 +571,8 @@ class PageTarget {
|
||||||
// default viewport.
|
// default viewport.
|
||||||
|
|
||||||
// Do not allow default viewport size if Camoufox set it first
|
// Do not allow default viewport size if Camoufox set it first
|
||||||
const viewportSize = this._viewportSize || this._browserContext.defaultViewportSize;
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!viewportSize &&
|
!this._viewportSize &&
|
||||||
this._browserContext.defaultViewportSize && (
|
this._browserContext.defaultViewportSize && (
|
||||||
ChromeUtils.camouGetConfig("window.outerWidth") ||
|
ChromeUtils.camouGetConfig("window.outerWidth") ||
|
||||||
ChromeUtils.camouGetConfig("window.outerHeight") ||
|
ChromeUtils.camouGetConfig("window.outerHeight") ||
|
||||||
|
|
@ -584,6 +582,8 @@ class PageTarget {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const viewportSize = this._viewportSize || this._browserContext.defaultViewportSize;
|
||||||
|
|
||||||
if (viewportSize) {
|
if (viewportSize) {
|
||||||
const {width, height} = viewportSize;
|
const {width, height} = viewportSize;
|
||||||
this._linkedBrowser.style.setProperty('width', width + 'px');
|
this._linkedBrowser.style.setProperty('width', width + 'px');
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
version=130.0.1
|
version=130.0.1
|
||||||
release=beta.8
|
release=beta.9
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue