add various engine settings
This commit is contained in:
+38
@@ -236,6 +236,44 @@ class EngineSettingsReplicationService
|
||||
settings.locales.join(','),
|
||||
);
|
||||
}
|
||||
// Web Content Settings
|
||||
if (previous.value?.webFontsEnabled !=
|
||||
settings.webFontsEnabled) {
|
||||
await _service.webFontsEnabled(settings.webFontsEnabled);
|
||||
}
|
||||
if (previous.value?.automaticFontSizeAdjustment !=
|
||||
settings.automaticFontSizeAdjustment) {
|
||||
await _service.automaticFontSizeAdjustment(
|
||||
settings.automaticFontSizeAdjustment,
|
||||
);
|
||||
}
|
||||
if (previous.value?.fontSizeFactor !=
|
||||
settings.fontSizeFactor) {
|
||||
await _service.fontSizeFactor(settings.fontSizeFactor);
|
||||
}
|
||||
if (previous.value?.fontInflationEnabled !=
|
||||
settings.fontInflationEnabled) {
|
||||
await _service.fontInflationEnabled(
|
||||
settings.fontInflationEnabled,
|
||||
);
|
||||
}
|
||||
if (previous.value?.inputAutoZoomEnabled !=
|
||||
settings.inputAutoZoomEnabled) {
|
||||
await _service.inputAutoZoomEnabled(
|
||||
settings.inputAutoZoomEnabled,
|
||||
);
|
||||
}
|
||||
// LNA Settings
|
||||
if (previous.value?.lnaBlocking != settings.lnaBlocking) {
|
||||
await _service.lnaBlocking(settings.lnaBlocking);
|
||||
}
|
||||
if (previous.value?.lnaBlockTrackers !=
|
||||
settings.lnaBlockTrackers) {
|
||||
await _service.lnaBlockTrackers(settings.lnaBlockTrackers);
|
||||
}
|
||||
if (previous.value?.lnaEnabled != settings.lnaEnabled) {
|
||||
await _service.lnaEnabled(settings.lnaEnabled);
|
||||
}
|
||||
} else {
|
||||
await _service.setDefaultSettings(settings);
|
||||
await ref
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ final class EngineSettingsReplicationServiceProvider
|
||||
}
|
||||
|
||||
String _$engineSettingsReplicationServiceHash() =>
|
||||
r'7a4db374b521e592847a85cb8d2aa184be788ee4';
|
||||
r'20fc7f07daed37346f44e692928bb225653f67c8';
|
||||
|
||||
abstract class _$EngineSettingsReplicationService extends $Notifier<void> {
|
||||
void build();
|
||||
|
||||
@@ -25,7 +25,9 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:weblibre/core/routing/routes.dart';
|
||||
import 'package:weblibre/features/settings/presentation/controllers/save_settings.dart';
|
||||
import 'package:weblibre/features/settings/presentation/widgets/sections.dart';
|
||||
import 'package:weblibre/features/user/data/models/engine_settings.dart';
|
||||
import 'package:weblibre/features/user/data/models/general_settings.dart';
|
||||
import 'package:weblibre/features/user/domain/repositories/engine_settings.dart';
|
||||
import 'package:weblibre/features/user/domain/repositories/general_settings.dart';
|
||||
|
||||
class AppearanceDisplaySettingsScreen extends StatelessWidget {
|
||||
@@ -44,6 +46,7 @@ class AppearanceDisplaySettingsScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||||
children: const [
|
||||
_VisualSection(),
|
||||
_WebContentSection(),
|
||||
_TabBarSection(),
|
||||
_TabViewSection(),
|
||||
_GesturesSection(),
|
||||
@@ -402,3 +405,226 @@ class _DoubleBackCloseTabTile extends HookConsumerWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _WebContentSection extends StatelessWidget {
|
||||
const _WebContentSection();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Column(
|
||||
children: [
|
||||
SettingSection(name: 'Web Content'),
|
||||
_WebFontsEnabledTile(),
|
||||
_AutomaticFontSizeAdjustmentTile(),
|
||||
_FontSizeFactorSlider(),
|
||||
_FontInflationTile(),
|
||||
_InputAutoZoomEnabledTile(),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _WebFontsEnabledTile extends HookConsumerWidget {
|
||||
const _WebFontsEnabledTile();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final webFontsEnabled = ref.watch(
|
||||
engineSettingsWithDefaultsProvider.select((s) => s.webFontsEnabled),
|
||||
);
|
||||
|
||||
return SwitchListTile.adaptive(
|
||||
title: const Text('Web Fonts'),
|
||||
subtitle: const Text('Allow websites to use custom fonts'),
|
||||
secondary: const Icon(MdiIcons.formatFont),
|
||||
value: webFontsEnabled,
|
||||
onChanged: (value) async {
|
||||
await ref
|
||||
.read(saveEngineSettingsControllerProvider.notifier)
|
||||
.save(
|
||||
(currentSettings) =>
|
||||
currentSettings.copyWith.webFontsEnabled(value),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _AutomaticFontSizeAdjustmentTile extends HookConsumerWidget {
|
||||
const _AutomaticFontSizeAdjustmentTile();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final automaticFontSizeAdjustment = ref.watch(
|
||||
engineSettingsWithDefaultsProvider.select(
|
||||
(s) => s.automaticFontSizeAdjustment,
|
||||
),
|
||||
);
|
||||
|
||||
return SwitchListTile.adaptive(
|
||||
title: const Text('Automatic Font Size'),
|
||||
subtitle: const Text(
|
||||
'Automatically adjust font size based on system settings. Disable to manually control font size factor and inflation.',
|
||||
),
|
||||
secondary: const Icon(MdiIcons.formatFontSizeIncrease),
|
||||
value: automaticFontSizeAdjustment,
|
||||
onChanged: (value) async {
|
||||
await ref
|
||||
.read(saveEngineSettingsControllerProvider.notifier)
|
||||
.save(
|
||||
(currentSettings) =>
|
||||
currentSettings.copyWith.automaticFontSizeAdjustment(value),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _FontSizeFactorSlider extends HookConsumerWidget {
|
||||
const _FontSizeFactorSlider();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final automaticFontSizeAdjustment = ref.watch(
|
||||
engineSettingsWithDefaultsProvider.select(
|
||||
(s) => s.automaticFontSizeAdjustment,
|
||||
),
|
||||
);
|
||||
final fontSizeFactor = ref.watch(
|
||||
engineSettingsWithDefaultsProvider.select((s) => s.fontSizeFactor),
|
||||
);
|
||||
final sliderValue = useState(fontSizeFactor);
|
||||
|
||||
useEffect(() {
|
||||
sliderValue.value = fontSizeFactor;
|
||||
return null;
|
||||
}, [fontSizeFactor]);
|
||||
|
||||
final sliderLabel = '${(sliderValue.value * 100).round()}%';
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ListTile(
|
||||
title: const Text('Font Size Factor'),
|
||||
subtitle: Text(
|
||||
automaticFontSizeAdjustment
|
||||
? 'Disabled while automatic font size is enabled'
|
||||
: 'Scale web page text size',
|
||||
),
|
||||
leading: const Icon(MdiIcons.formatSize),
|
||||
contentPadding: EdgeInsets.zero,
|
||||
enabled: !automaticFontSizeAdjustment,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
sliderLabel,
|
||||
style: Theme.of(context).textTheme.titleLarge?.copyWith(
|
||||
color: automaticFontSizeAdjustment
|
||||
? Theme.of(context).disabledColor
|
||||
: null,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Slider(
|
||||
min: 0.5,
|
||||
max: 3.0,
|
||||
divisions: 25,
|
||||
label: sliderLabel,
|
||||
value: sliderValue.value.clamp(0.5, 3.0),
|
||||
onChanged: automaticFontSizeAdjustment
|
||||
? null
|
||||
: (value) {
|
||||
sliderValue.value = value;
|
||||
},
|
||||
onChangeEnd: automaticFontSizeAdjustment
|
||||
? null
|
||||
: (value) async {
|
||||
final rounded =
|
||||
(value * 10).round() / 10;
|
||||
sliderValue.value = rounded;
|
||||
await ref
|
||||
.read(
|
||||
saveEngineSettingsControllerProvider.notifier,
|
||||
)
|
||||
.save(
|
||||
(currentSettings) => currentSettings.copyWith
|
||||
.fontSizeFactor(rounded),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _FontInflationTile extends HookConsumerWidget {
|
||||
const _FontInflationTile();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final automaticFontSizeAdjustment = ref.watch(
|
||||
engineSettingsWithDefaultsProvider.select(
|
||||
(s) => s.automaticFontSizeAdjustment,
|
||||
),
|
||||
);
|
||||
final fontInflationEnabled = ref.watch(
|
||||
engineSettingsWithDefaultsProvider.select((s) => s.fontInflationEnabled),
|
||||
);
|
||||
|
||||
return SwitchListTile.adaptive(
|
||||
title: const Text('Font Inflation'),
|
||||
subtitle: Text(
|
||||
automaticFontSizeAdjustment
|
||||
? 'Disabled while automatic font size is enabled'
|
||||
: 'Enlarge text on pages that lack a mobile viewport meta tag',
|
||||
),
|
||||
secondary: const Icon(MdiIcons.formatTextVariantOutline),
|
||||
value: fontInflationEnabled,
|
||||
onChanged: automaticFontSizeAdjustment
|
||||
? null
|
||||
: (value) async {
|
||||
await ref
|
||||
.read(saveEngineSettingsControllerProvider.notifier)
|
||||
.save(
|
||||
(currentSettings) =>
|
||||
currentSettings.copyWith.fontInflationEnabled(value),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _InputAutoZoomEnabledTile extends HookConsumerWidget {
|
||||
const _InputAutoZoomEnabledTile();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final inputAutoZoomEnabled = ref.watch(
|
||||
engineSettingsWithDefaultsProvider.select((s) => s.inputAutoZoomEnabled),
|
||||
);
|
||||
|
||||
return SwitchListTile.adaptive(
|
||||
title: const Text('Input Auto Zoom'),
|
||||
subtitle: const Text('Automatically zoom in when focusing text inputs'),
|
||||
secondary: const Icon(MdiIcons.formTextbox),
|
||||
value: inputAutoZoomEnabled,
|
||||
onChanged: (value) async {
|
||||
await ref
|
||||
.read(saveEngineSettingsControllerProvider.notifier)
|
||||
.save(
|
||||
(currentSettings) =>
|
||||
currentSettings.copyWith.inputAutoZoomEnabled(value),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,10 @@ import 'package:weblibre/features/settings/presentation/controllers/save_setting
|
||||
import 'package:weblibre/features/settings/presentation/widgets/sections.dart';
|
||||
import 'package:weblibre/features/user/data/models/engine_settings.dart';
|
||||
import 'package:weblibre/features/user/data/models/general_settings.dart';
|
||||
import 'package:weblibre/features/user/domain/presentation/dialogs/quit_browser_dialog.dart';
|
||||
import 'package:weblibre/features/user/domain/repositories/engine_settings.dart';
|
||||
import 'package:weblibre/features/user/domain/repositories/general_settings.dart';
|
||||
import 'package:weblibre/utils/exit_app.dart';
|
||||
|
||||
class PrivacySecuritySettingsScreen extends StatelessWidget {
|
||||
const PrivacySecuritySettingsScreen({super.key});
|
||||
@@ -51,6 +53,7 @@ class PrivacySecuritySettingsScreen extends StatelessWidget {
|
||||
_TrackingProtectionSection(),
|
||||
_OpenLinkModulesSection(),
|
||||
_ConnectionSecuritySection(),
|
||||
_LocalNetworkAccessSection(),
|
||||
_DataManagementSection(),
|
||||
_AdvancedSection(),
|
||||
],
|
||||
@@ -200,6 +203,9 @@ class _AdvancedSection extends StatelessWidget {
|
||||
children: [
|
||||
SettingSection(name: 'Advanced'),
|
||||
_WebEngineHardeningTile(),
|
||||
_FissionEnabledTile(),
|
||||
_IsolatedProcessEnabledTile(),
|
||||
_AppZygoteProcessEnabledTile(),
|
||||
],
|
||||
);
|
||||
}
|
||||
@@ -650,6 +656,9 @@ class _BounceTrackingProtectionTile extends HookConsumerWidget {
|
||||
: BounceTrackingProtectionMode.disabled,
|
||||
),
|
||||
);
|
||||
if (context.mounted) {
|
||||
await _showRestartDialog(context, ref);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -732,3 +741,217 @@ class _WebEngineHardeningTile extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _FissionEnabledTile extends HookConsumerWidget {
|
||||
const _FissionEnabledTile();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final fissionEnabled = ref.watch(
|
||||
engineSettingsWithDefaultsProvider.select((s) => s.fissionEnabled),
|
||||
);
|
||||
|
||||
return SwitchListTile.adaptive(
|
||||
title: const Text('Fission (Site Isolation)'),
|
||||
subtitle: const Text(
|
||||
'Isolates each site into a separate OS process for improved security. Requires app restart.',
|
||||
),
|
||||
secondary: const Icon(MdiIcons.shieldHalfFull),
|
||||
value: fissionEnabled,
|
||||
onChanged: (value) async {
|
||||
await ref
|
||||
.read(saveEngineSettingsControllerProvider.notifier)
|
||||
.save(
|
||||
(currentSettings) =>
|
||||
currentSettings.copyWith.fissionEnabled(value),
|
||||
);
|
||||
if (context.mounted) {
|
||||
await _showRestartDialog(context, ref);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _IsolatedProcessEnabledTile extends HookConsumerWidget {
|
||||
const _IsolatedProcessEnabledTile();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final isolatedProcessEnabled = ref.watch(
|
||||
engineSettingsWithDefaultsProvider.select(
|
||||
(s) => s.isolatedProcessEnabled,
|
||||
),
|
||||
);
|
||||
|
||||
return SwitchListTile.adaptive(
|
||||
title: const Text('Isolated Content Process'),
|
||||
subtitle: const Text(
|
||||
'Run web content in an isolated process. Requires app restart.',
|
||||
),
|
||||
secondary: const Icon(MdiIcons.shieldCheck),
|
||||
value: isolatedProcessEnabled,
|
||||
onChanged: (value) async {
|
||||
await ref
|
||||
.read(saveEngineSettingsControllerProvider.notifier)
|
||||
.save(
|
||||
(currentSettings) =>
|
||||
currentSettings.copyWith.isolatedProcessEnabled(value),
|
||||
);
|
||||
if (context.mounted) {
|
||||
await _showRestartDialog(context, ref);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _AppZygoteProcessEnabledTile extends HookConsumerWidget {
|
||||
const _AppZygoteProcessEnabledTile();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final appZygoteProcessEnabled = ref.watch(
|
||||
engineSettingsWithDefaultsProvider.select(
|
||||
(s) => s.appZygoteProcessEnabled,
|
||||
),
|
||||
);
|
||||
|
||||
return SwitchListTile.adaptive(
|
||||
title: const Text('App Zygote Process'),
|
||||
subtitle: const Text(
|
||||
'Preload content service via App Zygote for faster isolated process startup. Requires Android 10+ and app restart.',
|
||||
),
|
||||
secondary: const Icon(MdiIcons.rocketLaunch),
|
||||
value: appZygoteProcessEnabled,
|
||||
onChanged: (value) async {
|
||||
await ref
|
||||
.read(saveEngineSettingsControllerProvider.notifier)
|
||||
.save(
|
||||
(currentSettings) =>
|
||||
currentSettings.copyWith.appZygoteProcessEnabled(value),
|
||||
);
|
||||
if (context.mounted) {
|
||||
await _showRestartDialog(context, ref);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _showRestartDialog(BuildContext context, WidgetRef ref) async {
|
||||
final result = await showQuitBrowserDialog(context);
|
||||
if (result == true && context.mounted) {
|
||||
await exitApp(ProviderScope.containerOf(context));
|
||||
}
|
||||
}
|
||||
|
||||
class _LocalNetworkAccessSection extends StatelessWidget {
|
||||
const _LocalNetworkAccessSection();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Column(
|
||||
children: [
|
||||
SettingSection(name: 'Local Network / Device Access Blocking'),
|
||||
_LnaEnabledTile(),
|
||||
_LnaBlockingTile(),
|
||||
_LnaBlockTrackersTile(),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _LnaEnabledTile extends HookConsumerWidget {
|
||||
const _LnaEnabledTile();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final lnaEnabled = ref.watch(
|
||||
engineSettingsWithDefaultsProvider.select((s) => s.lnaEnabled),
|
||||
);
|
||||
|
||||
return SwitchListTile.adaptive(
|
||||
title: const Text('Local Network Access'),
|
||||
subtitle: const Text(
|
||||
'Enable local network and device access blocking',
|
||||
),
|
||||
secondary: const Icon(MdiIcons.lanDisconnect),
|
||||
value: lnaEnabled ?? false,
|
||||
onChanged: (value) async {
|
||||
await ref
|
||||
.read(saveEngineSettingsControllerProvider.notifier)
|
||||
.save(
|
||||
(currentSettings) =>
|
||||
currentSettings.copyWith.lnaEnabled(value),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _LnaBlockingTile extends HookConsumerWidget {
|
||||
const _LnaBlockingTile();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final lnaEnabled = ref.watch(
|
||||
engineSettingsWithDefaultsProvider.select((s) => s.lnaEnabled),
|
||||
);
|
||||
final lnaBlocking = ref.watch(
|
||||
engineSettingsWithDefaultsProvider.select((s) => s.lnaBlocking),
|
||||
);
|
||||
|
||||
return SwitchListTile.adaptive(
|
||||
title: const Text('Block Local Network Requests'),
|
||||
subtitle: const Text(
|
||||
'Block web page requests to local network addresses',
|
||||
),
|
||||
secondary: const Icon(MdiIcons.shieldLockOpen),
|
||||
value: lnaBlocking ?? false,
|
||||
onChanged: lnaEnabled == true
|
||||
? (value) async {
|
||||
await ref
|
||||
.read(saveEngineSettingsControllerProvider.notifier)
|
||||
.save(
|
||||
(currentSettings) =>
|
||||
currentSettings.copyWith.lnaBlocking(value),
|
||||
);
|
||||
}
|
||||
: null,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _LnaBlockTrackersTile extends HookConsumerWidget {
|
||||
const _LnaBlockTrackersTile();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final lnaEnabled = ref.watch(
|
||||
engineSettingsWithDefaultsProvider.select((s) => s.lnaEnabled),
|
||||
);
|
||||
final lnaBlockTrackers = ref.watch(
|
||||
engineSettingsWithDefaultsProvider.select((s) => s.lnaBlockTrackers),
|
||||
);
|
||||
|
||||
return SwitchListTile.adaptive(
|
||||
title: const Text('Block Local Network Trackers'),
|
||||
subtitle: const Text(
|
||||
'Block trackers from accessing local network resources',
|
||||
),
|
||||
secondary: const Icon(MdiIcons.shieldBug),
|
||||
value: lnaBlockTrackers ?? false,
|
||||
onChanged: lnaEnabled == true
|
||||
? (value) async {
|
||||
await ref
|
||||
.read(saveEngineSettingsControllerProvider.notifier)
|
||||
.save(
|
||||
(currentSettings) =>
|
||||
currentSettings.copyWith.lnaBlockTrackers(value),
|
||||
);
|
||||
}
|
||||
: null,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,6 +104,26 @@ class EngineSettings extends GeckoEngineSettings with FastEquatable {
|
||||
@override
|
||||
bool get allowListConvenience => super.allowListConvenience!;
|
||||
|
||||
// Web Content Settings
|
||||
@override
|
||||
bool get webFontsEnabled => super.webFontsEnabled!;
|
||||
@override
|
||||
bool get automaticFontSizeAdjustment => super.automaticFontSizeAdjustment!;
|
||||
@override
|
||||
double get fontSizeFactor => super.fontSizeFactor!;
|
||||
@override
|
||||
bool get fontInflationEnabled => super.fontInflationEnabled!;
|
||||
@override
|
||||
bool get inputAutoZoomEnabled => super.inputAutoZoomEnabled!;
|
||||
|
||||
// Process Isolation Settings (require app restart)
|
||||
@override
|
||||
bool get fissionEnabled => super.fissionEnabled!;
|
||||
@override
|
||||
bool get isolatedProcessEnabled => super.isolatedProcessEnabled!;
|
||||
@override
|
||||
bool get appZygoteProcessEnabled => super.appZygoteProcessEnabled!;
|
||||
|
||||
final QueryParameterStripping queryParameterStripping;
|
||||
|
||||
final BounceTrackingProtectionMode bounceTrackingProtectionMode;
|
||||
@@ -171,6 +191,20 @@ class EngineSettings extends GeckoEngineSettings with FastEquatable {
|
||||
required super.suspectedFingerprintersScope,
|
||||
required super.allowListBaseline,
|
||||
required super.allowListConvenience,
|
||||
required super.webFontsEnabled,
|
||||
required super.automaticFontSizeAdjustment,
|
||||
required super.fontSizeFactor,
|
||||
required super.fontInflationEnabled,
|
||||
required super.displayDensityOverride,
|
||||
required super.screenWidthOverride,
|
||||
required super.screenHeightOverride,
|
||||
required super.inputAutoZoomEnabled,
|
||||
required super.fissionEnabled,
|
||||
required super.isolatedProcessEnabled,
|
||||
required super.appZygoteProcessEnabled,
|
||||
required super.lnaBlocking,
|
||||
required super.lnaBlockTrackers,
|
||||
required super.lnaEnabled,
|
||||
});
|
||||
|
||||
EngineSettings.withDefaults({
|
||||
@@ -207,6 +241,20 @@ class EngineSettings extends GeckoEngineSettings with FastEquatable {
|
||||
TrackingScope? suspectedFingerprintersScope,
|
||||
bool? allowListBaseline,
|
||||
bool? allowListConvenience,
|
||||
bool? webFontsEnabled,
|
||||
bool? automaticFontSizeAdjustment,
|
||||
double? fontSizeFactor,
|
||||
bool? fontInflationEnabled,
|
||||
double? displayDensityOverride,
|
||||
int? screenWidthOverride,
|
||||
int? screenHeightOverride,
|
||||
bool? inputAutoZoomEnabled,
|
||||
bool? fissionEnabled,
|
||||
bool? isolatedProcessEnabled,
|
||||
bool? appZygoteProcessEnabled,
|
||||
bool? lnaBlocking,
|
||||
bool? lnaBlockTrackers,
|
||||
bool? lnaEnabled,
|
||||
}) : queryParameterStripping =
|
||||
queryParameterStripping ?? QueryParameterStripping.disabled,
|
||||
bounceTrackingProtectionMode =
|
||||
@@ -259,6 +307,20 @@ class EngineSettings extends GeckoEngineSettings with FastEquatable {
|
||||
suspectedFingerprintersScope ?? TrackingScope.all,
|
||||
allowListBaseline: allowListBaseline ?? true,
|
||||
allowListConvenience: allowListConvenience ?? false,
|
||||
webFontsEnabled: webFontsEnabled ?? true,
|
||||
automaticFontSizeAdjustment: automaticFontSizeAdjustment ?? true,
|
||||
fontSizeFactor: fontSizeFactor ?? 1.0,
|
||||
fontInflationEnabled: fontInflationEnabled ?? false,
|
||||
displayDensityOverride: displayDensityOverride,
|
||||
screenWidthOverride: screenWidthOverride,
|
||||
screenHeightOverride: screenHeightOverride,
|
||||
inputAutoZoomEnabled: inputAutoZoomEnabled ?? true,
|
||||
fissionEnabled: fissionEnabled ?? true,
|
||||
isolatedProcessEnabled: isolatedProcessEnabled ?? false,
|
||||
appZygoteProcessEnabled: appZygoteProcessEnabled ?? false,
|
||||
lnaBlocking: lnaBlocking,
|
||||
lnaBlockTrackers: lnaBlockTrackers,
|
||||
lnaEnabled: lnaEnabled,
|
||||
);
|
||||
|
||||
static AddonCollection? _addonCollectionFromJson(String? json) =>
|
||||
@@ -309,5 +371,19 @@ class EngineSettings extends GeckoEngineSettings with FastEquatable {
|
||||
suspectedFingerprintersScope,
|
||||
allowListBaseline,
|
||||
allowListConvenience,
|
||||
webFontsEnabled,
|
||||
automaticFontSizeAdjustment,
|
||||
fontSizeFactor,
|
||||
fontInflationEnabled,
|
||||
displayDensityOverride,
|
||||
screenWidthOverride,
|
||||
screenHeightOverride,
|
||||
inputAutoZoomEnabled,
|
||||
fissionEnabled,
|
||||
isolatedProcessEnabled,
|
||||
appZygoteProcessEnabled,
|
||||
lnaBlocking,
|
||||
lnaBlockTrackers,
|
||||
lnaEnabled,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -95,6 +95,34 @@ abstract class _$EngineSettingsCWProxy {
|
||||
|
||||
EngineSettings allowListConvenience(bool? allowListConvenience);
|
||||
|
||||
EngineSettings webFontsEnabled(bool? webFontsEnabled);
|
||||
|
||||
EngineSettings automaticFontSizeAdjustment(bool? automaticFontSizeAdjustment);
|
||||
|
||||
EngineSettings fontSizeFactor(double? fontSizeFactor);
|
||||
|
||||
EngineSettings fontInflationEnabled(bool? fontInflationEnabled);
|
||||
|
||||
EngineSettings displayDensityOverride(double? displayDensityOverride);
|
||||
|
||||
EngineSettings screenWidthOverride(int? screenWidthOverride);
|
||||
|
||||
EngineSettings screenHeightOverride(int? screenHeightOverride);
|
||||
|
||||
EngineSettings inputAutoZoomEnabled(bool? inputAutoZoomEnabled);
|
||||
|
||||
EngineSettings fissionEnabled(bool? fissionEnabled);
|
||||
|
||||
EngineSettings isolatedProcessEnabled(bool? isolatedProcessEnabled);
|
||||
|
||||
EngineSettings appZygoteProcessEnabled(bool? appZygoteProcessEnabled);
|
||||
|
||||
EngineSettings lnaBlocking(bool? lnaBlocking);
|
||||
|
||||
EngineSettings lnaBlockTrackers(bool? lnaBlockTrackers);
|
||||
|
||||
EngineSettings lnaEnabled(bool? lnaEnabled);
|
||||
|
||||
/// Creates a new instance with the provided field values.
|
||||
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `EngineSettings(...).copyWith.fieldName(value)`.
|
||||
///
|
||||
@@ -136,6 +164,20 @@ abstract class _$EngineSettingsCWProxy {
|
||||
TrackingScope? suspectedFingerprintersScope,
|
||||
bool? allowListBaseline,
|
||||
bool? allowListConvenience,
|
||||
bool? webFontsEnabled,
|
||||
bool? automaticFontSizeAdjustment,
|
||||
double? fontSizeFactor,
|
||||
bool? fontInflationEnabled,
|
||||
double? displayDensityOverride,
|
||||
int? screenWidthOverride,
|
||||
int? screenHeightOverride,
|
||||
bool? inputAutoZoomEnabled,
|
||||
bool? fissionEnabled,
|
||||
bool? isolatedProcessEnabled,
|
||||
bool? appZygoteProcessEnabled,
|
||||
bool? lnaBlocking,
|
||||
bool? lnaBlockTrackers,
|
||||
bool? lnaEnabled,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -296,6 +338,62 @@ class _$EngineSettingsCWProxyImpl implements _$EngineSettingsCWProxy {
|
||||
EngineSettings allowListConvenience(bool? allowListConvenience) =>
|
||||
call(allowListConvenience: allowListConvenience);
|
||||
|
||||
@override
|
||||
EngineSettings webFontsEnabled(bool? webFontsEnabled) =>
|
||||
call(webFontsEnabled: webFontsEnabled);
|
||||
|
||||
@override
|
||||
EngineSettings automaticFontSizeAdjustment(
|
||||
bool? automaticFontSizeAdjustment,
|
||||
) => call(automaticFontSizeAdjustment: automaticFontSizeAdjustment);
|
||||
|
||||
@override
|
||||
EngineSettings fontSizeFactor(double? fontSizeFactor) =>
|
||||
call(fontSizeFactor: fontSizeFactor);
|
||||
|
||||
@override
|
||||
EngineSettings fontInflationEnabled(bool? fontInflationEnabled) =>
|
||||
call(fontInflationEnabled: fontInflationEnabled);
|
||||
|
||||
@override
|
||||
EngineSettings displayDensityOverride(double? displayDensityOverride) =>
|
||||
call(displayDensityOverride: displayDensityOverride);
|
||||
|
||||
@override
|
||||
EngineSettings screenWidthOverride(int? screenWidthOverride) =>
|
||||
call(screenWidthOverride: screenWidthOverride);
|
||||
|
||||
@override
|
||||
EngineSettings screenHeightOverride(int? screenHeightOverride) =>
|
||||
call(screenHeightOverride: screenHeightOverride);
|
||||
|
||||
@override
|
||||
EngineSettings inputAutoZoomEnabled(bool? inputAutoZoomEnabled) =>
|
||||
call(inputAutoZoomEnabled: inputAutoZoomEnabled);
|
||||
|
||||
@override
|
||||
EngineSettings fissionEnabled(bool? fissionEnabled) =>
|
||||
call(fissionEnabled: fissionEnabled);
|
||||
|
||||
@override
|
||||
EngineSettings isolatedProcessEnabled(bool? isolatedProcessEnabled) =>
|
||||
call(isolatedProcessEnabled: isolatedProcessEnabled);
|
||||
|
||||
@override
|
||||
EngineSettings appZygoteProcessEnabled(bool? appZygoteProcessEnabled) =>
|
||||
call(appZygoteProcessEnabled: appZygoteProcessEnabled);
|
||||
|
||||
@override
|
||||
EngineSettings lnaBlocking(bool? lnaBlocking) =>
|
||||
call(lnaBlocking: lnaBlocking);
|
||||
|
||||
@override
|
||||
EngineSettings lnaBlockTrackers(bool? lnaBlockTrackers) =>
|
||||
call(lnaBlockTrackers: lnaBlockTrackers);
|
||||
|
||||
@override
|
||||
EngineSettings lnaEnabled(bool? lnaEnabled) => call(lnaEnabled: lnaEnabled);
|
||||
|
||||
@override
|
||||
/// Creates a new instance with the provided field values.
|
||||
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `EngineSettings(...).copyWith.fieldName(value)`.
|
||||
@@ -340,6 +438,20 @@ class _$EngineSettingsCWProxyImpl implements _$EngineSettingsCWProxy {
|
||||
Object? suspectedFingerprintersScope = const $CopyWithPlaceholder(),
|
||||
Object? allowListBaseline = const $CopyWithPlaceholder(),
|
||||
Object? allowListConvenience = const $CopyWithPlaceholder(),
|
||||
Object? webFontsEnabled = const $CopyWithPlaceholder(),
|
||||
Object? automaticFontSizeAdjustment = const $CopyWithPlaceholder(),
|
||||
Object? fontSizeFactor = const $CopyWithPlaceholder(),
|
||||
Object? fontInflationEnabled = const $CopyWithPlaceholder(),
|
||||
Object? displayDensityOverride = const $CopyWithPlaceholder(),
|
||||
Object? screenWidthOverride = const $CopyWithPlaceholder(),
|
||||
Object? screenHeightOverride = const $CopyWithPlaceholder(),
|
||||
Object? inputAutoZoomEnabled = const $CopyWithPlaceholder(),
|
||||
Object? fissionEnabled = const $CopyWithPlaceholder(),
|
||||
Object? isolatedProcessEnabled = const $CopyWithPlaceholder(),
|
||||
Object? appZygoteProcessEnabled = const $CopyWithPlaceholder(),
|
||||
Object? lnaBlocking = const $CopyWithPlaceholder(),
|
||||
Object? lnaBlockTrackers = const $CopyWithPlaceholder(),
|
||||
Object? lnaEnabled = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
return EngineSettings(
|
||||
javascriptEnabled: javascriptEnabled == const $CopyWithPlaceholder()
|
||||
@@ -502,6 +614,66 @@ class _$EngineSettingsCWProxyImpl implements _$EngineSettingsCWProxy {
|
||||
? _value.allowListConvenience
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: allowListConvenience as bool?,
|
||||
webFontsEnabled: webFontsEnabled == const $CopyWithPlaceholder()
|
||||
? _value.webFontsEnabled
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: webFontsEnabled as bool?,
|
||||
automaticFontSizeAdjustment:
|
||||
automaticFontSizeAdjustment == const $CopyWithPlaceholder()
|
||||
? _value.automaticFontSizeAdjustment
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: automaticFontSizeAdjustment as bool?,
|
||||
fontSizeFactor: fontSizeFactor == const $CopyWithPlaceholder()
|
||||
? _value.fontSizeFactor
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: fontSizeFactor as double?,
|
||||
fontInflationEnabled: fontInflationEnabled == const $CopyWithPlaceholder()
|
||||
? _value.fontInflationEnabled
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: fontInflationEnabled as bool?,
|
||||
displayDensityOverride:
|
||||
displayDensityOverride == const $CopyWithPlaceholder()
|
||||
? _value.displayDensityOverride
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: displayDensityOverride as double?,
|
||||
screenWidthOverride: screenWidthOverride == const $CopyWithPlaceholder()
|
||||
? _value.screenWidthOverride
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: screenWidthOverride as int?,
|
||||
screenHeightOverride: screenHeightOverride == const $CopyWithPlaceholder()
|
||||
? _value.screenHeightOverride
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: screenHeightOverride as int?,
|
||||
inputAutoZoomEnabled: inputAutoZoomEnabled == const $CopyWithPlaceholder()
|
||||
? _value.inputAutoZoomEnabled
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: inputAutoZoomEnabled as bool?,
|
||||
fissionEnabled: fissionEnabled == const $CopyWithPlaceholder()
|
||||
? _value.fissionEnabled
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: fissionEnabled as bool?,
|
||||
isolatedProcessEnabled:
|
||||
isolatedProcessEnabled == const $CopyWithPlaceholder()
|
||||
? _value.isolatedProcessEnabled
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: isolatedProcessEnabled as bool?,
|
||||
appZygoteProcessEnabled:
|
||||
appZygoteProcessEnabled == const $CopyWithPlaceholder()
|
||||
? _value.appZygoteProcessEnabled
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: appZygoteProcessEnabled as bool?,
|
||||
lnaBlocking: lnaBlocking == const $CopyWithPlaceholder()
|
||||
? _value.lnaBlocking
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: lnaBlocking as bool?,
|
||||
lnaBlockTrackers: lnaBlockTrackers == const $CopyWithPlaceholder()
|
||||
? _value.lnaBlockTrackers
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: lnaBlockTrackers as bool?,
|
||||
lnaEnabled: lnaEnabled == const $CopyWithPlaceholder()
|
||||
? _value.lnaEnabled
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: lnaEnabled as bool?,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -517,88 +689,102 @@ extension $EngineSettingsCopyWith on EngineSettings {
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
EngineSettings _$EngineSettingsFromJson(Map<String, dynamic> json) =>
|
||||
EngineSettings.withDefaults(
|
||||
javascriptEnabled: json['javascriptEnabled'] as bool?,
|
||||
trackingProtectionPolicy: $enumDecodeNullable(
|
||||
_$TrackingProtectionPolicyEnumMap,
|
||||
json['trackingProtectionPolicy'],
|
||||
),
|
||||
httpsOnlyMode: $enumDecodeNullable(
|
||||
_$HttpsOnlyModeEnumMap,
|
||||
json['httpsOnlyMode'],
|
||||
),
|
||||
globalPrivacyControlEnabled: json['globalPrivacyControlEnabled'] as bool?,
|
||||
preferredColorScheme: $enumDecodeNullable(
|
||||
_$ColorSchemeEnumMap,
|
||||
json['preferredColorScheme'],
|
||||
),
|
||||
cookieBannerHandlingMode: $enumDecodeNullable(
|
||||
_$CookieBannerHandlingModeEnumMap,
|
||||
json['cookieBannerHandlingMode'],
|
||||
),
|
||||
cookieBannerHandlingModePrivateBrowsing: $enumDecodeNullable(
|
||||
_$CookieBannerHandlingModeEnumMap,
|
||||
json['cookieBannerHandlingModePrivateBrowsing'],
|
||||
),
|
||||
cookieBannerHandlingGlobalRules:
|
||||
json['cookieBannerHandlingGlobalRules'] as bool?,
|
||||
cookieBannerHandlingGlobalRulesSubFrames:
|
||||
json['cookieBannerHandlingGlobalRulesSubFrames'] as bool?,
|
||||
webContentIsolationStrategy: $enumDecodeNullable(
|
||||
_$WebContentIsolationStrategyEnumMap,
|
||||
json['webContentIsolationStrategy'],
|
||||
),
|
||||
queryParameterStripping: $enumDecodeNullable(
|
||||
_$QueryParameterStrippingEnumMap,
|
||||
json['queryParameterStripping'],
|
||||
),
|
||||
bounceTrackingProtectionMode: $enumDecodeNullable(
|
||||
_$BounceTrackingProtectionModeEnumMap,
|
||||
json['bounceTrackingProtectionMode'],
|
||||
),
|
||||
userAgent: json['userAgent'] as String?,
|
||||
enterpriseRootsEnabled: json['enterpriseRootsEnabled'] as bool?,
|
||||
addonCollection: EngineSettings._addonCollectionFromJson(
|
||||
json['addonCollection'] as String?,
|
||||
),
|
||||
dohSettingsMode: $enumDecodeNullable(
|
||||
_$DohSettingsModeEnumMap,
|
||||
json['dohSettingsMode'],
|
||||
),
|
||||
dohProviderUrl: json['dohProviderUrl'] as String?,
|
||||
dohDefaultProviderUrl: json['dohDefaultProviderUrl'] as String?,
|
||||
dohExceptionsList: (json['dohExceptionsList'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList(),
|
||||
fingerprintingProtectionOverrides:
|
||||
json['fingerprintingProtectionOverrides'] as String?,
|
||||
enablePdfJs: json['enablePdfJs'] as bool?,
|
||||
locales: (json['locales'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList(),
|
||||
blockCookies: json['blockCookies'] as bool?,
|
||||
customCookiePolicy: $enumDecodeNullable(
|
||||
_$CustomCookiePolicyEnumMap,
|
||||
json['customCookiePolicy'],
|
||||
),
|
||||
blockTrackingContent: json['blockTrackingContent'] as bool?,
|
||||
trackingContentScope: $enumDecodeNullable(
|
||||
_$TrackingScopeEnumMap,
|
||||
json['trackingContentScope'],
|
||||
),
|
||||
blockCryptominers: json['blockCryptominers'] as bool?,
|
||||
blockFingerprinters: json['blockFingerprinters'] as bool?,
|
||||
blockRedirectTrackers: json['blockRedirectTrackers'] as bool?,
|
||||
blockSuspectedFingerprinters:
|
||||
json['blockSuspectedFingerprinters'] as bool?,
|
||||
suspectedFingerprintersScope: $enumDecodeNullable(
|
||||
_$TrackingScopeEnumMap,
|
||||
json['suspectedFingerprintersScope'],
|
||||
),
|
||||
allowListBaseline: json['allowListBaseline'] as bool?,
|
||||
allowListConvenience: json['allowListConvenience'] as bool?,
|
||||
);
|
||||
EngineSettings _$EngineSettingsFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => EngineSettings.withDefaults(
|
||||
javascriptEnabled: json['javascriptEnabled'] as bool?,
|
||||
trackingProtectionPolicy: $enumDecodeNullable(
|
||||
_$TrackingProtectionPolicyEnumMap,
|
||||
json['trackingProtectionPolicy'],
|
||||
),
|
||||
httpsOnlyMode: $enumDecodeNullable(
|
||||
_$HttpsOnlyModeEnumMap,
|
||||
json['httpsOnlyMode'],
|
||||
),
|
||||
globalPrivacyControlEnabled: json['globalPrivacyControlEnabled'] as bool?,
|
||||
preferredColorScheme: $enumDecodeNullable(
|
||||
_$ColorSchemeEnumMap,
|
||||
json['preferredColorScheme'],
|
||||
),
|
||||
cookieBannerHandlingMode: $enumDecodeNullable(
|
||||
_$CookieBannerHandlingModeEnumMap,
|
||||
json['cookieBannerHandlingMode'],
|
||||
),
|
||||
cookieBannerHandlingModePrivateBrowsing: $enumDecodeNullable(
|
||||
_$CookieBannerHandlingModeEnumMap,
|
||||
json['cookieBannerHandlingModePrivateBrowsing'],
|
||||
),
|
||||
cookieBannerHandlingGlobalRules:
|
||||
json['cookieBannerHandlingGlobalRules'] as bool?,
|
||||
cookieBannerHandlingGlobalRulesSubFrames:
|
||||
json['cookieBannerHandlingGlobalRulesSubFrames'] as bool?,
|
||||
webContentIsolationStrategy: $enumDecodeNullable(
|
||||
_$WebContentIsolationStrategyEnumMap,
|
||||
json['webContentIsolationStrategy'],
|
||||
),
|
||||
queryParameterStripping: $enumDecodeNullable(
|
||||
_$QueryParameterStrippingEnumMap,
|
||||
json['queryParameterStripping'],
|
||||
),
|
||||
bounceTrackingProtectionMode: $enumDecodeNullable(
|
||||
_$BounceTrackingProtectionModeEnumMap,
|
||||
json['bounceTrackingProtectionMode'],
|
||||
),
|
||||
userAgent: json['userAgent'] as String?,
|
||||
enterpriseRootsEnabled: json['enterpriseRootsEnabled'] as bool?,
|
||||
addonCollection: EngineSettings._addonCollectionFromJson(
|
||||
json['addonCollection'] as String?,
|
||||
),
|
||||
dohSettingsMode: $enumDecodeNullable(
|
||||
_$DohSettingsModeEnumMap,
|
||||
json['dohSettingsMode'],
|
||||
),
|
||||
dohProviderUrl: json['dohProviderUrl'] as String?,
|
||||
dohDefaultProviderUrl: json['dohDefaultProviderUrl'] as String?,
|
||||
dohExceptionsList: (json['dohExceptionsList'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList(),
|
||||
fingerprintingProtectionOverrides:
|
||||
json['fingerprintingProtectionOverrides'] as String?,
|
||||
enablePdfJs: json['enablePdfJs'] as bool?,
|
||||
locales: (json['locales'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList(),
|
||||
blockCookies: json['blockCookies'] as bool?,
|
||||
customCookiePolicy: $enumDecodeNullable(
|
||||
_$CustomCookiePolicyEnumMap,
|
||||
json['customCookiePolicy'],
|
||||
),
|
||||
blockTrackingContent: json['blockTrackingContent'] as bool?,
|
||||
trackingContentScope: $enumDecodeNullable(
|
||||
_$TrackingScopeEnumMap,
|
||||
json['trackingContentScope'],
|
||||
),
|
||||
blockCryptominers: json['blockCryptominers'] as bool?,
|
||||
blockFingerprinters: json['blockFingerprinters'] as bool?,
|
||||
blockRedirectTrackers: json['blockRedirectTrackers'] as bool?,
|
||||
blockSuspectedFingerprinters: json['blockSuspectedFingerprinters'] as bool?,
|
||||
suspectedFingerprintersScope: $enumDecodeNullable(
|
||||
_$TrackingScopeEnumMap,
|
||||
json['suspectedFingerprintersScope'],
|
||||
),
|
||||
allowListBaseline: json['allowListBaseline'] as bool?,
|
||||
allowListConvenience: json['allowListConvenience'] as bool?,
|
||||
webFontsEnabled: json['webFontsEnabled'] as bool?,
|
||||
automaticFontSizeAdjustment: json['automaticFontSizeAdjustment'] as bool?,
|
||||
fontSizeFactor: (json['fontSizeFactor'] as num?)?.toDouble(),
|
||||
fontInflationEnabled: json['fontInflationEnabled'] as bool?,
|
||||
displayDensityOverride: (json['displayDensityOverride'] as num?)?.toDouble(),
|
||||
screenWidthOverride: (json['screenWidthOverride'] as num?)?.toInt(),
|
||||
screenHeightOverride: (json['screenHeightOverride'] as num?)?.toInt(),
|
||||
inputAutoZoomEnabled: json['inputAutoZoomEnabled'] as bool?,
|
||||
fissionEnabled: json['fissionEnabled'] as bool?,
|
||||
isolatedProcessEnabled: json['isolatedProcessEnabled'] as bool?,
|
||||
appZygoteProcessEnabled: json['appZygoteProcessEnabled'] as bool?,
|
||||
lnaBlocking: json['lnaBlocking'] as bool?,
|
||||
lnaBlockTrackers: json['lnaBlockTrackers'] as bool?,
|
||||
lnaEnabled: json['lnaEnabled'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$EngineSettingsToJson(
|
||||
EngineSettings instance,
|
||||
@@ -606,6 +792,12 @@ Map<String, dynamic> _$EngineSettingsToJson(
|
||||
'userAgent': instance.userAgent,
|
||||
'fingerprintingProtectionOverrides':
|
||||
instance.fingerprintingProtectionOverrides,
|
||||
'displayDensityOverride': instance.displayDensityOverride,
|
||||
'screenWidthOverride': instance.screenWidthOverride,
|
||||
'screenHeightOverride': instance.screenHeightOverride,
|
||||
'lnaBlocking': instance.lnaBlocking,
|
||||
'lnaBlockTrackers': instance.lnaBlockTrackers,
|
||||
'lnaEnabled': instance.lnaEnabled,
|
||||
'javascriptEnabled': instance.javascriptEnabled,
|
||||
'trackingProtectionPolicy':
|
||||
_$TrackingProtectionPolicyEnumMap[instance.trackingProtectionPolicy]!,
|
||||
@@ -639,6 +831,14 @@ Map<String, dynamic> _$EngineSettingsToJson(
|
||||
_$TrackingScopeEnumMap[instance.suspectedFingerprintersScope]!,
|
||||
'allowListBaseline': instance.allowListBaseline,
|
||||
'allowListConvenience': instance.allowListConvenience,
|
||||
'webFontsEnabled': instance.webFontsEnabled,
|
||||
'automaticFontSizeAdjustment': instance.automaticFontSizeAdjustment,
|
||||
'fontSizeFactor': instance.fontSizeFactor,
|
||||
'fontInflationEnabled': instance.fontInflationEnabled,
|
||||
'inputAutoZoomEnabled': instance.inputAutoZoomEnabled,
|
||||
'fissionEnabled': instance.fissionEnabled,
|
||||
'isolatedProcessEnabled': instance.isolatedProcessEnabled,
|
||||
'appZygoteProcessEnabled': instance.appZygoteProcessEnabled,
|
||||
'queryParameterStripping':
|
||||
_$QueryParameterStrippingEnumMap[instance.queryParameterStripping]!,
|
||||
'bounceTrackingProtectionMode':
|
||||
|
||||
@@ -168,6 +168,63 @@ class EngineSettingsRepository extends _$EngineSettingsRepository {
|
||||
DriftSqlType.bool,
|
||||
db.typeMapping,
|
||||
),
|
||||
// Web Content Settings
|
||||
'webFontsEnabled': settings['webFontsEnabled']?.readAs(
|
||||
DriftSqlType.bool,
|
||||
db.typeMapping,
|
||||
),
|
||||
'automaticFontSizeAdjustment': settings['automaticFontSizeAdjustment']
|
||||
?.readAs(DriftSqlType.bool, db.typeMapping),
|
||||
'fontSizeFactor': settings['fontSizeFactor']?.readAs(
|
||||
DriftSqlType.double,
|
||||
db.typeMapping,
|
||||
),
|
||||
'fontInflationEnabled': settings['fontInflationEnabled']?.readAs(
|
||||
DriftSqlType.bool,
|
||||
db.typeMapping,
|
||||
),
|
||||
'displayDensityOverride': settings['displayDensityOverride']?.readAs(
|
||||
DriftSqlType.double,
|
||||
db.typeMapping,
|
||||
),
|
||||
'screenWidthOverride': settings['screenWidthOverride']?.readAs(
|
||||
DriftSqlType.int,
|
||||
db.typeMapping,
|
||||
),
|
||||
'screenHeightOverride': settings['screenHeightOverride']?.readAs(
|
||||
DriftSqlType.int,
|
||||
db.typeMapping,
|
||||
),
|
||||
'inputAutoZoomEnabled': settings['inputAutoZoomEnabled']?.readAs(
|
||||
DriftSqlType.bool,
|
||||
db.typeMapping,
|
||||
),
|
||||
// Process Isolation Settings
|
||||
'fissionEnabled': settings['fissionEnabled']?.readAs(
|
||||
DriftSqlType.bool,
|
||||
db.typeMapping,
|
||||
),
|
||||
'isolatedProcessEnabled': settings['isolatedProcessEnabled']?.readAs(
|
||||
DriftSqlType.bool,
|
||||
db.typeMapping,
|
||||
),
|
||||
'appZygoteProcessEnabled': settings['appZygoteProcessEnabled']?.readAs(
|
||||
DriftSqlType.bool,
|
||||
db.typeMapping,
|
||||
),
|
||||
// LNA Settings
|
||||
'lnaBlocking': settings['lnaBlocking']?.readAs(
|
||||
DriftSqlType.bool,
|
||||
db.typeMapping,
|
||||
),
|
||||
'lnaBlockTrackers': settings['lnaBlockTrackers']?.readAs(
|
||||
DriftSqlType.bool,
|
||||
db.typeMapping,
|
||||
),
|
||||
'lnaEnabled': settings['lnaEnabled']?.readAs(
|
||||
DriftSqlType.bool,
|
||||
db.typeMapping,
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -182,6 +182,7 @@ class _MainWidget extends HookConsumerWidget {
|
||||
engineSettings.addonCollection,
|
||||
generalSettings.syncServerOverride,
|
||||
generalSettings.syncTokenServerOverride,
|
||||
engineSettings,
|
||||
);
|
||||
} on PlatformException catch (e, s) {
|
||||
logger.e(
|
||||
|
||||
Reference in New Issue
Block a user