mirror of
https://forge.fsky.io/oneflux/omegafox.git
synced 2026-02-10 09:42:05 -08:00
Remove leaking Playwright patches
- Removed anti-zoom patch - Removed navigator.webdriver patch - Enable enterprise policies - Add back fission (fixes Kasada)
This commit is contained in:
parent
077f6acf47
commit
a22838ee13
3 changed files with 82 additions and 124 deletions
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/browser/app/moz.build b/browser/app/moz.build
|
||||
index c731e9798a..80617a4acc 100644
|
||||
index 434167c996..c6b47bc835 100644
|
||||
--- a/browser/app/moz.build
|
||||
+++ b/browser/app/moz.build
|
||||
@@ -172,3 +172,6 @@ for icon in ("firefox", "document", "newwindow", "newtab", "pbmode", "document_p
|
||||
@@ -174,3 +174,6 @@ for icon in ("firefox", "document", "newwindow", "newtab", "pbmode", "document_p
|
||||
CONFIG["MOZ_BRANDING_DIRECTORY"],
|
||||
icon,
|
||||
)
|
||||
|
|
@ -11,7 +11,7 @@ index c731e9798a..80617a4acc 100644
|
|||
+LOCAL_INCLUDES += ["/dom/mask"]
|
||||
\ No newline at end of file
|
||||
diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp
|
||||
index be31000278..6617ad3bd5 100644
|
||||
index be601a06e3..95bde81ea9 100644
|
||||
--- a/dom/base/Element.cpp
|
||||
+++ b/dom/base/Element.cpp
|
||||
@@ -12,6 +12,7 @@
|
||||
|
|
@ -22,7 +22,7 @@ index be31000278..6617ad3bd5 100644
|
|||
|
||||
#include <inttypes.h>
|
||||
#include <initializer_list>
|
||||
@@ -984,6 +985,18 @@ nsRect Element::GetClientAreaRect() {
|
||||
@@ -988,6 +989,18 @@ nsRect Element::GetClientAreaRect() {
|
||||
Document* doc = OwnerDoc();
|
||||
nsPresContext* presContext = doc->GetPresContext();
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ index be31000278..6617ad3bd5 100644
|
|||
// document, we have overlay scrollbars, and we aren't embedded in another
|
||||
// document
|
||||
diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp
|
||||
index 14a00b8ed8..7b6a0e4a10 100644
|
||||
index 5b737ab6a8..3569ddae58 100644
|
||||
--- a/dom/base/Navigator.cpp
|
||||
+++ b/dom/base/Navigator.cpp
|
||||
@@ -8,6 +8,7 @@
|
||||
|
|
@ -53,7 +53,7 @@ index 14a00b8ed8..7b6a0e4a10 100644
|
|||
#include "nsIXULAppInfo.h"
|
||||
#include "nsPluginArray.h"
|
||||
#include "nsMimeTypeArray.h"
|
||||
@@ -261,6 +262,8 @@ void Navigator::Invalidate() {
|
||||
@@ -267,6 +268,8 @@ void Navigator::Invalidate() {
|
||||
|
||||
void Navigator::GetUserAgent(nsAString& aUserAgent, CallerType aCallerType,
|
||||
ErrorResult& aRv) const {
|
||||
|
|
@ -62,7 +62,7 @@ index 14a00b8ed8..7b6a0e4a10 100644
|
|||
nsCOMPtr<nsPIDOMWindowInner> window;
|
||||
|
||||
if (mWindow) {
|
||||
@@ -287,6 +290,8 @@ void Navigator::GetUserAgent(nsAString& aUserAgent, CallerType aCallerType,
|
||||
@@ -293,6 +296,8 @@ void Navigator::GetUserAgent(nsAString& aUserAgent, CallerType aCallerType,
|
||||
}
|
||||
|
||||
void Navigator::GetAppCodeName(nsAString& aAppCodeName, ErrorResult& aRv) {
|
||||
|
|
@ -71,7 +71,7 @@ index 14a00b8ed8..7b6a0e4a10 100644
|
|||
nsresult rv;
|
||||
|
||||
nsCOMPtr<nsIHttpProtocolHandler> service(
|
||||
@@ -308,6 +313,8 @@ void Navigator::GetAppCodeName(nsAString& aAppCodeName, ErrorResult& aRv) {
|
||||
@@ -314,6 +319,8 @@ void Navigator::GetAppCodeName(nsAString& aAppCodeName, ErrorResult& aRv) {
|
||||
|
||||
void Navigator::GetAppVersion(nsAString& aAppVersion, CallerType aCallerType,
|
||||
ErrorResult& aRv) const {
|
||||
|
|
@ -80,7 +80,7 @@ index 14a00b8ed8..7b6a0e4a10 100644
|
|||
nsCOMPtr<Document> doc = mWindow->GetExtantDoc();
|
||||
|
||||
nsresult rv = GetAppVersion(
|
||||
@@ -319,6 +326,8 @@ void Navigator::GetAppVersion(nsAString& aAppVersion, CallerType aCallerType,
|
||||
@@ -325,6 +332,8 @@ void Navigator::GetAppVersion(nsAString& aAppVersion, CallerType aCallerType,
|
||||
}
|
||||
|
||||
void Navigator::GetAppName(nsAString& aAppName) const {
|
||||
|
|
@ -89,7 +89,7 @@ index 14a00b8ed8..7b6a0e4a10 100644
|
|||
aAppName.AssignLiteral("Netscape");
|
||||
}
|
||||
|
||||
@@ -343,6 +352,15 @@ void Navigator::GetAcceptLanguages(nsTArray<nsString>& aLanguages) {
|
||||
@@ -350,6 +359,15 @@ void Navigator::GetAcceptLanguages(const nsString* aLanguageOverride,
|
||||
|
||||
aLanguages.Clear();
|
||||
|
||||
|
|
@ -104,8 +104,8 @@ index 14a00b8ed8..7b6a0e4a10 100644
|
|||
+
|
||||
// E.g. "de-de, en-us,en".
|
||||
nsAutoString acceptLang;
|
||||
Preferences::GetLocalizedString("intl.accept_languages", acceptLang);
|
||||
@@ -390,6 +408,8 @@ void Navigator::GetAcceptLanguages(nsTArray<nsString>& aLanguages) {
|
||||
if (aLanguageOverride && aLanguageOverride->Length())
|
||||
@@ -400,6 +418,8 @@ void Navigator::GetAcceptLanguages(const nsString* aLanguageOverride,
|
||||
* Full details above in GetAcceptLanguages.
|
||||
*/
|
||||
void Navigator::GetLanguage(nsAString& aLanguage) {
|
||||
|
|
@ -114,7 +114,7 @@ index 14a00b8ed8..7b6a0e4a10 100644
|
|||
nsTArray<nsString> languages;
|
||||
GetLanguages(languages);
|
||||
MOZ_ASSERT(languages.Length() >= 1);
|
||||
@@ -407,6 +427,8 @@ void Navigator::GetLanguages(nsTArray<nsString>& aLanguages) {
|
||||
@@ -423,6 +443,8 @@ void Navigator::GetLanguages(nsTArray<nsString>& aLanguages) {
|
||||
|
||||
void Navigator::GetPlatform(nsAString& aPlatform, CallerType aCallerType,
|
||||
ErrorResult& aRv) const {
|
||||
|
|
@ -123,7 +123,7 @@ index 14a00b8ed8..7b6a0e4a10 100644
|
|||
if (mWindow) {
|
||||
BrowsingContext* bc = mWindow->GetBrowsingContext();
|
||||
nsString customPlatform;
|
||||
@@ -433,6 +455,8 @@ void Navigator::GetPlatform(nsAString& aPlatform, CallerType aCallerType,
|
||||
@@ -449,6 +471,8 @@ void Navigator::GetPlatform(nsAString& aPlatform, CallerType aCallerType,
|
||||
void Navigator::GetOscpu(nsAString& aOSCPU, CallerType aCallerType,
|
||||
ErrorResult& aRv) const {
|
||||
if (aCallerType != CallerType::System) {
|
||||
|
|
@ -132,7 +132,7 @@ index 14a00b8ed8..7b6a0e4a10 100644
|
|||
// If fingerprinting resistance is on, we will spoof this value. See
|
||||
// nsRFPService.h for details about spoofed values.
|
||||
if (nsContentUtils::ShouldResistFingerprinting(GetDocShell(),
|
||||
@@ -472,10 +496,14 @@ void Navigator::GetVendor(nsAString& aVendor) { aVendor.Truncate(); }
|
||||
@@ -488,10 +512,14 @@ void Navigator::GetVendor(nsAString& aVendor) { aVendor.Truncate(); }
|
||||
void Navigator::GetVendorSub(nsAString& aVendorSub) { aVendorSub.Truncate(); }
|
||||
|
||||
void Navigator::GetProduct(nsAString& aProduct) {
|
||||
|
|
@ -147,7 +147,7 @@ index 14a00b8ed8..7b6a0e4a10 100644
|
|||
// Legacy build date hardcoded for backward compatibility (bug 776376)
|
||||
aProductSub.AssignLiteral(LEGACY_UA_GECKO_TRAIL);
|
||||
}
|
||||
@@ -501,7 +529,11 @@ nsPluginArray* Navigator::GetPlugins(ErrorResult& aRv) {
|
||||
@@ -517,7 +545,11 @@ nsPluginArray* Navigator::GetPlugins(ErrorResult& aRv) {
|
||||
return mPlugins;
|
||||
}
|
||||
|
||||
|
|
@ -160,7 +160,7 @@ index 14a00b8ed8..7b6a0e4a10 100644
|
|||
|
||||
Permissions* Navigator::GetPermissions(ErrorResult& aRv) {
|
||||
if (!mWindow) {
|
||||
@@ -527,6 +559,9 @@ StorageManager* Navigator::Storage() {
|
||||
@@ -543,6 +575,9 @@ StorageManager* Navigator::Storage() {
|
||||
}
|
||||
|
||||
bool Navigator::CookieEnabled() {
|
||||
|
|
@ -170,7 +170,7 @@ index 14a00b8ed8..7b6a0e4a10 100644
|
|||
// Check whether an exception overrides the global cookie behavior
|
||||
// Note that the code for getting the URI here matches that in
|
||||
// nsHTMLDocument::SetCookie.
|
||||
@@ -573,6 +608,8 @@ bool Navigator::CookieEnabled() {
|
||||
@@ -589,6 +624,8 @@ bool Navigator::CookieEnabled() {
|
||||
}
|
||||
|
||||
bool Navigator::OnLine() {
|
||||
|
|
@ -179,7 +179,7 @@ index 14a00b8ed8..7b6a0e4a10 100644
|
|||
if (mWindow) {
|
||||
// Check if this tab is set to be offline.
|
||||
BrowsingContext* bc = mWindow->GetBrowsingContext();
|
||||
@@ -587,6 +624,8 @@ bool Navigator::OnLine() {
|
||||
@@ -603,6 +640,8 @@ bool Navigator::OnLine() {
|
||||
void Navigator::GetBuildID(nsAString& aBuildID, CallerType aCallerType,
|
||||
ErrorResult& aRv) const {
|
||||
if (aCallerType != CallerType::System) {
|
||||
|
|
@ -188,7 +188,7 @@ index 14a00b8ed8..7b6a0e4a10 100644
|
|||
// If fingerprinting resistance is on, we will spoof this value. See
|
||||
// nsRFPService.h for details about spoofed values.
|
||||
if (nsContentUtils::ShouldResistFingerprinting(
|
||||
@@ -643,6 +682,8 @@ void Navigator::GetBuildID(nsAString& aBuildID, CallerType aCallerType,
|
||||
@@ -659,6 +698,8 @@ void Navigator::GetBuildID(nsAString& aBuildID, CallerType aCallerType,
|
||||
}
|
||||
|
||||
void Navigator::GetDoNotTrack(nsAString& aResult) {
|
||||
|
|
@ -197,7 +197,7 @@ index 14a00b8ed8..7b6a0e4a10 100644
|
|||
bool doNotTrack = StaticPrefs::privacy_donottrackheader_enabled();
|
||||
if (!doNotTrack) {
|
||||
nsCOMPtr<nsILoadContext> loadContext = do_GetInterface(mWindow);
|
||||
@@ -657,6 +698,9 @@ void Navigator::GetDoNotTrack(nsAString& aResult) {
|
||||
@@ -673,6 +714,9 @@ void Navigator::GetDoNotTrack(nsAString& aResult) {
|
||||
}
|
||||
|
||||
bool Navigator::GlobalPrivacyControl() {
|
||||
|
|
@ -207,7 +207,7 @@ index 14a00b8ed8..7b6a0e4a10 100644
|
|||
bool gpcStatus = StaticPrefs::privacy_globalprivacycontrol_enabled();
|
||||
if (!gpcStatus) {
|
||||
nsCOMPtr<nsILoadContext> loadContext = do_GetInterface(mWindow);
|
||||
@@ -668,6 +712,8 @@ bool Navigator::GlobalPrivacyControl() {
|
||||
@@ -684,6 +728,8 @@ bool Navigator::GlobalPrivacyControl() {
|
||||
}
|
||||
|
||||
uint64_t Navigator::HardwareConcurrency() {
|
||||
|
|
@ -216,7 +216,7 @@ index 14a00b8ed8..7b6a0e4a10 100644
|
|||
workerinternals::RuntimeService* rts =
|
||||
workerinternals::RuntimeService::GetOrCreateService();
|
||||
if (!rts) {
|
||||
@@ -872,6 +918,8 @@ bool Navigator::Vibrate(const nsTArray<uint32_t>& aPattern) {
|
||||
@@ -888,6 +934,8 @@ bool Navigator::Vibrate(const nsTArray<uint32_t>& aPattern) {
|
||||
//*****************************************************************************
|
||||
|
||||
uint32_t Navigator::MaxTouchPoints(CallerType aCallerType) {
|
||||
|
|
@ -225,19 +225,11 @@ index 14a00b8ed8..7b6a0e4a10 100644
|
|||
nsIDocShell* docshell = GetDocShell();
|
||||
BrowsingContext* bc = docshell ? docshell->GetBrowsingContext() : nullptr;
|
||||
|
||||
@@ -2261,6 +2309,7 @@ dom::LockManager* Navigator::Locks() {
|
||||
|
||||
/* static */
|
||||
bool Navigator::Webdriver() {
|
||||
+ return false; // Never enable this
|
||||
#ifdef ENABLE_WEBDRIVER
|
||||
nsCOMPtr<nsIMarionette> marionette = do_GetService(NS_MARIONETTE_CONTRACTID);
|
||||
if (marionette) {
|
||||
diff --git a/dom/base/moz.build b/dom/base/moz.build
|
||||
index ef1780f161..4e4d038157 100644
|
||||
index fb7ed4b6a0..d51ab30a89 100644
|
||||
--- a/dom/base/moz.build
|
||||
+++ b/dom/base/moz.build
|
||||
@@ -628,3 +628,6 @@ GeneratedFile(
|
||||
@@ -642,3 +642,6 @@ GeneratedFile(
|
||||
"/servo/components/style/properties/counted_unknown_properties.py",
|
||||
],
|
||||
)
|
||||
|
|
@ -246,7 +238,7 @@ index ef1780f161..4e4d038157 100644
|
|||
+LOCAL_INCLUDES += ["/dom/mask"]
|
||||
\ No newline at end of file
|
||||
diff --git a/dom/base/nsGlobalWindowInner.cpp b/dom/base/nsGlobalWindowInner.cpp
|
||||
index 5337e1588f..bff2f90321 100644
|
||||
index 3d0f51e924..085ffcd943 100644
|
||||
--- a/dom/base/nsGlobalWindowInner.cpp
|
||||
+++ b/dom/base/nsGlobalWindowInner.cpp
|
||||
@@ -5,6 +5,7 @@
|
||||
|
|
@ -257,7 +249,7 @@ index 5337e1588f..bff2f90321 100644
|
|||
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
@@ -3408,6 +3409,8 @@ void nsGlobalWindowInner::SetName(const nsAString& aName,
|
||||
@@ -3409,6 +3410,8 @@ void nsGlobalWindowInner::SetName(const nsAString& aName,
|
||||
}
|
||||
|
||||
double nsGlobalWindowInner::GetInnerWidth(ErrorResult& aError) {
|
||||
|
|
@ -266,7 +258,7 @@ index 5337e1588f..bff2f90321 100644
|
|||
FORWARD_TO_OUTER_OR_THROW(GetInnerWidthOuter, (aError), aError, 0);
|
||||
}
|
||||
|
||||
@@ -3419,6 +3422,8 @@ nsresult nsGlobalWindowInner::GetInnerWidth(double* aWidth) {
|
||||
@@ -3420,6 +3423,8 @@ nsresult nsGlobalWindowInner::GetInnerWidth(double* aWidth) {
|
||||
}
|
||||
|
||||
double nsGlobalWindowInner::GetInnerHeight(ErrorResult& aError) {
|
||||
|
|
@ -275,7 +267,7 @@ index 5337e1588f..bff2f90321 100644
|
|||
// We ignore aCallerType; we only have that argument because some other things
|
||||
// called by GetReplaceableWindowCoord need it. If this ever changes, fix
|
||||
// nsresult nsGlobalWindowInner::GetInnerHeight(double* aInnerWidth)
|
||||
@@ -3435,12 +3440,16 @@ nsresult nsGlobalWindowInner::GetInnerHeight(double* aHeight) {
|
||||
@@ -3436,12 +3441,16 @@ nsresult nsGlobalWindowInner::GetInnerHeight(double* aHeight) {
|
||||
|
||||
int32_t nsGlobalWindowInner::GetOuterWidth(CallerType aCallerType,
|
||||
ErrorResult& aError) {
|
||||
|
|
@ -292,7 +284,7 @@ index 5337e1588f..bff2f90321 100644
|
|||
FORWARD_TO_OUTER_OR_THROW(GetOuterHeightOuter, (aCallerType, aError), aError,
|
||||
0);
|
||||
}
|
||||
@@ -3455,11 +3464,13 @@ double nsGlobalWindowInner::ScreenEdgeSlopY() const {
|
||||
@@ -3456,11 +3465,13 @@ double nsGlobalWindowInner::ScreenEdgeSlopY() const {
|
||||
|
||||
int32_t nsGlobalWindowInner::GetScreenX(CallerType aCallerType,
|
||||
ErrorResult& aError) {
|
||||
|
|
@ -306,7 +298,7 @@ index 5337e1588f..bff2f90321 100644
|
|||
FORWARD_TO_OUTER_OR_THROW(GetScreenYOuter, (aCallerType, aError), aError, 0);
|
||||
}
|
||||
|
||||
@@ -3493,6 +3504,8 @@ static nsPresContext* GetPresContextForRatio(Document* aDoc) {
|
||||
@@ -3494,6 +3505,8 @@ static nsPresContext* GetPresContextForRatio(Document* aDoc) {
|
||||
double nsGlobalWindowInner::GetDevicePixelRatio(CallerType aCallerType,
|
||||
ErrorResult& aError) {
|
||||
ENSURE_ACTIVE_DOCUMENT(aError, 0.0);
|
||||
|
|
@ -315,7 +307,7 @@ index 5337e1588f..bff2f90321 100644
|
|||
|
||||
RefPtr<nsPresContext> presContext = GetPresContextForRatio(mDoc);
|
||||
if (NS_WARN_IF(!presContext)) {
|
||||
@@ -3574,26 +3587,38 @@ already_AddRefed<MediaQueryList> nsGlobalWindowInner::MatchMedia(
|
||||
@@ -3564,26 +3577,38 @@ already_AddRefed<MediaQueryList> nsGlobalWindowInner::MatchMedia(
|
||||
}
|
||||
|
||||
int32_t nsGlobalWindowInner::GetScrollMinX(ErrorResult& aError) {
|
||||
|
|
@ -485,7 +477,7 @@ index 3a90c93c01..35e3227f5e 100644
|
|||
+LOCAL_INCLUDES += ["/dom/mask"]
|
||||
\ No newline at end of file
|
||||
diff --git a/dom/canvas/ClientWebGLContext.cpp b/dom/canvas/ClientWebGLContext.cpp
|
||||
index 1614d2ead2..22b0f2584c 100644
|
||||
index 5c92ba003d..a8871228d4 100644
|
||||
--- a/dom/canvas/ClientWebGLContext.cpp
|
||||
+++ b/dom/canvas/ClientWebGLContext.cpp
|
||||
@@ -4,6 +4,7 @@
|
||||
|
|
@ -496,7 +488,7 @@ index 1614d2ead2..22b0f2584c 100644
|
|||
|
||||
#include <bitset>
|
||||
|
||||
@@ -2264,7 +2265,7 @@ void ClientWebGLContext::GetParameter(JSContext* cx, GLenum pname,
|
||||
@@ -2327,7 +2328,7 @@ void ClientWebGLContext::GetParameter(JSContext* cx, GLenum pname,
|
||||
retval.set(JS::NumberValue(state.mPixelUnpackState.skipRows));
|
||||
return;
|
||||
} // switch pname
|
||||
|
|
@ -505,7 +497,7 @@ index 1614d2ead2..22b0f2584c 100644
|
|||
|
||||
// -
|
||||
|
||||
@@ -2336,6 +2337,10 @@ void ClientWebGLContext::GetParameter(JSContext* cx, GLenum pname,
|
||||
@@ -2399,6 +2400,10 @@ void ClientWebGLContext::GetParameter(JSContext* cx, GLenum pname,
|
||||
|
||||
switch (pname) {
|
||||
case dom::WEBGL_debug_renderer_info_Binding::UNMASKED_RENDERER_WEBGL:
|
||||
|
|
@ -516,7 +508,7 @@ index 1614d2ead2..22b0f2584c 100644
|
|||
ret = GetUnmaskedRenderer();
|
||||
if (ret && StaticPrefs::webgl_sanitize_unmasked_renderer()) {
|
||||
*ret = webgl::SanitizeRenderer(*ret);
|
||||
@@ -2343,6 +2348,10 @@ void ClientWebGLContext::GetParameter(JSContext* cx, GLenum pname,
|
||||
@@ -2406,6 +2411,10 @@ void ClientWebGLContext::GetParameter(JSContext* cx, GLenum pname,
|
||||
break;
|
||||
|
||||
case dom::WEBGL_debug_renderer_info_Binding::UNMASKED_VENDOR_WEBGL:
|
||||
|
|
@ -540,10 +532,10 @@ index 3a533d36d1..8697f8c21f 100644
|
|||
+LOCAL_INCLUDES += ["/dom/mask"]
|
||||
\ No newline at end of file
|
||||
diff --git a/dom/moz.build b/dom/moz.build
|
||||
index f781bd3708..9a66049d9b 100644
|
||||
index 88fc49cb73..3d73af36c0 100644
|
||||
--- a/dom/moz.build
|
||||
+++ b/dom/moz.build
|
||||
@@ -115,3 +115,6 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("gtk", "cocoa", "windows"):
|
||||
@@ -116,3 +116,6 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("gtk", "cocoa", "windows"):
|
||||
TEST_DIRS += ["plugins/test"]
|
||||
|
||||
SPHINX_TREES["/dom"] = "docs"
|
||||
|
|
@ -552,7 +544,7 @@ index f781bd3708..9a66049d9b 100644
|
|||
+DIRS += ["mask"]
|
||||
\ No newline at end of file
|
||||
diff --git a/dom/workers/WorkerNavigator.cpp b/dom/workers/WorkerNavigator.cpp
|
||||
index 1be36bc7d4..2cdaff494f 100644
|
||||
index 0f9dada965..3537adb7e3 100644
|
||||
--- a/dom/workers/WorkerNavigator.cpp
|
||||
+++ b/dom/workers/WorkerNavigator.cpp
|
||||
@@ -5,6 +5,7 @@
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
# Modified version of Playwright's bootstrap.diff that runs on Firefox v128.0.3.
|
||||
# Modifications made by daijro.
|
||||
cd camoufox-128.0.3-1 && git diff
|
||||
diff --git a/accessible/base/NotificationController.h b/accessible/base/NotificationController.h
|
||||
index 137963f117..41fa27bc4a 100644
|
||||
--- a/accessible/base/NotificationController.h
|
||||
|
|
@ -892,7 +891,7 @@ index 7eea29947d..227314db13 100644
|
|||
|
||||
static bool AutomaticStorageAccessPermissionCanBeGranted(
|
||||
diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp
|
||||
index a7229fe412..4fdefb1868 100644
|
||||
index a7229fe412..5b737ab6a8 100644
|
||||
--- a/dom/base/Navigator.cpp
|
||||
+++ b/dom/base/Navigator.cpp
|
||||
@@ -344,14 +344,18 @@ void Navigator::GetAppName(nsAString& aAppName) const {
|
||||
|
|
@ -900,7 +899,8 @@ index a7229fe412..4fdefb1868 100644
|
|||
*/
|
||||
/* static */
|
||||
-void Navigator::GetAcceptLanguages(nsTArray<nsString>& aLanguages) {
|
||||
+void Navigator::GetAcceptLanguages(const nsString* aLanguageOverride, nsTArray<nsString>& aLanguages) {
|
||||
+void Navigator::GetAcceptLanguages(const nsString* aLanguageOverride,
|
||||
+ nsTArray<nsString>& aLanguages) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
aLanguages.Clear();
|
||||
|
|
@ -912,7 +912,6 @@ index a7229fe412..4fdefb1868 100644
|
|||
+ acceptLang = *aLanguageOverride;
|
||||
+ else
|
||||
+ Preferences::GetLocalizedString("intl.accept_languages", acceptLang);
|
||||
+
|
||||
|
||||
// Split values on commas.
|
||||
for (nsDependentSubstring lang :
|
||||
|
|
@ -931,13 +930,23 @@ index a7229fe412..4fdefb1868 100644
|
|||
|
||||
// The returned value is cached by the binding code. The window listens to the
|
||||
// accept languages change and will clear the cache when needed. It has to
|
||||
@@ -2308,7 +2318,8 @@ bool Navigator::Webdriver() {
|
||||
@@ -2288,6 +2298,10 @@ dom::PrivateAttribution* Navigator::PrivateAttribution() {
|
||||
|
||||
/* static */
|
||||
bool Navigator::Webdriver() {
|
||||
+ // Never enable
|
||||
+ if (1 == 1) {
|
||||
+ return false;
|
||||
+ }
|
||||
#ifdef ENABLE_WEBDRIVER
|
||||
nsCOMPtr<nsIMarionette> marionette = do_GetService(NS_MARIONETTE_CONTRACTID);
|
||||
if (marionette) {
|
||||
@@ -2307,8 +2321,6 @@ bool Navigator::Webdriver() {
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
-
|
||||
- return false;
|
||||
+ // Playwright is automating the browser, so we should pretend to be a webdriver
|
||||
+ return true;
|
||||
}
|
||||
|
||||
AutoplayPolicy Navigator::GetAutoplayPolicy(AutoplayPolicyMediaType aType) {
|
||||
|
|
@ -1117,7 +1126,7 @@ index 63968c9b7a..decf3ea383 100644
|
|||
MOZ_CAN_RUN_SCRIPT
|
||||
nsresult SendTouchEventCommon(
|
||||
diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp
|
||||
index 587f03849d..d0a910d3ae 100644
|
||||
index 587f03849d..28780215bd 100644
|
||||
--- a/dom/base/nsFocusManager.cpp
|
||||
+++ b/dom/base/nsFocusManager.cpp
|
||||
@@ -1684,6 +1684,10 @@ Maybe<uint64_t> nsFocusManager::SetFocusInner(Element* aNewContent,
|
||||
|
|
@ -1131,20 +1140,13 @@ index 587f03849d..d0a910d3ae 100644
|
|||
// Exit fullscreen if a website focuses another window
|
||||
if (StaticPrefs::full_screen_api_exit_on_windowRaise() &&
|
||||
!isElementInActiveWindow && (aFlags & FLAG_RAISE)) {
|
||||
@@ -2269,6 +2273,7 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear,
|
||||
bool aIsLeavingDocument, bool aAdjustWidget,
|
||||
bool aRemainActive, Element* aElementToFocus,
|
||||
uint64_t aActionId) {
|
||||
+
|
||||
LOGFOCUS(("<<Blur begin actionid: %" PRIu64 ">>", aActionId));
|
||||
|
||||
// hold a reference to the focused content, which may be null
|
||||
@@ -2315,6 +2320,11 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear,
|
||||
@@ -2315,6 +2319,12 @@ bool nsFocusManager::BlurImpl(BrowsingContext* aBrowsingContextToClear,
|
||||
return true;
|
||||
}
|
||||
|
||||
+ // Playwright: emulate focused page by never bluring when leaving document.
|
||||
+ if (XRE_IsContentProcess() && aIsLeavingDocument && docShell && nsDocShell::Cast(docShell)->ShouldOverrideHasFocus()) {
|
||||
+ if (XRE_IsContentProcess() && aIsLeavingDocument && docShell &&
|
||||
+ nsDocShell::Cast(docShell)->ShouldOverrideHasFocus()) {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
|
|
@ -2248,30 +2250,17 @@ index 6e588cff05..a173b1154e 100644
|
|||
|
||||
// If the browser is visible but just due to be preserving layers
|
||||
diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp
|
||||
index 2ed62888d7..f5540c38df 100644
|
||||
index 2ed62888d7..0ca02752aa 100644
|
||||
--- a/layout/base/nsLayoutUtils.cpp
|
||||
+++ b/layout/base/nsLayoutUtils.cpp
|
||||
@@ -698,6 +698,10 @@ bool nsLayoutUtils::AllowZoomingForDocument(
|
||||
@@ -698,6 +698,7 @@ bool nsLayoutUtils::AllowZoomingForDocument(
|
||||
!aDocument->GetPresShell()->AsyncPanZoomEnabled()) {
|
||||
return false;
|
||||
}
|
||||
+
|
||||
+ /* Playwright: disable zooming as we don't support meta viewport tag */
|
||||
+ if (1 == 1) return false;
|
||||
+
|
||||
// True if we allow zooming for all documents on this platform, or if we are
|
||||
// in RDM.
|
||||
BrowsingContext* bc = aDocument->GetBrowsingContext();
|
||||
@@ -9794,6 +9798,9 @@ void nsLayoutUtils::ComputeSystemFont(nsFont* aSystemFont,
|
||||
|
||||
/* static */
|
||||
bool nsLayoutUtils::ShouldHandleMetaViewport(const Document* aDocument) {
|
||||
+ /* Playwright: disable meta viewport handling since we don't require one */
|
||||
+ if (1 == 1) return false;
|
||||
+
|
||||
BrowsingContext* bc = aDocument->GetBrowsingContext();
|
||||
return StaticPrefs::dom_meta_viewport_enabled() || (bc && bc->InRDMPane());
|
||||
}
|
||||
diff --git a/layout/style/GeckoBindings.h b/layout/style/GeckoBindings.h
|
||||
index d273793fc8..46b4078c60 100644
|
||||
--- a/layout/style/GeckoBindings.h
|
||||
|
|
@ -2591,23 +2580,6 @@ index 217beda78e..7ba723410e 100644
|
|||
// Prevents new window animations on MacOS and Windows. Currently
|
||||
// ignored for Linux.
|
||||
const unsigned long CHROME_SUPPRESS_ANIMATION = 1 << 24;
|
||||
diff --git a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs
|
||||
index 00a5381133..5d3e3d6f56 100644
|
||||
--- a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs
|
||||
+++ b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs
|
||||
@@ -108,6 +108,12 @@ EnterprisePoliciesManager.prototype = {
|
||||
Services.prefs.clearUserPref(PREF_POLICIES_APPLIED);
|
||||
}
|
||||
|
||||
+ // Playwright: Disable enterprise policies
|
||||
+ if (true) {
|
||||
+ this.status = Ci.nsIEnterprisePolicies.INACTIVE;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
let provider = this._chooseProvider();
|
||||
|
||||
if (provider.failed) {
|
||||
diff --git a/toolkit/components/resistfingerprinting/nsUserCharacteristics.cpp b/toolkit/components/resistfingerprinting/nsUserCharacteristics.cpp
|
||||
index 32b1ac4813..808031fbeb 100644
|
||||
--- a/toolkit/components/resistfingerprinting/nsUserCharacteristics.cpp
|
||||
|
|
@ -2665,21 +2637,6 @@ index 0767cb1539..dc0d72b4ff 100644
|
|||
+ return chromeFlags | nsIWebBrowserChrome::CHROME_MINIMAL_POPUP;
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/toolkit/mozapps/update/UpdateService.sys.mjs b/toolkit/mozapps/update/UpdateService.sys.mjs
|
||||
index deaed885c7..6d7851421b 100644
|
||||
--- a/toolkit/mozapps/update/UpdateService.sys.mjs
|
||||
+++ b/toolkit/mozapps/update/UpdateService.sys.mjs
|
||||
@@ -3875,7 +3875,9 @@ export class UpdateService {
|
||||
}
|
||||
|
||||
get disabledForTesting() {
|
||||
- return lazy.UpdateServiceStub.updateDisabledForTesting;
|
||||
+ /* playwright */
|
||||
+ return true;
|
||||
+ // return lazy.UpdateServiceStub.updateDisabledForTesting;
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuild
|
||||
index 8c2b2bf996..07d237eb17 100644
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
// ************
|
||||
// Camoufox functionality
|
||||
// ************
|
||||
|
||||
pref("gfx.bundled-fonts.activate", 1);
|
||||
|
||||
|
|
@ -10,8 +12,22 @@ pref("browser.sessionstore.max_resumed_crashes", 0);
|
|||
pref("browser.sessionstore.restore_on_demand", false);
|
||||
pref("browser.sessionstore.restore_tabs_lazily", false);
|
||||
|
||||
// Tweaks that undo Playwright:
|
||||
|
||||
// Force enable content isolation (WAFs can detect this!)
|
||||
pref("fission.autostart", true);
|
||||
pref("fission.bfcacheInParent", true);
|
||||
pref("fission.webContentIsolationStrategy", 1);
|
||||
|
||||
// Use dark theme by default
|
||||
pref("ui.systemUsesDarkTheme", 1);
|
||||
|
||||
// Enable PDFJS
|
||||
pref("pdfjs.disabled", false);
|
||||
|
||||
// ************
|
||||
// Debloat and speed up Camoufox.
|
||||
// ************
|
||||
|
||||
// Debloat (from Peskyfox)
|
||||
|
||||
|
|
@ -291,8 +307,7 @@ pref("browser.places.interactions.enabled", false);
|
|||
// Source: https://gist.github.com/RubenKelevra/fd66c2f856d703260ecdf0379c4f59db
|
||||
// pref("dom.ipc.processCount", 1); // only load 1 process
|
||||
// pref("dom.ipc.processCount.webIsolated", 1); // only load 1 process
|
||||
// pref("fission.webContentIsolationStrategy", 0);
|
||||
pref("fission.autostart", false); // disable enhanced protection between threads/processes of the browser
|
||||
|
||||
pref("privacy.partition.network_state", false); // Disable network seperations
|
||||
// Source: https://github.com/Floorp-Projects/Floorp/issues/140
|
||||
pref("accessibility.force_disabled", 1);
|
||||
|
|
@ -431,18 +446,15 @@ pref("datareporting.policy.dataSubmissionEnabled", false);
|
|||
pref("datareporting.policy.dataSubmissionPolicyAccepted", false);
|
||||
pref("datareporting.policy.dataSubmissionPolicyBypassNotification", true);
|
||||
|
||||
// Enable PDFJS
|
||||
pref("pdfjs.disabled", false);
|
||||
|
||||
// This preference breaks our authentication flow.
|
||||
pref("network.auth.use_redirect_for_retries", false);
|
||||
|
||||
// Disable cross-process iframes, but not cross-process navigations.
|
||||
pref("fission.webContentIsolationStrategy", 0);
|
||||
// pref("fission.webContentIsolationStrategy", 0);
|
||||
|
||||
// Disable BFCache in parent process.
|
||||
// We also separately disable BFCache in content via docSchell property.
|
||||
pref("fission.bfcacheInParent", false);
|
||||
// pref("fission.bfcacheInParent", false);
|
||||
|
||||
// Disable first-party-based cookie partitioning.
|
||||
// When it is enabled, we have to retain "thirdPartyCookie^" permissions
|
||||
|
|
@ -506,9 +518,6 @@ pref("geo.provider.testing", true);
|
|||
// Defense-in-depth (already the default value) from Firefox 119 or 120.
|
||||
pref("media.devices.enumerate.legacy.enabled", false);
|
||||
|
||||
// Use dark theme by default
|
||||
pref("ui.systemUsesDarkTheme", 1);
|
||||
|
||||
|
||||
// =================================================================
|
||||
// THESE ARE NICHE PROPERTIES THAT ARE NICE TO HAVE
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue