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(
|
||||
|
||||
+14
-1
@@ -77,12 +77,25 @@ object EngineProvider {
|
||||
// About config it's no longer enabled by default
|
||||
builder.aboutConfigEnabled(true)
|
||||
builder.extensionsProcessEnabled(true)
|
||||
builder.extensionsWebAPIEnabled(true)
|
||||
builder.extensionsWebAPIEnabled(false)
|
||||
//builder.debugLogging(components.logLevel == Log.Priority.DEBUG)
|
||||
builder.consoleOutput(components.logLevel == Log.Priority.DEBUG)
|
||||
builder.contentBlocking(contentBlocking.build())
|
||||
builder.locales(arrayOf("en-US", "en")) // Will be overridden later
|
||||
|
||||
// Apply builder-only settings from startup config
|
||||
GlobalComponents.startupSettings?.let { settings ->
|
||||
settings.fissionEnabled?.let { builder.fissionEnabled(it) }
|
||||
settings.isolatedProcessEnabled?.let { builder.isolatedProcessEnabled(it) }
|
||||
settings.appZygoteProcessEnabled?.let { builder.appZygoteProcessEnabled(it) }
|
||||
settings.displayDensityOverride?.let { builder.displayDensityOverride(it.toFloat()) }
|
||||
val screenWidth = settings.screenWidthOverride
|
||||
val screenHeight = settings.screenHeightOverride
|
||||
if (screenWidth != null && screenHeight != null && screenWidth > 0 && screenHeight > 0) {
|
||||
builder.screenSizeOverride(screenWidth.toInt(), screenHeight.toInt())
|
||||
}
|
||||
}
|
||||
|
||||
runtime = GeckoRuntime.create(context, builder.build())
|
||||
}
|
||||
|
||||
|
||||
+4
@@ -12,6 +12,7 @@ import eu.weblibre.flutter_mozilla_components.pigeons.BrowserExtensionEvents
|
||||
import eu.weblibre.flutter_mozilla_components.pigeons.BounceTrackingProtectionMode
|
||||
import eu.weblibre.flutter_mozilla_components.pigeons.ContentBlocking
|
||||
import eu.weblibre.flutter_mozilla_components.pigeons.GeckoAddonEvents
|
||||
import eu.weblibre.flutter_mozilla_components.pigeons.GeckoEngineSettings
|
||||
import eu.weblibre.flutter_mozilla_components.pigeons.GeckoSelectionActionEvents
|
||||
import eu.weblibre.flutter_mozilla_components.pigeons.GeckoStateEvents
|
||||
import eu.weblibre.flutter_mozilla_components.pigeons.GeckoSuggestionEvents
|
||||
@@ -77,6 +78,9 @@ object GlobalComponents {
|
||||
// External download manager setting
|
||||
var useExternalDownloadManager: Boolean = false
|
||||
|
||||
// Startup settings for builder-only GeckoRuntimeSettings (fission, process isolation, etc.)
|
||||
var startupSettings: GeckoEngineSettings? = null
|
||||
|
||||
fun shouldOpenLinksInApp(isExternalSession: Boolean = false): Boolean {
|
||||
return when (engineSettingsApi!!.getAppLinksMode()) {
|
||||
eu.weblibre.flutter_mozilla_components.pigeons.AppLinksMode.ALWAYS -> true
|
||||
|
||||
+5
@@ -21,6 +21,7 @@ import eu.weblibre.flutter_mozilla_components.pigeons.AddonCollection
|
||||
import eu.weblibre.flutter_mozilla_components.pigeons.BrowserExtensionEvents
|
||||
import eu.weblibre.flutter_mozilla_components.pigeons.ContentBlocking
|
||||
import eu.weblibre.flutter_mozilla_components.pigeons.GeckoAddonEvents
|
||||
import eu.weblibre.flutter_mozilla_components.pigeons.GeckoEngineSettings
|
||||
import eu.weblibre.flutter_mozilla_components.pigeons.GeckoAddonsApi
|
||||
import eu.weblibre.flutter_mozilla_components.pigeons.GeckoAppLinksApi
|
||||
import eu.weblibre.flutter_mozilla_components.pigeons.GeckoBookmarksApi
|
||||
@@ -165,6 +166,7 @@ class GeckoBrowserApiImpl : GeckoBrowserApi {
|
||||
addonCollection: AddonCollection?,
|
||||
fxaServerOverride: String?,
|
||||
syncTokenServerOverride: String?,
|
||||
startupSettings: GeckoEngineSettings?,
|
||||
) {
|
||||
synchronized(this) {
|
||||
if (!isGeckoInitialized) {
|
||||
@@ -179,6 +181,9 @@ class GeckoBrowserApiImpl : GeckoBrowserApi {
|
||||
|
||||
Log.addSink(PriorityAwareLogSink(level, geckoLogging))
|
||||
|
||||
// Store startup settings before runtime creation
|
||||
GlobalComponents.startupSettings = startupSettings
|
||||
|
||||
setupGeckoEngine(
|
||||
profileFolder,
|
||||
level,
|
||||
|
||||
+58
@@ -242,6 +242,34 @@ class GeckoEngineSettingsApiImpl : GeckoEngineSettingsApi {
|
||||
// components.core.engineSettings.automaticLanguageAdjustment = false
|
||||
components.core.runtime.settings.locales = settings.locales.toTypedArray()
|
||||
}
|
||||
|
||||
// Web Content Settings
|
||||
if(settings.webFontsEnabled != null) {
|
||||
components.core.engineSettings.webFontsEnabled = settings.webFontsEnabled
|
||||
}
|
||||
if(settings.automaticFontSizeAdjustment != null) {
|
||||
components.core.engineSettings.automaticFontSizeAdjustment = settings.automaticFontSizeAdjustment
|
||||
}
|
||||
if(settings.fontSizeFactor != null && settings.automaticFontSizeAdjustment != true) {
|
||||
components.core.engineSettings.fontSizeFactor = settings.fontSizeFactor.toFloat()
|
||||
}
|
||||
if(settings.fontInflationEnabled != null && settings.automaticFontSizeAdjustment != true) {
|
||||
components.core.engineSettings.fontInflationEnabled = settings.fontInflationEnabled
|
||||
}
|
||||
if(settings.inputAutoZoomEnabled != null) {
|
||||
components.core.runtime.settings.inputAutoZoomEnabled = settings.inputAutoZoomEnabled
|
||||
}
|
||||
|
||||
// LNA Settings
|
||||
if(settings.lnaBlocking != null) {
|
||||
components.core.engineSettings.lnaBlockingEnabled = settings.lnaBlocking
|
||||
}
|
||||
if(settings.lnaBlockTrackers != null) {
|
||||
components.core.engineSettings.lnaTrackerBlockingEnabled = settings.lnaBlockTrackers
|
||||
}
|
||||
if(settings.lnaEnabled != null) {
|
||||
components.core.engineSettings.lnaFeatureEnabled = settings.lnaEnabled
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateRuntimeSettings(settings: GeckoEngineSettings) {
|
||||
@@ -313,6 +341,36 @@ class GeckoEngineSettingsApiImpl : GeckoEngineSettingsApi {
|
||||
components.core.engine.settings.fingerprintingProtectionOverrides = components.core.engineSettings.fingerprintingProtectionOverrides
|
||||
}
|
||||
|
||||
// Web Content runtime settings
|
||||
if(settings.webFontsEnabled != null) {
|
||||
components.core.engine.settings.webFontsEnabled = components.core.engineSettings.webFontsEnabled
|
||||
reloadSession = true
|
||||
}
|
||||
if(settings.automaticFontSizeAdjustment != null) {
|
||||
components.core.engine.settings.automaticFontSizeAdjustment = components.core.engineSettings.automaticFontSizeAdjustment
|
||||
}
|
||||
if(settings.fontSizeFactor != null) {
|
||||
components.core.engine.settings.fontSizeFactor = components.core.engineSettings.fontSizeFactor
|
||||
reloadSession = true
|
||||
}
|
||||
if(settings.fontInflationEnabled != null) {
|
||||
components.core.engine.settings.fontInflationEnabled = components.core.engineSettings.fontInflationEnabled
|
||||
reloadSession = true
|
||||
}
|
||||
// LNA settings
|
||||
if(settings.lnaEnabled != null) {
|
||||
components.core.engine.settings.lnaFeatureEnabled = components.core.engineSettings.lnaFeatureEnabled
|
||||
reloadSession = true
|
||||
}
|
||||
if(settings.lnaBlocking != null) {
|
||||
components.core.engine.settings.lnaBlockingEnabled = components.core.engineSettings.lnaBlockingEnabled
|
||||
reloadSession = true
|
||||
}
|
||||
if(settings.lnaBlockTrackers != null) {
|
||||
components.core.engine.settings.lnaTrackerBlockingEnabled = components.core.engineSettings.lnaTrackerBlockingEnabled
|
||||
reloadSession = true
|
||||
}
|
||||
|
||||
if(reloadSession) {
|
||||
components.useCases.sessionUseCases.reload()
|
||||
}
|
||||
|
||||
+47
-4
@@ -2291,7 +2291,21 @@ data class GeckoEngineSettings (
|
||||
/** Allow baseline tracking protection exceptions (prevents major site breakage) */
|
||||
val allowListBaseline: Boolean? = null,
|
||||
/** Allow convenience tracking protection exceptions (fixes minor issues) */
|
||||
val allowListConvenience: Boolean? = null
|
||||
val allowListConvenience: Boolean? = null,
|
||||
val webFontsEnabled: Boolean? = null,
|
||||
val automaticFontSizeAdjustment: Boolean? = null,
|
||||
val fontSizeFactor: Double? = null,
|
||||
val fontInflationEnabled: Boolean? = null,
|
||||
val displayDensityOverride: Double? = null,
|
||||
val screenWidthOverride: Long? = null,
|
||||
val screenHeightOverride: Long? = null,
|
||||
val inputAutoZoomEnabled: Boolean? = null,
|
||||
val fissionEnabled: Boolean? = null,
|
||||
val isolatedProcessEnabled: Boolean? = null,
|
||||
val appZygoteProcessEnabled: Boolean? = null,
|
||||
val lnaBlocking: Boolean? = null,
|
||||
val lnaBlockTrackers: Boolean? = null,
|
||||
val lnaEnabled: Boolean? = null
|
||||
)
|
||||
{
|
||||
companion object {
|
||||
@@ -2323,7 +2337,21 @@ data class GeckoEngineSettings (
|
||||
val suspectedFingerprintersScope = pigeonVar_list[24] as TrackingScope?
|
||||
val allowListBaseline = pigeonVar_list[25] as Boolean?
|
||||
val allowListConvenience = pigeonVar_list[26] 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)
|
||||
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 lnaBlocking = pigeonVar_list[38] as Boolean?
|
||||
val lnaBlockTrackers = pigeonVar_list[39] as Boolean?
|
||||
val lnaEnabled = pigeonVar_list[40] 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, lnaBlocking, lnaBlockTrackers, lnaEnabled)
|
||||
}
|
||||
}
|
||||
fun toList(): List<Any?> {
|
||||
@@ -2355,6 +2383,20 @@ data class GeckoEngineSettings (
|
||||
suspectedFingerprintersScope,
|
||||
allowListBaseline,
|
||||
allowListConvenience,
|
||||
webFontsEnabled,
|
||||
automaticFontSizeAdjustment,
|
||||
fontSizeFactor,
|
||||
fontInflationEnabled,
|
||||
displayDensityOverride,
|
||||
screenWidthOverride,
|
||||
screenHeightOverride,
|
||||
inputAutoZoomEnabled,
|
||||
fissionEnabled,
|
||||
isolatedProcessEnabled,
|
||||
appZygoteProcessEnabled,
|
||||
lnaBlocking,
|
||||
lnaBlockTrackers,
|
||||
lnaEnabled,
|
||||
)
|
||||
}
|
||||
override fun equals(other: Any?): Boolean {
|
||||
@@ -4793,7 +4835,7 @@ private open class GeckoPigeonCodec : StandardMessageCodec() {
|
||||
/** Generated interface from Pigeon that represents a handler of messages from Flutter. */
|
||||
interface GeckoBrowserApi {
|
||||
fun getGeckoVersion(): String
|
||||
fun initialize(profileFolder: String, logLevel: LogLevel, contentBlocking: ContentBlocking, addonCollection: AddonCollection?, fxaServerOverride: String?, syncTokenServerOverride: String?)
|
||||
fun initialize(profileFolder: String, logLevel: LogLevel, contentBlocking: ContentBlocking, addonCollection: AddonCollection?, fxaServerOverride: String?, syncTokenServerOverride: String?, startupSettings: GeckoEngineSettings?)
|
||||
fun showNativeFragment(): Boolean
|
||||
fun onTrimMemory(level: Long)
|
||||
fun openInCustomTab(url: String, private: Boolean, contextId: String?)
|
||||
@@ -4833,8 +4875,9 @@ interface GeckoBrowserApi {
|
||||
val addonCollectionArg = args[3] as AddonCollection?
|
||||
val fxaServerOverrideArg = args[4] as String?
|
||||
val syncTokenServerOverrideArg = args[5] as String?
|
||||
val startupSettingsArg = args[6] as GeckoEngineSettings?
|
||||
val wrapped: List<Any?> = try {
|
||||
api.initialize(profileFolderArg, logLevelArg, contentBlockingArg, addonCollectionArg, fxaServerOverrideArg, syncTokenServerOverrideArg)
|
||||
api.initialize(profileFolderArg, logLevelArg, contentBlockingArg, addonCollectionArg, fxaServerOverrideArg, syncTokenServerOverrideArg, startupSettingsArg)
|
||||
listOf(null)
|
||||
} catch (exception: Throwable) {
|
||||
GeckoPigeonUtils.wrapError(exception)
|
||||
|
||||
@@ -23,8 +23,9 @@ class GeckoBrowserService {
|
||||
ContentBlocking contentBlocking,
|
||||
AddonCollection? addonCollection,
|
||||
String? fxaServerOverride,
|
||||
String? syncTokenServerOverride,
|
||||
) {
|
||||
String? syncTokenServerOverride, [
|
||||
GeckoEngineSettings? startupSettings,
|
||||
]) {
|
||||
return _api.initialize(
|
||||
profileFolder,
|
||||
logLevel,
|
||||
@@ -32,6 +33,7 @@ class GeckoBrowserService {
|
||||
addonCollection,
|
||||
fxaServerOverride,
|
||||
syncTokenServerOverride,
|
||||
startupSettings,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+50
@@ -135,6 +135,56 @@ class GeckoEngineSettingsService {
|
||||
);
|
||||
}
|
||||
|
||||
// Web Content Settings
|
||||
Future<void> webFontsEnabled(bool state) {
|
||||
return _api.updateRuntimeSettings(
|
||||
GeckoEngineSettings(webFontsEnabled: state),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> automaticFontSizeAdjustment(bool state) {
|
||||
return _api.updateRuntimeSettings(
|
||||
GeckoEngineSettings(automaticFontSizeAdjustment: state),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> fontSizeFactor(double state) {
|
||||
return _api.updateRuntimeSettings(
|
||||
GeckoEngineSettings(fontSizeFactor: state),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> fontInflationEnabled(bool state) {
|
||||
return _api.updateRuntimeSettings(
|
||||
GeckoEngineSettings(fontInflationEnabled: state),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> inputAutoZoomEnabled(bool state) {
|
||||
return _api.updateRuntimeSettings(
|
||||
GeckoEngineSettings(inputAutoZoomEnabled: state),
|
||||
);
|
||||
}
|
||||
|
||||
// LNA Settings
|
||||
Future<void> lnaBlocking(bool? state) {
|
||||
return _api.updateRuntimeSettings(
|
||||
GeckoEngineSettings(lnaBlocking: state),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> lnaBlockTrackers(bool? state) {
|
||||
return _api.updateRuntimeSettings(
|
||||
GeckoEngineSettings(lnaBlockTrackers: state),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> lnaEnabled(bool? state) {
|
||||
return _api.updateRuntimeSettings(
|
||||
GeckoEngineSettings(lnaEnabled: state),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> setPullToRefreshEnabled(bool enabled) {
|
||||
return _api.setPullToRefreshEnabled(enabled);
|
||||
}
|
||||
|
||||
@@ -2710,6 +2710,20 @@ class GeckoEngineSettings {
|
||||
this.suspectedFingerprintersScope,
|
||||
this.allowListBaseline,
|
||||
this.allowListConvenience,
|
||||
this.webFontsEnabled,
|
||||
this.automaticFontSizeAdjustment,
|
||||
this.fontSizeFactor,
|
||||
this.fontInflationEnabled,
|
||||
this.displayDensityOverride,
|
||||
this.screenWidthOverride,
|
||||
this.screenHeightOverride,
|
||||
this.inputAutoZoomEnabled,
|
||||
this.fissionEnabled,
|
||||
this.isolatedProcessEnabled,
|
||||
this.appZygoteProcessEnabled,
|
||||
this.lnaBlocking,
|
||||
this.lnaBlockTrackers,
|
||||
this.lnaEnabled,
|
||||
});
|
||||
|
||||
bool? javascriptEnabled;
|
||||
@@ -2778,6 +2792,34 @@ class GeckoEngineSettings {
|
||||
/// Allow convenience tracking protection exceptions (fixes minor issues)
|
||||
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;
|
||||
|
||||
List<Object?> _toList() {
|
||||
return <Object?>[
|
||||
javascriptEnabled,
|
||||
@@ -2807,6 +2849,20 @@ class GeckoEngineSettings {
|
||||
suspectedFingerprintersScope,
|
||||
allowListBaseline,
|
||||
allowListConvenience,
|
||||
webFontsEnabled,
|
||||
automaticFontSizeAdjustment,
|
||||
fontSizeFactor,
|
||||
fontInflationEnabled,
|
||||
displayDensityOverride,
|
||||
screenWidthOverride,
|
||||
screenHeightOverride,
|
||||
inputAutoZoomEnabled,
|
||||
fissionEnabled,
|
||||
isolatedProcessEnabled,
|
||||
appZygoteProcessEnabled,
|
||||
lnaBlocking,
|
||||
lnaBlockTrackers,
|
||||
lnaEnabled,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -2843,6 +2899,20 @@ class GeckoEngineSettings {
|
||||
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?,
|
||||
lnaBlocking: result[38] as bool?,
|
||||
lnaBlockTrackers: result[39] as bool?,
|
||||
lnaEnabled: result[40] as bool?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5584,14 +5654,14 @@ class GeckoBrowserApi {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> initialize(String profileFolder, LogLevel logLevel, ContentBlocking contentBlocking, AddonCollection? addonCollection, String? fxaServerOverride, String? syncTokenServerOverride) async {
|
||||
Future<void> initialize(String profileFolder, LogLevel logLevel, ContentBlocking contentBlocking, AddonCollection? addonCollection, String? fxaServerOverride, String? syncTokenServerOverride, GeckoEngineSettings? startupSettings) async {
|
||||
final pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoBrowserApi.initialize$pigeonVar_messageChannelSuffix';
|
||||
final pigeonVar_channel = BasicMessageChannel<Object?>(
|
||||
pigeonVar_channelName,
|
||||
pigeonChannelCodec,
|
||||
binaryMessenger: pigeonVar_binaryMessenger,
|
||||
);
|
||||
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[profileFolder, logLevel, contentBlocking, addonCollection, fxaServerOverride, syncTokenServerOverride]);
|
||||
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[profileFolder, logLevel, contentBlocking, addonCollection, fxaServerOverride, syncTokenServerOverride, startupSettings]);
|
||||
final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
|
||||
if (pigeonVar_replyList == null) {
|
||||
throw _createConnectionError(pigeonVar_channelName);
|
||||
|
||||
@@ -878,6 +878,26 @@ class GeckoEngineSettings {
|
||||
/// Allow convenience tracking protection exceptions (fixes minor issues)
|
||||
final bool? allowListConvenience;
|
||||
|
||||
// Web Content Settings
|
||||
final bool? webFontsEnabled;
|
||||
final bool? automaticFontSizeAdjustment;
|
||||
final double? fontSizeFactor;
|
||||
final bool? fontInflationEnabled;
|
||||
final double? displayDensityOverride;
|
||||
final int? screenWidthOverride;
|
||||
final int? screenHeightOverride;
|
||||
final bool? inputAutoZoomEnabled;
|
||||
|
||||
// Process Isolation Settings (require app restart)
|
||||
final bool? fissionEnabled;
|
||||
final bool? isolatedProcessEnabled;
|
||||
final bool? appZygoteProcessEnabled;
|
||||
|
||||
// Local Network Access (LNA) Settings
|
||||
final bool? lnaBlocking;
|
||||
final bool? lnaBlockTrackers;
|
||||
final bool? lnaEnabled;
|
||||
|
||||
GeckoEngineSettings(
|
||||
this.javascriptEnabled,
|
||||
this.trackingProtectionPolicy,
|
||||
@@ -906,6 +926,20 @@ class GeckoEngineSettings {
|
||||
this.suspectedFingerprintersScope,
|
||||
this.allowListBaseline,
|
||||
this.allowListConvenience,
|
||||
this.webFontsEnabled,
|
||||
this.automaticFontSizeAdjustment,
|
||||
this.fontSizeFactor,
|
||||
this.fontInflationEnabled,
|
||||
this.displayDensityOverride,
|
||||
this.screenWidthOverride,
|
||||
this.screenHeightOverride,
|
||||
this.inputAutoZoomEnabled,
|
||||
this.fissionEnabled,
|
||||
this.isolatedProcessEnabled,
|
||||
this.appZygoteProcessEnabled,
|
||||
this.lnaBlocking,
|
||||
this.lnaBlockTrackers,
|
||||
this.lnaEnabled,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1103,6 +1137,7 @@ abstract class GeckoBrowserApi {
|
||||
AddonCollection? addonCollection,
|
||||
String? fxaServerOverride,
|
||||
String? syncTokenServerOverride,
|
||||
GeckoEngineSettings? startupSettings,
|
||||
);
|
||||
bool showNativeFragment();
|
||||
void onTrimMemory(int level);
|
||||
|
||||
Reference in New Issue
Block a user