fine grained blocking settings
This commit is contained in:
+8
-9
@@ -127,17 +127,16 @@ class GeckoEngineSettingsApiImpl : GeckoEngineSettingsApi {
|
||||
|
||||
/**
|
||||
* Creates a custom tracking protection policy based on user settings.
|
||||
* Matches Fenix's implementation where AD, ANALYTICS, SOCIAL, and MOZILLA_SOCIAL
|
||||
* are always blocked, while other categories are configurable.
|
||||
*/
|
||||
private fun createCustomTrackingProtectionPolicy(settings: GeckoEngineSettings): TrackingProtectionPolicy {
|
||||
// Always include these categories (not user-configurable, matches Fenix)
|
||||
val categories = mutableListOf(
|
||||
TrackingCategory.AD,
|
||||
TrackingCategory.ANALYTICS,
|
||||
TrackingCategory.SOCIAL,
|
||||
TrackingCategory.MOZILLA_SOCIAL,
|
||||
)
|
||||
val categories = mutableListOf<TrackingCategory>()
|
||||
|
||||
if (settings.blockAdsAnalyticsSocialTrackers != false) {
|
||||
categories.add(TrackingCategory.AD)
|
||||
categories.add(TrackingCategory.ANALYTICS)
|
||||
categories.add(TrackingCategory.SOCIAL)
|
||||
categories.add(TrackingCategory.MOZILLA_SOCIAL)
|
||||
}
|
||||
|
||||
// Add configurable categories
|
||||
if (settings.blockTrackingContent == true) {
|
||||
|
||||
+2
-1
@@ -139,7 +139,8 @@ class Core(
|
||||
).path
|
||||
},
|
||||
),
|
||||
useContentBlockingDatabase = true
|
||||
useContentBlockingDatabase =
|
||||
GlobalComponents.startupSettings?.useContentBlockingDatabase ?: true
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+41
-28
@@ -3397,6 +3397,11 @@ data class GeckoEngineSettings (
|
||||
val dohSettings: DohSettings? = null,
|
||||
val fingerprintingProtectionOverrides: String? = null,
|
||||
val locales: List<String>? = null,
|
||||
/**
|
||||
* Use GeckoView's content-blocking database for tracking protection.
|
||||
* This is applied when the engine is created and requires app restart.
|
||||
*/
|
||||
val useContentBlockingDatabase: Boolean? = null,
|
||||
/** Master toggle for cookie blocking in Custom mode */
|
||||
val blockCookies: Boolean? = null,
|
||||
/** Cookie policy selection (only applies when blockCookies is true) */
|
||||
@@ -3422,6 +3427,8 @@ data class GeckoEngineSettings (
|
||||
val allowListBaseline: Boolean? = null,
|
||||
/** Allow convenience tracking protection exceptions (fixes minor issues) */
|
||||
val allowListConvenience: Boolean? = null,
|
||||
/** Block advertising, analytics, social, and Mozilla social trackers */
|
||||
val blockAdsAnalyticsSocialTrackers: Boolean? = null,
|
||||
val webFontsEnabled: Boolean? = null,
|
||||
val automaticFontSizeAdjustment: Boolean? = null,
|
||||
val fontSizeFactor: Double? = null,
|
||||
@@ -3457,33 +3464,35 @@ data class GeckoEngineSettings (
|
||||
val dohSettings = pigeonVar_list[13] as DohSettings?
|
||||
val fingerprintingProtectionOverrides = pigeonVar_list[14] as String?
|
||||
val locales = pigeonVar_list[15] as List<String>?
|
||||
val blockCookies = pigeonVar_list[16] as Boolean?
|
||||
val customCookiePolicy = pigeonVar_list[17] as CustomCookiePolicy?
|
||||
val blockTrackingContent = pigeonVar_list[18] as Boolean?
|
||||
val trackingContentScope = pigeonVar_list[19] as TrackingScope?
|
||||
val blockCryptominers = pigeonVar_list[20] as Boolean?
|
||||
val blockFingerprinters = pigeonVar_list[21] as Boolean?
|
||||
val blockRedirectTrackers = pigeonVar_list[22] as Boolean?
|
||||
val blockSuspectedFingerprinters = pigeonVar_list[23] as Boolean?
|
||||
val suspectedFingerprintersScope = pigeonVar_list[24] as TrackingScope?
|
||||
val allowListBaseline = pigeonVar_list[25] as Boolean?
|
||||
val allowListConvenience = pigeonVar_list[26] as Boolean?
|
||||
val webFontsEnabled = pigeonVar_list[27] as Boolean?
|
||||
val automaticFontSizeAdjustment = pigeonVar_list[28] as Boolean?
|
||||
val fontSizeFactor = pigeonVar_list[29] as Double?
|
||||
val fontInflationEnabled = pigeonVar_list[30] as Boolean?
|
||||
val displayDensityOverride = pigeonVar_list[31] as Double?
|
||||
val screenWidthOverride = pigeonVar_list[32] as Long?
|
||||
val screenHeightOverride = pigeonVar_list[33] as Long?
|
||||
val inputAutoZoomEnabled = pigeonVar_list[34] as Boolean?
|
||||
val fissionEnabled = pigeonVar_list[35] as Boolean?
|
||||
val isolatedProcessEnabled = pigeonVar_list[36] as Boolean?
|
||||
val appZygoteProcessEnabled = pigeonVar_list[37] as Boolean?
|
||||
val extensionsWebAPIEnabled = pigeonVar_list[38] as Boolean?
|
||||
val lnaBlocking = pigeonVar_list[39] as Boolean?
|
||||
val lnaBlockTrackers = pigeonVar_list[40] as Boolean?
|
||||
val lnaEnabled = pigeonVar_list[41] as Boolean?
|
||||
return GeckoEngineSettings(javascriptEnabled, trackingProtectionPolicy, httpsOnlyMode, globalPrivacyControlEnabled, preferredColorScheme, cookieBannerHandlingMode, cookieBannerHandlingModePrivateBrowsing, cookieBannerHandlingGlobalRules, cookieBannerHandlingGlobalRulesSubFrames, webContentIsolationStrategy, userAgent, contentBlocking, enterpriseRootsEnabled, dohSettings, fingerprintingProtectionOverrides, locales, blockCookies, customCookiePolicy, blockTrackingContent, trackingContentScope, blockCryptominers, blockFingerprinters, blockRedirectTrackers, blockSuspectedFingerprinters, suspectedFingerprintersScope, allowListBaseline, allowListConvenience, webFontsEnabled, automaticFontSizeAdjustment, fontSizeFactor, fontInflationEnabled, displayDensityOverride, screenWidthOverride, screenHeightOverride, inputAutoZoomEnabled, fissionEnabled, isolatedProcessEnabled, appZygoteProcessEnabled, extensionsWebAPIEnabled, lnaBlocking, lnaBlockTrackers, lnaEnabled)
|
||||
val useContentBlockingDatabase = pigeonVar_list[16] as Boolean?
|
||||
val blockCookies = pigeonVar_list[17] as Boolean?
|
||||
val customCookiePolicy = pigeonVar_list[18] as CustomCookiePolicy?
|
||||
val blockTrackingContent = pigeonVar_list[19] as Boolean?
|
||||
val trackingContentScope = pigeonVar_list[20] as TrackingScope?
|
||||
val blockCryptominers = pigeonVar_list[21] as Boolean?
|
||||
val blockFingerprinters = pigeonVar_list[22] as Boolean?
|
||||
val blockRedirectTrackers = pigeonVar_list[23] as Boolean?
|
||||
val blockSuspectedFingerprinters = pigeonVar_list[24] as Boolean?
|
||||
val suspectedFingerprintersScope = pigeonVar_list[25] as TrackingScope?
|
||||
val allowListBaseline = pigeonVar_list[26] as Boolean?
|
||||
val allowListConvenience = pigeonVar_list[27] as Boolean?
|
||||
val blockAdsAnalyticsSocialTrackers = pigeonVar_list[28] as Boolean?
|
||||
val webFontsEnabled = pigeonVar_list[29] as Boolean?
|
||||
val automaticFontSizeAdjustment = pigeonVar_list[30] as Boolean?
|
||||
val fontSizeFactor = pigeonVar_list[31] as Double?
|
||||
val fontInflationEnabled = pigeonVar_list[32] as Boolean?
|
||||
val displayDensityOverride = pigeonVar_list[33] as Double?
|
||||
val screenWidthOverride = pigeonVar_list[34] as Long?
|
||||
val screenHeightOverride = pigeonVar_list[35] as Long?
|
||||
val inputAutoZoomEnabled = pigeonVar_list[36] as Boolean?
|
||||
val fissionEnabled = pigeonVar_list[37] as Boolean?
|
||||
val isolatedProcessEnabled = pigeonVar_list[38] as Boolean?
|
||||
val appZygoteProcessEnabled = pigeonVar_list[39] as Boolean?
|
||||
val extensionsWebAPIEnabled = pigeonVar_list[40] as Boolean?
|
||||
val lnaBlocking = pigeonVar_list[41] as Boolean?
|
||||
val lnaBlockTrackers = pigeonVar_list[42] as Boolean?
|
||||
val lnaEnabled = pigeonVar_list[43] as Boolean?
|
||||
return GeckoEngineSettings(javascriptEnabled, trackingProtectionPolicy, httpsOnlyMode, globalPrivacyControlEnabled, preferredColorScheme, cookieBannerHandlingMode, cookieBannerHandlingModePrivateBrowsing, cookieBannerHandlingGlobalRules, cookieBannerHandlingGlobalRulesSubFrames, webContentIsolationStrategy, userAgent, contentBlocking, enterpriseRootsEnabled, dohSettings, fingerprintingProtectionOverrides, locales, useContentBlockingDatabase, blockCookies, customCookiePolicy, blockTrackingContent, trackingContentScope, blockCryptominers, blockFingerprinters, blockRedirectTrackers, blockSuspectedFingerprinters, suspectedFingerprintersScope, allowListBaseline, allowListConvenience, blockAdsAnalyticsSocialTrackers, webFontsEnabled, automaticFontSizeAdjustment, fontSizeFactor, fontInflationEnabled, displayDensityOverride, screenWidthOverride, screenHeightOverride, inputAutoZoomEnabled, fissionEnabled, isolatedProcessEnabled, appZygoteProcessEnabled, extensionsWebAPIEnabled, lnaBlocking, lnaBlockTrackers, lnaEnabled)
|
||||
}
|
||||
}
|
||||
fun toList(): List<Any?> {
|
||||
@@ -3504,6 +3513,7 @@ data class GeckoEngineSettings (
|
||||
dohSettings,
|
||||
fingerprintingProtectionOverrides,
|
||||
locales,
|
||||
useContentBlockingDatabase,
|
||||
blockCookies,
|
||||
customCookiePolicy,
|
||||
blockTrackingContent,
|
||||
@@ -3515,6 +3525,7 @@ data class GeckoEngineSettings (
|
||||
suspectedFingerprintersScope,
|
||||
allowListBaseline,
|
||||
allowListConvenience,
|
||||
blockAdsAnalyticsSocialTrackers,
|
||||
webFontsEnabled,
|
||||
automaticFontSizeAdjustment,
|
||||
fontSizeFactor,
|
||||
@@ -3540,7 +3551,7 @@ data class GeckoEngineSettings (
|
||||
return true
|
||||
}
|
||||
val other = other as GeckoEngineSettings
|
||||
return GeckoPigeonUtils.deepEquals(this.javascriptEnabled, other.javascriptEnabled) && GeckoPigeonUtils.deepEquals(this.trackingProtectionPolicy, other.trackingProtectionPolicy) && GeckoPigeonUtils.deepEquals(this.httpsOnlyMode, other.httpsOnlyMode) && GeckoPigeonUtils.deepEquals(this.globalPrivacyControlEnabled, other.globalPrivacyControlEnabled) && GeckoPigeonUtils.deepEquals(this.preferredColorScheme, other.preferredColorScheme) && GeckoPigeonUtils.deepEquals(this.cookieBannerHandlingMode, other.cookieBannerHandlingMode) && GeckoPigeonUtils.deepEquals(this.cookieBannerHandlingModePrivateBrowsing, other.cookieBannerHandlingModePrivateBrowsing) && GeckoPigeonUtils.deepEquals(this.cookieBannerHandlingGlobalRules, other.cookieBannerHandlingGlobalRules) && GeckoPigeonUtils.deepEquals(this.cookieBannerHandlingGlobalRulesSubFrames, other.cookieBannerHandlingGlobalRulesSubFrames) && GeckoPigeonUtils.deepEquals(this.webContentIsolationStrategy, other.webContentIsolationStrategy) && GeckoPigeonUtils.deepEquals(this.userAgent, other.userAgent) && GeckoPigeonUtils.deepEquals(this.contentBlocking, other.contentBlocking) && GeckoPigeonUtils.deepEquals(this.enterpriseRootsEnabled, other.enterpriseRootsEnabled) && GeckoPigeonUtils.deepEquals(this.dohSettings, other.dohSettings) && GeckoPigeonUtils.deepEquals(this.fingerprintingProtectionOverrides, other.fingerprintingProtectionOverrides) && GeckoPigeonUtils.deepEquals(this.locales, other.locales) && GeckoPigeonUtils.deepEquals(this.blockCookies, other.blockCookies) && GeckoPigeonUtils.deepEquals(this.customCookiePolicy, other.customCookiePolicy) && GeckoPigeonUtils.deepEquals(this.blockTrackingContent, other.blockTrackingContent) && GeckoPigeonUtils.deepEquals(this.trackingContentScope, other.trackingContentScope) && GeckoPigeonUtils.deepEquals(this.blockCryptominers, other.blockCryptominers) && GeckoPigeonUtils.deepEquals(this.blockFingerprinters, other.blockFingerprinters) && GeckoPigeonUtils.deepEquals(this.blockRedirectTrackers, other.blockRedirectTrackers) && GeckoPigeonUtils.deepEquals(this.blockSuspectedFingerprinters, other.blockSuspectedFingerprinters) && GeckoPigeonUtils.deepEquals(this.suspectedFingerprintersScope, other.suspectedFingerprintersScope) && GeckoPigeonUtils.deepEquals(this.allowListBaseline, other.allowListBaseline) && GeckoPigeonUtils.deepEquals(this.allowListConvenience, other.allowListConvenience) && GeckoPigeonUtils.deepEquals(this.webFontsEnabled, other.webFontsEnabled) && GeckoPigeonUtils.deepEquals(this.automaticFontSizeAdjustment, other.automaticFontSizeAdjustment) && GeckoPigeonUtils.deepEquals(this.fontSizeFactor, other.fontSizeFactor) && GeckoPigeonUtils.deepEquals(this.fontInflationEnabled, other.fontInflationEnabled) && GeckoPigeonUtils.deepEquals(this.displayDensityOverride, other.displayDensityOverride) && GeckoPigeonUtils.deepEquals(this.screenWidthOverride, other.screenWidthOverride) && GeckoPigeonUtils.deepEquals(this.screenHeightOverride, other.screenHeightOverride) && GeckoPigeonUtils.deepEquals(this.inputAutoZoomEnabled, other.inputAutoZoomEnabled) && GeckoPigeonUtils.deepEquals(this.fissionEnabled, other.fissionEnabled) && GeckoPigeonUtils.deepEquals(this.isolatedProcessEnabled, other.isolatedProcessEnabled) && GeckoPigeonUtils.deepEquals(this.appZygoteProcessEnabled, other.appZygoteProcessEnabled) && GeckoPigeonUtils.deepEquals(this.extensionsWebAPIEnabled, other.extensionsWebAPIEnabled) && GeckoPigeonUtils.deepEquals(this.lnaBlocking, other.lnaBlocking) && GeckoPigeonUtils.deepEquals(this.lnaBlockTrackers, other.lnaBlockTrackers) && GeckoPigeonUtils.deepEquals(this.lnaEnabled, other.lnaEnabled)
|
||||
return GeckoPigeonUtils.deepEquals(this.javascriptEnabled, other.javascriptEnabled) && GeckoPigeonUtils.deepEquals(this.trackingProtectionPolicy, other.trackingProtectionPolicy) && GeckoPigeonUtils.deepEquals(this.httpsOnlyMode, other.httpsOnlyMode) && GeckoPigeonUtils.deepEquals(this.globalPrivacyControlEnabled, other.globalPrivacyControlEnabled) && GeckoPigeonUtils.deepEquals(this.preferredColorScheme, other.preferredColorScheme) && GeckoPigeonUtils.deepEquals(this.cookieBannerHandlingMode, other.cookieBannerHandlingMode) && GeckoPigeonUtils.deepEquals(this.cookieBannerHandlingModePrivateBrowsing, other.cookieBannerHandlingModePrivateBrowsing) && GeckoPigeonUtils.deepEquals(this.cookieBannerHandlingGlobalRules, other.cookieBannerHandlingGlobalRules) && GeckoPigeonUtils.deepEquals(this.cookieBannerHandlingGlobalRulesSubFrames, other.cookieBannerHandlingGlobalRulesSubFrames) && GeckoPigeonUtils.deepEquals(this.webContentIsolationStrategy, other.webContentIsolationStrategy) && GeckoPigeonUtils.deepEquals(this.userAgent, other.userAgent) && GeckoPigeonUtils.deepEquals(this.contentBlocking, other.contentBlocking) && GeckoPigeonUtils.deepEquals(this.enterpriseRootsEnabled, other.enterpriseRootsEnabled) && GeckoPigeonUtils.deepEquals(this.dohSettings, other.dohSettings) && GeckoPigeonUtils.deepEquals(this.fingerprintingProtectionOverrides, other.fingerprintingProtectionOverrides) && GeckoPigeonUtils.deepEquals(this.locales, other.locales) && GeckoPigeonUtils.deepEquals(this.useContentBlockingDatabase, other.useContentBlockingDatabase) && GeckoPigeonUtils.deepEquals(this.blockCookies, other.blockCookies) && GeckoPigeonUtils.deepEquals(this.customCookiePolicy, other.customCookiePolicy) && GeckoPigeonUtils.deepEquals(this.blockTrackingContent, other.blockTrackingContent) && GeckoPigeonUtils.deepEquals(this.trackingContentScope, other.trackingContentScope) && GeckoPigeonUtils.deepEquals(this.blockCryptominers, other.blockCryptominers) && GeckoPigeonUtils.deepEquals(this.blockFingerprinters, other.blockFingerprinters) && GeckoPigeonUtils.deepEquals(this.blockRedirectTrackers, other.blockRedirectTrackers) && GeckoPigeonUtils.deepEquals(this.blockSuspectedFingerprinters, other.blockSuspectedFingerprinters) && GeckoPigeonUtils.deepEquals(this.suspectedFingerprintersScope, other.suspectedFingerprintersScope) && GeckoPigeonUtils.deepEquals(this.allowListBaseline, other.allowListBaseline) && GeckoPigeonUtils.deepEquals(this.allowListConvenience, other.allowListConvenience) && GeckoPigeonUtils.deepEquals(this.blockAdsAnalyticsSocialTrackers, other.blockAdsAnalyticsSocialTrackers) && GeckoPigeonUtils.deepEquals(this.webFontsEnabled, other.webFontsEnabled) && GeckoPigeonUtils.deepEquals(this.automaticFontSizeAdjustment, other.automaticFontSizeAdjustment) && GeckoPigeonUtils.deepEquals(this.fontSizeFactor, other.fontSizeFactor) && GeckoPigeonUtils.deepEquals(this.fontInflationEnabled, other.fontInflationEnabled) && GeckoPigeonUtils.deepEquals(this.displayDensityOverride, other.displayDensityOverride) && GeckoPigeonUtils.deepEquals(this.screenWidthOverride, other.screenWidthOverride) && GeckoPigeonUtils.deepEquals(this.screenHeightOverride, other.screenHeightOverride) && GeckoPigeonUtils.deepEquals(this.inputAutoZoomEnabled, other.inputAutoZoomEnabled) && GeckoPigeonUtils.deepEquals(this.fissionEnabled, other.fissionEnabled) && GeckoPigeonUtils.deepEquals(this.isolatedProcessEnabled, other.isolatedProcessEnabled) && GeckoPigeonUtils.deepEquals(this.appZygoteProcessEnabled, other.appZygoteProcessEnabled) && GeckoPigeonUtils.deepEquals(this.extensionsWebAPIEnabled, other.extensionsWebAPIEnabled) && GeckoPigeonUtils.deepEquals(this.lnaBlocking, other.lnaBlocking) && GeckoPigeonUtils.deepEquals(this.lnaBlockTrackers, other.lnaBlockTrackers) && GeckoPigeonUtils.deepEquals(this.lnaEnabled, other.lnaEnabled)
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
@@ -3561,6 +3572,7 @@ data class GeckoEngineSettings (
|
||||
result = 31 * result + GeckoPigeonUtils.deepHash(this.dohSettings)
|
||||
result = 31 * result + GeckoPigeonUtils.deepHash(this.fingerprintingProtectionOverrides)
|
||||
result = 31 * result + GeckoPigeonUtils.deepHash(this.locales)
|
||||
result = 31 * result + GeckoPigeonUtils.deepHash(this.useContentBlockingDatabase)
|
||||
result = 31 * result + GeckoPigeonUtils.deepHash(this.blockCookies)
|
||||
result = 31 * result + GeckoPigeonUtils.deepHash(this.customCookiePolicy)
|
||||
result = 31 * result + GeckoPigeonUtils.deepHash(this.blockTrackingContent)
|
||||
@@ -3572,6 +3584,7 @@ data class GeckoEngineSettings (
|
||||
result = 31 * result + GeckoPigeonUtils.deepHash(this.suspectedFingerprintersScope)
|
||||
result = 31 * result + GeckoPigeonUtils.deepHash(this.allowListBaseline)
|
||||
result = 31 * result + GeckoPigeonUtils.deepHash(this.allowListConvenience)
|
||||
result = 31 * result + GeckoPigeonUtils.deepHash(this.blockAdsAnalyticsSocialTrackers)
|
||||
result = 31 * result + GeckoPigeonUtils.deepHash(this.webFontsEnabled)
|
||||
result = 31 * result + GeckoPigeonUtils.deepHash(this.automaticFontSizeAdjustment)
|
||||
result = 31 * result + GeckoPigeonUtils.deepHash(this.fontSizeFactor)
|
||||
|
||||
@@ -57,6 +57,7 @@ class GeckoEngineSettingsService {
|
||||
TrackingScope? suspectedFingerprintersScope,
|
||||
bool? allowListBaseline,
|
||||
bool? allowListConvenience,
|
||||
bool? blockAdsAnalyticsSocialTrackers,
|
||||
}) {
|
||||
return _api.updateRuntimeSettings(
|
||||
GeckoEngineSettings(
|
||||
@@ -73,6 +74,7 @@ class GeckoEngineSettingsService {
|
||||
suspectedFingerprintersScope: suspectedFingerprintersScope,
|
||||
allowListBaseline: allowListBaseline,
|
||||
allowListConvenience: allowListConvenience,
|
||||
blockAdsAnalyticsSocialTrackers: blockAdsAnalyticsSocialTrackers,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3455,6 +3455,7 @@ class GeckoEngineSettings {
|
||||
this.dohSettings,
|
||||
this.fingerprintingProtectionOverrides,
|
||||
this.locales,
|
||||
this.useContentBlockingDatabase,
|
||||
this.blockCookies,
|
||||
this.customCookiePolicy,
|
||||
this.blockTrackingContent,
|
||||
@@ -3466,6 +3467,7 @@ class GeckoEngineSettings {
|
||||
this.suspectedFingerprintersScope,
|
||||
this.allowListBaseline,
|
||||
this.allowListConvenience,
|
||||
this.blockAdsAnalyticsSocialTrackers,
|
||||
this.webFontsEnabled,
|
||||
this.automaticFontSizeAdjustment,
|
||||
this.fontSizeFactor,
|
||||
@@ -3515,6 +3517,10 @@ class GeckoEngineSettings {
|
||||
|
||||
List<String>? locales;
|
||||
|
||||
/// Use GeckoView's content-blocking database for tracking protection.
|
||||
/// This is applied when the engine is created and requires app restart.
|
||||
bool? useContentBlockingDatabase;
|
||||
|
||||
/// Master toggle for cookie blocking in Custom mode
|
||||
bool? blockCookies;
|
||||
|
||||
@@ -3549,6 +3555,9 @@ class GeckoEngineSettings {
|
||||
/// Allow convenience tracking protection exceptions (fixes minor issues)
|
||||
bool? allowListConvenience;
|
||||
|
||||
/// Block advertising, analytics, social, and Mozilla social trackers
|
||||
bool? blockAdsAnalyticsSocialTrackers;
|
||||
|
||||
bool? webFontsEnabled;
|
||||
|
||||
bool? automaticFontSizeAdjustment;
|
||||
@@ -3597,6 +3606,7 @@ class GeckoEngineSettings {
|
||||
dohSettings,
|
||||
fingerprintingProtectionOverrides,
|
||||
locales,
|
||||
useContentBlockingDatabase,
|
||||
blockCookies,
|
||||
customCookiePolicy,
|
||||
blockTrackingContent,
|
||||
@@ -3608,6 +3618,7 @@ class GeckoEngineSettings {
|
||||
suspectedFingerprintersScope,
|
||||
allowListBaseline,
|
||||
allowListConvenience,
|
||||
blockAdsAnalyticsSocialTrackers,
|
||||
webFontsEnabled,
|
||||
automaticFontSizeAdjustment,
|
||||
fontSizeFactor,
|
||||
@@ -3648,32 +3659,34 @@ class GeckoEngineSettings {
|
||||
dohSettings: result[13] as DohSettings?,
|
||||
fingerprintingProtectionOverrides: result[14] as String?,
|
||||
locales: (result[15] as List<Object?>?)?.cast<String>(),
|
||||
blockCookies: result[16] as bool?,
|
||||
customCookiePolicy: result[17] as CustomCookiePolicy?,
|
||||
blockTrackingContent: result[18] as bool?,
|
||||
trackingContentScope: result[19] as TrackingScope?,
|
||||
blockCryptominers: result[20] as bool?,
|
||||
blockFingerprinters: result[21] as bool?,
|
||||
blockRedirectTrackers: result[22] as bool?,
|
||||
blockSuspectedFingerprinters: result[23] as bool?,
|
||||
suspectedFingerprintersScope: result[24] as TrackingScope?,
|
||||
allowListBaseline: result[25] as bool?,
|
||||
allowListConvenience: result[26] as bool?,
|
||||
webFontsEnabled: result[27] as bool?,
|
||||
automaticFontSizeAdjustment: result[28] as bool?,
|
||||
fontSizeFactor: result[29] as double?,
|
||||
fontInflationEnabled: result[30] as bool?,
|
||||
displayDensityOverride: result[31] as double?,
|
||||
screenWidthOverride: result[32] as int?,
|
||||
screenHeightOverride: result[33] as int?,
|
||||
inputAutoZoomEnabled: result[34] as bool?,
|
||||
fissionEnabled: result[35] as bool?,
|
||||
isolatedProcessEnabled: result[36] as bool?,
|
||||
appZygoteProcessEnabled: result[37] as bool?,
|
||||
extensionsWebAPIEnabled: result[38] as bool?,
|
||||
lnaBlocking: result[39] as bool?,
|
||||
lnaBlockTrackers: result[40] as bool?,
|
||||
lnaEnabled: result[41] as bool?,
|
||||
useContentBlockingDatabase: result[16] as bool?,
|
||||
blockCookies: result[17] as bool?,
|
||||
customCookiePolicy: result[18] as CustomCookiePolicy?,
|
||||
blockTrackingContent: result[19] as bool?,
|
||||
trackingContentScope: result[20] as TrackingScope?,
|
||||
blockCryptominers: result[21] as bool?,
|
||||
blockFingerprinters: result[22] as bool?,
|
||||
blockRedirectTrackers: result[23] as bool?,
|
||||
blockSuspectedFingerprinters: result[24] as bool?,
|
||||
suspectedFingerprintersScope: result[25] as TrackingScope?,
|
||||
allowListBaseline: result[26] as bool?,
|
||||
allowListConvenience: result[27] as bool?,
|
||||
blockAdsAnalyticsSocialTrackers: result[28] as bool?,
|
||||
webFontsEnabled: result[29] as bool?,
|
||||
automaticFontSizeAdjustment: result[30] as bool?,
|
||||
fontSizeFactor: result[31] as double?,
|
||||
fontInflationEnabled: result[32] as bool?,
|
||||
displayDensityOverride: result[33] as double?,
|
||||
screenWidthOverride: result[34] as int?,
|
||||
screenHeightOverride: result[35] as int?,
|
||||
inputAutoZoomEnabled: result[36] as bool?,
|
||||
fissionEnabled: result[37] as bool?,
|
||||
isolatedProcessEnabled: result[38] as bool?,
|
||||
appZygoteProcessEnabled: result[39] as bool?,
|
||||
extensionsWebAPIEnabled: result[40] as bool?,
|
||||
lnaBlocking: result[41] as bool?,
|
||||
lnaBlockTrackers: result[42] as bool?,
|
||||
lnaEnabled: result[43] as bool?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3686,7 +3699,7 @@ class GeckoEngineSettings {
|
||||
if (identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
return _deepEquals(javascriptEnabled, other.javascriptEnabled) && _deepEquals(trackingProtectionPolicy, other.trackingProtectionPolicy) && _deepEquals(httpsOnlyMode, other.httpsOnlyMode) && _deepEquals(globalPrivacyControlEnabled, other.globalPrivacyControlEnabled) && _deepEquals(preferredColorScheme, other.preferredColorScheme) && _deepEquals(cookieBannerHandlingMode, other.cookieBannerHandlingMode) && _deepEquals(cookieBannerHandlingModePrivateBrowsing, other.cookieBannerHandlingModePrivateBrowsing) && _deepEquals(cookieBannerHandlingGlobalRules, other.cookieBannerHandlingGlobalRules) && _deepEquals(cookieBannerHandlingGlobalRulesSubFrames, other.cookieBannerHandlingGlobalRulesSubFrames) && _deepEquals(webContentIsolationStrategy, other.webContentIsolationStrategy) && _deepEquals(userAgent, other.userAgent) && _deepEquals(contentBlocking, other.contentBlocking) && _deepEquals(enterpriseRootsEnabled, other.enterpriseRootsEnabled) && _deepEquals(dohSettings, other.dohSettings) && _deepEquals(fingerprintingProtectionOverrides, other.fingerprintingProtectionOverrides) && _deepEquals(locales, other.locales) && _deepEquals(blockCookies, other.blockCookies) && _deepEquals(customCookiePolicy, other.customCookiePolicy) && _deepEquals(blockTrackingContent, other.blockTrackingContent) && _deepEquals(trackingContentScope, other.trackingContentScope) && _deepEquals(blockCryptominers, other.blockCryptominers) && _deepEquals(blockFingerprinters, other.blockFingerprinters) && _deepEquals(blockRedirectTrackers, other.blockRedirectTrackers) && _deepEquals(blockSuspectedFingerprinters, other.blockSuspectedFingerprinters) && _deepEquals(suspectedFingerprintersScope, other.suspectedFingerprintersScope) && _deepEquals(allowListBaseline, other.allowListBaseline) && _deepEquals(allowListConvenience, other.allowListConvenience) && _deepEquals(webFontsEnabled, other.webFontsEnabled) && _deepEquals(automaticFontSizeAdjustment, other.automaticFontSizeAdjustment) && _deepEquals(fontSizeFactor, other.fontSizeFactor) && _deepEquals(fontInflationEnabled, other.fontInflationEnabled) && _deepEquals(displayDensityOverride, other.displayDensityOverride) && _deepEquals(screenWidthOverride, other.screenWidthOverride) && _deepEquals(screenHeightOverride, other.screenHeightOverride) && _deepEquals(inputAutoZoomEnabled, other.inputAutoZoomEnabled) && _deepEquals(fissionEnabled, other.fissionEnabled) && _deepEquals(isolatedProcessEnabled, other.isolatedProcessEnabled) && _deepEquals(appZygoteProcessEnabled, other.appZygoteProcessEnabled) && _deepEquals(extensionsWebAPIEnabled, other.extensionsWebAPIEnabled) && _deepEquals(lnaBlocking, other.lnaBlocking) && _deepEquals(lnaBlockTrackers, other.lnaBlockTrackers) && _deepEquals(lnaEnabled, other.lnaEnabled);
|
||||
return _deepEquals(javascriptEnabled, other.javascriptEnabled) && _deepEquals(trackingProtectionPolicy, other.trackingProtectionPolicy) && _deepEquals(httpsOnlyMode, other.httpsOnlyMode) && _deepEquals(globalPrivacyControlEnabled, other.globalPrivacyControlEnabled) && _deepEquals(preferredColorScheme, other.preferredColorScheme) && _deepEquals(cookieBannerHandlingMode, other.cookieBannerHandlingMode) && _deepEquals(cookieBannerHandlingModePrivateBrowsing, other.cookieBannerHandlingModePrivateBrowsing) && _deepEquals(cookieBannerHandlingGlobalRules, other.cookieBannerHandlingGlobalRules) && _deepEquals(cookieBannerHandlingGlobalRulesSubFrames, other.cookieBannerHandlingGlobalRulesSubFrames) && _deepEquals(webContentIsolationStrategy, other.webContentIsolationStrategy) && _deepEquals(userAgent, other.userAgent) && _deepEquals(contentBlocking, other.contentBlocking) && _deepEquals(enterpriseRootsEnabled, other.enterpriseRootsEnabled) && _deepEquals(dohSettings, other.dohSettings) && _deepEquals(fingerprintingProtectionOverrides, other.fingerprintingProtectionOverrides) && _deepEquals(locales, other.locales) && _deepEquals(useContentBlockingDatabase, other.useContentBlockingDatabase) && _deepEquals(blockCookies, other.blockCookies) && _deepEquals(customCookiePolicy, other.customCookiePolicy) && _deepEquals(blockTrackingContent, other.blockTrackingContent) && _deepEquals(trackingContentScope, other.trackingContentScope) && _deepEquals(blockCryptominers, other.blockCryptominers) && _deepEquals(blockFingerprinters, other.blockFingerprinters) && _deepEquals(blockRedirectTrackers, other.blockRedirectTrackers) && _deepEquals(blockSuspectedFingerprinters, other.blockSuspectedFingerprinters) && _deepEquals(suspectedFingerprintersScope, other.suspectedFingerprintersScope) && _deepEquals(allowListBaseline, other.allowListBaseline) && _deepEquals(allowListConvenience, other.allowListConvenience) && _deepEquals(blockAdsAnalyticsSocialTrackers, other.blockAdsAnalyticsSocialTrackers) && _deepEquals(webFontsEnabled, other.webFontsEnabled) && _deepEquals(automaticFontSizeAdjustment, other.automaticFontSizeAdjustment) && _deepEquals(fontSizeFactor, other.fontSizeFactor) && _deepEquals(fontInflationEnabled, other.fontInflationEnabled) && _deepEquals(displayDensityOverride, other.displayDensityOverride) && _deepEquals(screenWidthOverride, other.screenWidthOverride) && _deepEquals(screenHeightOverride, other.screenHeightOverride) && _deepEquals(inputAutoZoomEnabled, other.inputAutoZoomEnabled) && _deepEquals(fissionEnabled, other.fissionEnabled) && _deepEquals(isolatedProcessEnabled, other.isolatedProcessEnabled) && _deepEquals(appZygoteProcessEnabled, other.appZygoteProcessEnabled) && _deepEquals(extensionsWebAPIEnabled, other.extensionsWebAPIEnabled) && _deepEquals(lnaBlocking, other.lnaBlocking) && _deepEquals(lnaBlockTrackers, other.lnaBlockTrackers) && _deepEquals(lnaEnabled, other.lnaEnabled);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -1091,6 +1091,10 @@ class GeckoEngineSettings {
|
||||
final String? fingerprintingProtectionOverrides;
|
||||
final List<String>? locales;
|
||||
|
||||
/// Use GeckoView's content-blocking database for tracking protection.
|
||||
/// This is applied when the engine is created and requires app restart.
|
||||
final bool? useContentBlockingDatabase;
|
||||
|
||||
// Custom Tracking Protection Settings
|
||||
/// Master toggle for cookie blocking in Custom mode
|
||||
final bool? blockCookies;
|
||||
@@ -1126,6 +1130,9 @@ class GeckoEngineSettings {
|
||||
/// Allow convenience tracking protection exceptions (fixes minor issues)
|
||||
final bool? allowListConvenience;
|
||||
|
||||
/// Block advertising, analytics, social, and Mozilla social trackers
|
||||
final bool? blockAdsAnalyticsSocialTrackers;
|
||||
|
||||
// Web Content Settings
|
||||
final bool? webFontsEnabled;
|
||||
final bool? automaticFontSizeAdjustment;
|
||||
@@ -1164,6 +1171,7 @@ class GeckoEngineSettings {
|
||||
this.dohSettings,
|
||||
this.fingerprintingProtectionOverrides,
|
||||
this.locales,
|
||||
this.useContentBlockingDatabase,
|
||||
this.blockCookies,
|
||||
this.customCookiePolicy,
|
||||
this.blockTrackingContent,
|
||||
@@ -1175,6 +1183,7 @@ class GeckoEngineSettings {
|
||||
this.suspectedFingerprintersScope,
|
||||
this.allowListBaseline,
|
||||
this.allowListConvenience,
|
||||
this.blockAdsAnalyticsSocialTrackers,
|
||||
this.webFontsEnabled,
|
||||
this.automaticFontSizeAdjustment,
|
||||
this.fontSizeFactor,
|
||||
|
||||
Reference in New Issue
Block a user