t: new o: /modules/libpref/init/StaticPrefList.yaml +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +# This file defines static prefs, i.e. those that are defined at startup and +# used entirely or mostly from C++ and/or Rust code. +# +# The file is separated into sections, where each section contains a group of +# prefs that all share the same first segment of their name -- all the "gfx.*" +# prefs are together, all the "network.*" prefs are together, etc. Sections +# must be kept in alphabetical order, but prefs within sections need not be. +# +# Basics +# ------ +# Any pref defined in one of the files included here should *not* be defined +# in a data file such as all.js; that would just be useless duplication. +# +# (Except under unusual circumstances where the value defined here must be +# overridden, e.g. for some Thunderbird prefs. In those cases the default +# value from the data file will override the static default value defined +# here.) +# +# Please follow the existing prefs naming convention when considering adding a +# new pref, and don't create a new pref group unless it's appropriate and there +# are likely to be multiple prefs within that group. (If you do, you'll need to +# update the `pref_groups` variable in modules/libpref/moz.build.) +# +# Definitions +# ----------- +# A pref definition looks like this: +# +# - name: # mandatory +# type: # mandatory +# value: # mandatory +# mirror: # mandatory +# do_not_use_directly: # optional +# include: # optional +# rust: # optional +# set_spidermonkey_pref: # optional +# +# - `name` is the name of the pref, without double-quotes, as it appears +# in about:config. It is used in most libpref API functions (from both C++ +# and JS code). +# +# - `type` is one of `bool`, `int32_t`, `uint32_t`, `float`, an atomic version +# of one of those, `String` or `DataMutexString`. Note that float prefs are +# stored internally as strings. The C++ preprocessor doesn't like template +# syntax in a macro argument, so use the typedefs defined in +# StaticPrefsBase.h; for example, use `RelaxedAtomicBool` instead of +# `Atomic`. +# +# - `value` is the default value. Its type should be appropriate for +# , otherwise the generated code will fail to compile. A complex +# C++ numeric expressions like `60 * 60` (which the YAML parser cannot treat +# as an integer or float) is treated as a string and passed through without +# change, which is useful. +# +# - `mirror` indicates how the pref value is mirrored into a C++ variable. +# +# * `never`: There is no C++ mirror variable. The pref value can only be +# accessed via the standard libpref API functions. +# +# * `once`: The pref value is mirrored into a variable at startup; the +# mirror variable is left unchanged after that. (The exact point at which +# all `once` mirror variables are set is when the first `once` mirror +# variable is accessed, via its getter function.) This is mostly useful for +# graphics prefs where we often don't want a new pref value to apply until +# restart. Otherwise, this update policy is best avoided because its +# behaviour can cause confusion and bugs. +# +# * `always`: The mirror variable is always kept in sync with the pref value. +# This is the most common choice. +# +# When a mirror variable is present, a getter will be created that can access +# it. Using the getter function to read the pref's value has the two +# following advantages over the normal API functions. +# +# * A direct variable access is faster than a hash table lookup. +# +# * A mirror variable can be accessed off the main thread. If a pref *is* +# accessed off the main thread, it should have an atomic type. Assertions +# enforce this. +# +# Note that Rust code must access the mirror variable directly, rather than +# via the getter function. +# +# - `do_not_use_directly` indicates if `_DoNotUseDirectly` should be appended to +# the name of the getter function. This is simply a naming convention +# indicating that there is some other wrapper getter function that should be +# used in preference to the normal static pref getter. Defaults to `false` if +# not present. Cannot be used with a `never` mirror value, because there is +# no getter function in that case. +# +# - `include` names a header file that must be included for the pref value to +# compile correctly, e.g. because it refers to a code constant. System +# headers should be surrounded with angle brackets, e.g. ``. +# +# - `rust` indicates if the mirror variable is used by Rust code. If so, it +# will be usable via the `static_prefs::pref!` macro, e.g. +# `static_prefs::pref!("layout.css.cross-fade.enabled")`. +# +# - `set_spidermonkey_pref` indicates whether SpiderMonkey boilerplate code +# should be generated for this pref. If this is set to 'startup', the +# pref on the SpiderMonkey side is only set during process startup. If set to +# 'always', the SpiderMonkey pref value is also updated when this pref is +# changed at runtime. +# This option is only valid for javascript.options.* prefs. +# +# The getter function's base name is the same as the pref's name, but with +# '.' or '-' chars converted to '_', to make a valid identifier. For example, +# the getter for `foo.bar_baz` is `foo_bar_baz()`. This is ugly but clear, +# and you can search for both the pref name and the getter using the regexp +# /foo.bar.baz/. Suffixes are added as follows: +# +# - If the `mirror` value is `once`, `_AtStartup` is appended, to indicate the +# value was obtained at startup. +# +# - If the `do_not_use_directly` value is true, `_DoNotUseDirectly` is +# appended. +# +# Preprocessor +# ------------ +# Note finally that this file is preprocessed by preprocessor.py, not the C++ +# preprocessor. As a result, the following things may be surprising. +# +# - YAML comments start with a '#', so putting a comment on the same line as a +# preprocessor directive is dubious. E.g. avoid lines like `#define X 3 # +# three` because the ` # three` will be part of `X`. +# +# - '@' use is required for substitutions to occur. E.g. with `#define FOO 1`, +# `FOO` won't be replaced with `1` unless it has '@' chars around it. +# +# - Spaces aren't permitted between the leading '#' and the name of a +# directive, e.g. `#ifdef XYZ` works but `# ifdef XYZ` does not. +# +# Please indent all prefs defined within #ifdef/#ifndef conditions. This +# improves readability, particular for conditional blocks that exceed a single +# screen. But note that the leading '-' in a definition must remain in the +# first column for it to be valid YAML. + +#ifdef RELEASE_OR_BETA +#define IS_NOT_RELEASE_OR_BETA false +#else +#define IS_NOT_RELEASE_OR_BETA true +#endif + +#ifdef NIGHTLY_BUILD +#define IS_NIGHTLY_BUILD true +#define IS_NOT_NIGHTLY_BUILD false +#else +#define IS_NIGHTLY_BUILD false +#define IS_NOT_NIGHTLY_BUILD true +#endif + +#if defined(NIGHTLY_BUILD) || defined(MOZ_DEV_EDITION) +#define IS_NIGHTLY_OR_DEV_EDITION true +#else +#define IS_NIGHTLY_OR_DEV_EDITION false +#endif + +#ifdef MOZILLA_OFFICIAL +#define IS_NOT_MOZILLA_OFFICIAL false +#else +#define IS_NOT_MOZILLA_OFFICIAL true +#endif + +#ifdef EARLY_BETA_OR_EARLIER +#define IS_EARLY_BETA_OR_EARLIER true +#define IS_NOT_EARLY_BETA_OR_EARLIER false +#else +#define IS_EARLY_BETA_OR_EARLIER false +#define IS_NOT_EARLY_BETA_OR_EARLIER true +#endif + +#if defined(MOZ_DEV_EDITION) || defined(EARLY_BETA_OR_EARLIER) +#define IS_DEV_EDITION_OR_EARLY_BETA_OR_EARLIER true +#else +#define IS_DEV_EDITION_OR_EARLY_BETA_OR_EARLIER false +#endif + +#ifdef ANDROID +#define IS_ANDROID true +#define IS_NOT_ANDROID false +#else +#define IS_ANDROID false +#define IS_NOT_ANDROID true +#endif + +#ifdef XP_WIN +#define IS_XP_WIN true +#define IS_NOT_XP_WIN false +#else +#define IS_XP_WIN false +#define IS_NOT_XP_WIN true +#endif + +#ifdef XP_MACOSX +#define IS_XP_MACOSX true +#define IS_NOT_XP_MACOSX false +#else +#define IS_XP_MACOSX false +#define IS_NOT_XP_MACOSX true +#endif + +#--------------------------------------------------------------------------- +# Prefs starting with "accessibility." +#--------------------------------------------------------------------------- + +# Tab focus model bit field: +# 1 focuses text controls, 2 focuses other form elements, 4 adds links. +# Most users will want 1, 3, or 7. On macOS we expose a checkbox to alter +# between 7 and 3. +- name: accessibility.tabfocus + type: int32_t + value: 7 + mirror: always + +# Only on mac tabfocus is expected to handle UI widgets as well as web content. +# FIXME(emilio): This is weird now that we have a lot of HTML in our pages. +- name: accessibility.tabfocus_applies_to_xul + type: bool + value: @IS_XP_MACOSX@ + mirror: always + +- name: accessibility.accesskeycausesactivation + type: bool + value: true + mirror: always + +- name: accessibility.monoaudio.enable + type: RelaxedAtomicBool + value: false + mirror: always + +- name: accessibility.browsewithcaret + type: RelaxedAtomicBool + value: false + mirror: always + +- name: accessibility.AOM.enabled + type: bool + value: false + mirror: always + +- name: accessibility.ARIAElementReflection.enabled + type: bool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +# Whether to enable all accessibility cache domains on startup. +# * false: enable domains as needed +# * true: enable all domains regardless of need (cache everything) +- name: accessibility.enable_all_cache_domains + type: bool + value: false + mirror: once + +# Whether form controls and images should be focusable with mouse, in content +# documents. +# +# This matches historical macOS / Safari behavior. +# +# * 0: never +# * 1: always +# * 2: on content documents +- name: accessibility.mouse_focuses_formcontrol + type: int32_t +#ifdef XP_MACOSX + value: 2 +#else + value: 1 +#endif + mirror: always + +# Whether to enable support for the UI Automation API on Windows. +- name: accessibility.uia.enable + type: bool + value: false + mirror: always + +# Whether to avoid accessibility activation on Windows shortly after clipboard +# copy. +# +# Possible values are: +# * 0: never +# * 1: always +# * 2 (or others): when needed +- name: accessibility.windows.suppress-after-clipboard-copy + type: uint32_t + value: 2 + mirror: always + +# Whether to avoid accessibility activation on Windows shortly after max button +# hit-test for the "snap layout" feature. +# +# Possible values are: +# * 0: never +# * 1: always +# * 2 (or others): when needed +- name: accessibility.windows.suppress-for-snap-layout + type: uint32_t + value: 2 + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "alerts." +#--------------------------------------------------------------------------- + +# Whether to use platform-specific backends for showing desktop notifications. +# If no such backend is available, or if the pref is false, then XUL +# notifications are used. +- name: alerts.useSystemBackend + type: bool + value: true + mirror: always + +#if defined(XP_WIN) + # On Windows, a COM Surrogate notification server receives notification events + # and can relaunch the application after it has been closed. +- name: alerts.useSystemBackend.windows.notificationserver.enabled + type: bool + value: true + mirror: never +#endif + +#ifdef ANDROID + #--------------------------------------------------------------------------- + # Prefs starting with "android." + #--------------------------------------------------------------------------- + + # On Android, we want an opaque background to be visible under the page, + # so layout should not force a default background. +- name: android.widget_paints_background + type: RelaxedAtomicBool + value: true + mirror: always + +- name: android.touch_resampling.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +#endif + +#--------------------------------------------------------------------------- +# Prefs starting with "apz." +# The apz prefs are explained in AsyncPanZoomController.cpp +#--------------------------------------------------------------------------- + +# amount we zoom in for a double tap gesture if we couldn't find any content +# based rect to zoom to +- name: apz.doubletapzoom.defaultzoomin + type: AtomicFloat + value: 1.2f + mirror: always + +- name: apz.scrollbarbuttonrepeat.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# After a user has executed a pan gesture, we may receive momentum phase pan +# gestures from the OS. This specifies how long we should wait following the +# pan end gesture for possible momentum phase pan gestures before sending the +# TransformEnd notification. + +- name: apz.scrollend-event.content.delay_ms + type: RelaxedAtomicInt32 + value: 100 + mirror: always + +- name: apz.wr.activate_all_scroll_frames + type: RelaxedAtomicBool + value: false + mirror: always + +- name: apz.wr.activate_all_scroll_frames_when_fission + type: RelaxedAtomicBool + value: true + mirror: always + +- name: apz.prefer_jank_minimal_displayports + type: RelaxedAtomicBool + value: true + mirror: always + +- name: apz.allow_double_tap_zooming + type: RelaxedAtomicBool + value: true + mirror: always + +- name: apz.mac.enable_double_tap_zoom_touchpad_gesture + type: RelaxedAtomicBool + value: true + mirror: always + +- name: apz.allow_immediate_handoff + type: RelaxedAtomicBool + value: false + mirror: always + +- name: apz.allow_zooming + type: RelaxedAtomicBool + value: true + mirror: always + +- name: apz.max_zoom + type: AtomicFloat + value: 10.0f + mirror: always + +- name: apz.min_zoom + type: AtomicFloat + value: 0.25f + mirror: always + +- name: apz.allow_zooming_out + type: RelaxedAtomicBool + value: false + mirror: always + +- name: apz.android.chrome_fling_physics.friction + type: AtomicFloat + value: 0.015f + mirror: always + +- name: apz.android.chrome_fling_physics.inflexion + type: AtomicFloat + value: 0.35f + mirror: always + +- name: apz.android.chrome_fling_physics.stop_threshold + type: AtomicFloat + value: 0.1f + mirror: always + +- name: apz.autoscroll.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: apz.axis_lock.breakout_angle + type: AtomicFloat + value: float(M_PI / 8.0) # 22.5 degrees + mirror: always + include: + +- name: apz.axis_lock.breakout_threshold + type: AtomicFloat + value: 1.0f / 32.0f + mirror: always + +- name: apz.axis_lock.direct_pan_angle + type: AtomicFloat + value: float(M_PI / 3.0) # 60 degrees + mirror: always + include: + +- name: apz.axis_lock.lock_angle + type: AtomicFloat + value: float(M_PI / 6.0) # 30 degrees + mirror: always + include: + +# Whether to lock touch scrolling to one axis at a time. When a new +# axis lock mode is added, the APZCAxisLockCompatTester GTest shoud +# be updated to include the lock mode value. +# 0 = FREE (No locking at all) +# 1 = STANDARD (Once locked, remain locked until scrolling ends) +# 2 = STICKY (Allow lock to be broken, with hysteresis) +# 3 = DOMINANT_AXIS (Only allow movement on one axis at a time, only +# applies to touchpad scrolling) +- name: apz.axis_lock.mode + type: RelaxedAtomicInt32 +#if defined(XP_MACOSX) + value: 3 +#else + value: 2 +#endif + mirror: always + +- name: apz.content_response_timeout + type: RelaxedAtomicInt32 + value: 400 + mirror: always + +- name: apz.danger_zone_x + type: RelaxedAtomicInt32 + value: 50 + mirror: always + +- name: apz.danger_zone_y + type: RelaxedAtomicInt32 + value: 100 + mirror: always + +- name: apz.disable_for_scroll_linked_effects + type: RelaxedAtomicBool + value: false + mirror: always + +- name: apz.displayport_expiry_ms + type: RelaxedAtomicUint32 + value: 15000 + mirror: always + +- name: apz.drag.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: apz.drag.touch.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: apz.enlarge_displayport_when_clipped + type: RelaxedAtomicBool + value: @IS_ANDROID@ + mirror: always + +# Test only. +- name: apz.fixed-margin-override.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Test only. +- name: apz.fixed-margin-override.bottom + type: RelaxedAtomicInt32 + value: 0 + mirror: always + +# Test only. +- name: apz.fixed-margin-override.top + type: RelaxedAtomicInt32 + value: 0 + mirror: always + +- name: apz.fling_accel_base_mult + type: AtomicFloat + value: 1.0f + mirror: always + +- name: apz.fling_accel_supplemental_mult + type: AtomicFloat + value: 1.0f + mirror: always + +- name: apz.fling_accel_min_fling_velocity + type: AtomicFloat + value: 1.5f + mirror: always + +- name: apz.fling_accel_min_pan_velocity + type: AtomicFloat + value: 0.8f + mirror: always + +- name: apz.fling_accel_max_pause_interval_ms + type: RelaxedAtomicInt32 + value: 50 + mirror: always + +- name: apz.fling_curve_function_x1 + type: float + value: 0.0f + mirror: once + +- name: apz.fling_curve_function_x2 + type: float + value: 1.0f + mirror: once + +- name: apz.fling_curve_function_y1 + type: float + value: 0.0f + mirror: once + +- name: apz.fling_curve_function_y2 + type: float + value: 1.0f + mirror: once + +- name: apz.fling_curve_threshold_inches_per_ms + type: AtomicFloat + value: -1.0f + mirror: always + +- name: apz.fling_friction + type: AtomicFloat + value: 0.002f + mirror: always + +- name: apz.fling_min_velocity_threshold + type: AtomicFloat + value: 0.5f + mirror: always + +- name: apz.fling_stop_on_tap_threshold + type: AtomicFloat + value: 0.05f + mirror: always + +- name: apz.fling_stopped_threshold + type: AtomicFloat + value: 0.01f + mirror: always + +- name: apz.touch_acceleration_factor_x + type: float + value: 1.0f + mirror: always + +- name: apz.touch_acceleration_factor_y + type: float + value: 1.0f + mirror: always + +#ifdef MOZ_WIDGET_GTK +- name: apz.gtk.kinetic_scroll.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: apz.gtk.pangesture.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Mode to use when receiving pan gesture input. +# +# * 0: Auto mode (uses the default behavior, subject to change). +# * 1: Page mode: Uses gtk deltas as a percentage of the page size to scroll. This mode matches: +# +# https://gitlab.gnome.org/GNOME/gtk/blob/c734c7e9188b56f56c3a504abee05fa40c5475ac/gtk/gtkrange.c#L3063-3074 +# +# * 2: Pixel mode: Uses gtk deltas as a fixed pixel multiplier. This mode matches e.g. GNOME web. +# +# https://webkit-search.igalia.com/webkit/rev/215039ef09d6bfd6e088175bfe30788d95b9705d/Source/WebKit/Shared/gtk/WebEventFactory.cpp#265-296 +# (multiplied then by pixelsPerLineStep which in GNOME-web is 40). +- name: apz.gtk.pangesture.delta_mode + type: uint32_t + value: 0 + mirror: always + +- name: apz.gtk.pangesture.page_delta_mode_multiplier + type: float + value: 1.0f + mirror: always + +- name: apz.gtk.pangesture.pixel_delta_mode_multiplier + type: float + value: 40.0f + mirror: always + +- name: apz.gtk.touchpad_pinch.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: apz.gtk.touchpad_pinch.three_fingers.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +- name: apz.gtk.touchpad_hold.enabled + type: RelaxedAtomicBool + value: true + mirror: always +#endif + +- name: apz.keyboard.enabled + type: bool + value: @IS_NOT_ANDROID@ + mirror: once + +- name: apz.keyboard.passive-listeners + type: RelaxedAtomicBool + value: @IS_NOT_ANDROID@ + mirror: always + +- name: apz.max_tap_time + type: RelaxedAtomicInt32 + value: 300 + mirror: always + +- name: apz.max_velocity_inches_per_ms + type: AtomicFloat + value: -1.0f + mirror: always + +- name: apz.max_velocity_queue_size + type: uint32_t + value: 5 + mirror: once + +- name: apz.min_skate_speed + type: AtomicFloat + value: 1.0f + mirror: always + +- name: apz.minimap.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +- name: apz.one_touch_pinch.enabled + type: RelaxedAtomicBool + value: @IS_ANDROID@ + mirror: always + +- name: apz.overscroll.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# The "test async scroll offset" (used via reftest-async-scroll +# or nsIDOMWindowUtils.setAsyncScrollOffset()) can be used to +# trigger overscroll. Used for tests only. +- name: apz.overscroll.test_async_scroll_offset.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +- name: apz.overscroll.min_pan_distance_ratio + type: AtomicFloat + value: 1.0f + mirror: always + +- name: apz.overscroll.stop_distance_threshold + type: AtomicFloat + value: 5.0f + mirror: always + +- name: apz.overscroll.spring_stiffness + type: AtomicFloat + value: 200 + mirror: always + +- name: apz.overscroll.damping + type: AtomicFloat + value: 1.1 + mirror: always + +- name: apz.overscroll.max_velocity + type: AtomicFloat + value: 10 + mirror: always + +- name: apz.paint_skipping.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Fetch displayport updates early from the message queue. +- name: apz.pinch_lock.mode + type: RelaxedAtomicInt32 + value: 2 + mirror: always + +- name: apz.pinch_lock.scroll_lock_threshold + type: AtomicFloat + value: 1.0f / 16.0f # 1/16 inches + mirror: always + +- name: apz.pinch_lock.span_breakout_threshold + type: AtomicFloat + value: 1.0f / 32.0f # 1/32 inches + mirror: always + +- name: apz.pinch_lock.span_lock_threshold + type: AtomicFloat + value: 1.0f / 32.0f # 1/32 inches + mirror: always + +- name: apz.pinch_lock.buffer_max_age + type: int32_t + value: 80 # milliseconds + mirror: once + +- name: apz.popups.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: apz.popups_without_remote.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Whether to print the APZC tree for debugging. +- name: apz.printtree + type: RelaxedAtomicBool + value: false + mirror: always + +- name: apz.record_checkerboarding + type: RelaxedAtomicBool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +- name: apz.second_tap_tolerance + type: AtomicFloat + value: 0.5f + mirror: always + +# If this is true, APZ fully recalculates the scroll thumb size and +# position in the compositor. This leads to the size and position +# being more accurate in scenarios such as async zooming. +- name: apz.scrollthumb.recalc + type: RelaxedAtomicBool + value: true + mirror: always + +- name: apz.test.fails_with_native_injection + type: RelaxedAtomicBool + value: false + mirror: always + +- name: apz.test.logging_enabled + type: RelaxedAtomicBool + value: false + mirror: always + +- name: apz.touch_move_tolerance + type: AtomicFloat + value: 0.1f + mirror: always + +- name: apz.touch_scroll.buffer_max_age + type: int32_t + value: 200 # milliseconds + mirror: once + +- name: apz.touch_start_tolerance + type: AtomicFloat + value: 0.1f + mirror: always + +- name: apz.velocity_bias + type: AtomicFloat + value: 0.0f + mirror: always + +- name: apz.velocity_relevance_time_ms + type: RelaxedAtomicUint32 + value: 100 + mirror: always + +- name: apz.windows.force_disable_direct_manipulation + type: RelaxedAtomicBool + value: false + mirror: always + +- name: apz.windows.use_direct_manipulation + type: RelaxedAtomicBool + value: true + mirror: always + +- name: apz.windows.check_for_pan_gesture_conversion + type: RelaxedAtomicBool + value: true + mirror: always + +- name: apz.x_skate_highmem_adjust + type: AtomicFloat + value: 0.0f + mirror: always + +- name: apz.x_skate_size_multiplier + type: AtomicFloat + value: 1.25f + mirror: always + +- name: apz.x_stationary_size_multiplier + type: AtomicFloat + value: 1.5f + mirror: always + +- name: apz.y_skate_highmem_adjust + type: AtomicFloat + value: 0.0f + mirror: always + +- name: apz.y_skate_size_multiplier + type: AtomicFloat +#if defined(MOZ_WIDGET_ANDROID) + value: 1.5f +#else + value: 3.5f +#endif + mirror: always + +- name: apz.y_stationary_size_multiplier + type: AtomicFloat +#if defined(MOZ_WIDGET_ANDROID) + value: 1.5f +#else + value: 3.5f +#endif + mirror: always + +- name: apz.zoom_animation_duration_ms + type: RelaxedAtomicInt32 +#if defined(MOZ_WIDGET_ANDROID) + value: 250 +#else + value: 350 +#endif + mirror: always + +- name: apz.scale_repaint_delay_ms + type: RelaxedAtomicInt32 + value: 500 + mirror: always + +# Whether to use rounded external scroll offsets. +- name: apz.rounded_external_scroll_offset + type: bool + value: false + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "beacon." +#--------------------------------------------------------------------------- + +# Is support for Navigator.sendBeacon enabled? +- name: beacon.enabled + type: bool + value: true + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "bidi." +#--------------------------------------------------------------------------- + +# Whether delete and backspace should immediately delete characters not +# visually adjacent to the caret, or adjust the visual position of the caret +# on the first keypress and delete the character on a second keypress +- name: bidi.edit.delete_immediately + type: bool + value: true + mirror: always + +# Bidi caret movement style: +# 0 = logical +# 1 = visual +# 2 = visual, but logical during selection +- name: bidi.edit.caret_movement_style + type: int32_t +#if !defined(XP_LINUX) && defined(NIGHTLY_BUILD) + value: 1 +#else + value: 2 # See Bug 1638240 +#endif + mirror: always + +# Bidi numeral style: +# 0 = nominalnumeralBidi * +# 1 = regularcontextnumeralBidi +# 2 = hindicontextnumeralBidi +# 3 = arabicnumeralBidi +# 4 = hindinumeralBidi +# 5 = persiancontextnumeralBidi +# 6 = persiannumeralBidi +- name: bidi.numeral + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +# Bidi text type +# 1 = charsettexttypeBidi * +# 2 = logicaltexttypeBidi +# 3 = visualtexttypeBidi +- name: bidi.texttype + type: RelaxedAtomicUint32 + value: 1 + mirror: always + +# Bidi direction +# 1 = directionLTRBidi * +# 2 = directionRTLBidi +- name: bidi.direction + type: RelaxedAtomicUint32 + value: 1 + mirror: always + +# Setting this pref to |true| forces Bidi UI menu items and keyboard shortcuts +# to be exposed, and enables the directional caret hook. By default, only +# expose it for bidi-associated system locales. +- name: bidi.browser.ui + type: bool + value: false + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "browser." +#--------------------------------------------------------------------------- + +- name: browser.active_color + type: String + value: "#EE0000" + mirror: never + +- name: browser.active_color.dark + type: String + value: "#FF6666" + mirror: never + +- name: browser.anchor_color + type: String + value: "#0000EE" + mirror: never + +# If you change this, you probably also want to change +# nsXPLookAndFeel::GenericDarkColor for MozNativehyperlinktext. +- name: browser.anchor_color.dark + type: String + value: "#8C8CFF" + mirror: never + +# See http://dev.w3.org/html5/spec/forms.html#attr-fe-autofocus +- name: browser.autofocus + type: bool + value: true + mirror: always + +- name: browser.cache.disk.enable + type: RelaxedAtomicBool + value: true + mirror: always + +- name: browser.cache.memory.enable + type: RelaxedAtomicBool + value: true + mirror: always + +# Limit of recent metadata we keep in memory for faster access, in KB. +- name: browser.cache.disk.metadata_memory_limit + type: RelaxedAtomicUint32 + value: 250 # 0.25 MB + mirror: always + +# Does the user want smart-sizing? +- name: browser.cache.disk.smart_size.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Disk cache capacity in kilobytes. It's used only when +# browser.cache.disk.smart_size.enabled == false +- name: browser.cache.disk.capacity + type: RelaxedAtomicUint32 + value: 256000 + mirror: always + +# -1 = determine dynamically, 0 = none, n = memory capacity in kilobytes. +- name: browser.cache.memory.capacity + type: RelaxedAtomicInt32 + value: -1 + mirror: always + +# When smartsizing is disabled we could potentially fill all disk space by +# cache data when the disk capacity is not set correctly. To avoid that we +# check the free space every time we write some data to the cache. The free +# space is checked against two limits. Once the soft limit is reached we start +# evicting the least useful entries, when we reach the hard limit writing to +# the entry fails. +- name: browser.cache.disk.free_space_soft_limit + type: RelaxedAtomicUint32 + value: 5 * 1024 # 5MB + mirror: always + +- name: browser.cache.disk.free_space_hard_limit + type: RelaxedAtomicUint32 + value: 1024 # 1MB + mirror: always + +# The number of chunks we preload ahead of read. One chunk currently has +# 256kB. +- name: browser.cache.disk.preload_chunk_count + type: RelaxedAtomicUint32 + value: 4 # 1 MB of read ahead + mirror: always + +# Max-size (in KB) for entries in disk cache. Set to -1 for no limit. +# (Note: entries bigger than 1/8 of disk-cache are never cached) +- name: browser.cache.disk.max_entry_size + type: RelaxedAtomicUint32 + value: 50 * 1024 # 50 MB + mirror: always + +# Max-size (in KB) for entries in memory cache. Set to -1 for no limit. +# (Note: entries bigger than than 90% of the mem-cache are never cached.) +- name: browser.cache.memory.max_entry_size + type: RelaxedAtomicInt32 + value: 5 * 1024 + mirror: always + +# Memory limit (in kB) for new cache data not yet written to disk. Writes to +# the cache are buffered and written to disk on background with low priority. +# With a slow persistent storage these buffers may grow when data is coming +# fast from the network. When the amount of unwritten data is exceeded, new +# writes will simply fail. We have two buckets, one for important data +# (priority) like html, css, fonts and js, and one for other data like images, +# video, etc. +# Note: 0 means no limit. +- name: browser.cache.disk.max_chunks_memory_usage + type: RelaxedAtomicUint32 + value: 40 * 1024 + mirror: always +- name: browser.cache.disk.max_priority_chunks_memory_usage + type: RelaxedAtomicUint32 + value: 40 * 1024 + mirror: always + + +# Number of seconds the cache spends writing pending data and closing files +# after shutdown has been signalled. Past that time data is not written and +# files are left open for the OS to clean up. +- name: browser.cache.max_shutdown_io_lag + type: RelaxedAtomicUint32 + value: 2 + mirror: always + +# After the max_shutdown_io_lag has passed, we will attempt to cancel +# blocking IO (on windows). The CacheIOThread may pick up more blocking +# tasks so we want to cancel those too. The main thread will be woken +# up every shutdown_io_time_between_cancellations_ms to cancel the IO +# on the other thread. +- name: browser.cache.shutdown_io_time_between_cancellations_ms + type: RelaxedAtomicUint32 + value: 5 + mirror: always + +# A percentage limit for media content type in the disk cache. When some entries +# need to be evicted and media is over the limit, it's evicted first. +- name: browser.cache.disk.content_type_media_limit + type: RelaxedAtomicInt32 + value: 50 + mirror: always + +# How often to validate document in cache +# 0 = once-per-session, +# 1 = each-time, +# 2 = never, +# 3 = when-appropriate/automatically +- name: browser.cache.check_doc_frequency + type: RelaxedAtomicUint32 + value: 3 + mirror: always + +# Compression level for cached JavaScript bytecode +# 0 = do not compress, +# 1 = minimal compression, +# 9 = maximal compression +- name: browser.cache.jsbc_compression_level + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +# Whether tooltips are enabled. +- name: browser.chrome.toolbar_tips + type: bool + value: true + mirror: always + +# Whether tooltips are hidden on keydown. +# 0: never +# 1: always +# 2: only on non-modifier keys +- name: browser.chrome.toolbar_tips.hide_on_keydown + type: uint32_t +#if defined(XP_WIN) + value: 0 +#else + value: 2 +#endif + mirror: always + +# DLP agent name, for display in the browser +- name: browser.contentanalysis.agent_name + type: String + value: "A DLP agent" + mirror: never + +# (optional) The organization name that the DLP agent should have. If this is +# non-empty and the DLP agent is not signed with this organization name, +# Firefox will fail the connection. +- name: browser.contentanalysis.client_signature + type: String + value: "" + mirror: never + +# Content analysis by external applications, e.g. data-loss prevention apps +- name: browser.contentanalysis.enabled + type: bool + value: false + mirror: always + +# What content analysis should return if there is a problem communicating +# with the agent. (see DefaultResponse enum in ContentAnalysis.h) +# Make sure these stay in sync with the out-of-range check in Policies.sys.mjs. +# +# 0: Block all requests +# 1: Warn on all requests (which lets the user decide) +# 2: Allow all requests +- name: browser.contentanalysis.default_result + type: uint32_t + value: 0 + mirror: always + +# Is the IPC pipe to the DLP tool specific to the user or to the system? +- name: browser.contentanalysis.is_per_user + type: bool + value: true + mirror: always + +# Path name of pipe used to connect to a configured DLP agent. +- name: browser.contentanalysis.pipe_path_name + type: String + value: "path_user" + mirror: never + +# Space-separated list of regexs that are compared to URLs of resources +# being checked by content-analysis. Resources that match are not checked +# and are always permitted. +# By default this does not check any about: page except for about:blank +# and about:srcdoc. +- name: browser.contentanalysis.allow_url_regex_list + type: String + value: "^about:(?!blank|srcdoc).*" + mirror: never + +# Space-separated list of regexs that are compared to URLs of resources +# being checked by content-analysis. Resources that match are not checked +# and are always denied. +- name: browser.contentanalysis.deny_url_regex_list + type: String + value: "" + mirror: never + +# Should CA ignore the system setting and use silent notifications? +- name: browser.contentanalysis.silent_notifications + type: bool + value: false + mirror: always + +# Time (secs) after which content analysis operations are considered timed-out +- name: browser.contentanalysis.agent_timeout + type: uint32_t + value: 30 + mirror: always + +# Should Firefox show a notification or dialog when content analysis blocks +# access? +- name: browser.contentanalysis.show_blocked_result + type: bool + value: true + mirror: always + +# Should Firefox bypass content analysis for pastes and drags whose source +# is the same tab? +- name: browser.contentanalysis.bypass_for_same_tab_operations + type: bool + value: false + mirror: always + +# Should Firefox use content analysis for clipboard operations? +# Note that this has no effect unless browser.contentanalysis.enabled +# is true. +- name: browser.contentanalysis.interception_point.clipboard.enabled + type: bool + value: true + mirror: always + +# Should Firefox use content analysis for drag and drop operations? +# Note that this has no effect unless browser.contentanalysis.enabled +# is true. +- name: browser.contentanalysis.interception_point.drag_and_drop.enabled + type: bool + value: true + mirror: always + +# Should Firefox use content analysis for file upload operations through +# a file dialog? +# Note that this has no effect unless browser.contentanalysis.enabled +# is true. +- name: browser.contentanalysis.interception_point.file_upload.enabled + type: bool + value: true + mirror: always + +# Should Firefox use content analysis for print operations? +# Note that this has no effect unless browser.contentanalysis.enabled +# is true. +- name: browser.contentanalysis.interception_point.print.enabled + type: bool + value: true + mirror: always + +# Content blocking for Enhanced Tracking Protection +- name: browser.contentblocking.database.enabled + type: bool + value: false + mirror: always + +# How many recent block/unblock actions per origins we remember in the +# Content Blocking log for each top-level window. +- name: browser.contentblocking.originlog.length + type: uint32_t + value: 32 + mirror: always + +# Min font device pixel size at which to turn on high quality. +- name: browser.display.auto_quality_min_font_size + type: RelaxedAtomicUint32 + value: 20 + mirror: always + +- name: browser.display.background_color + type: String + value: "#FFFFFF" + mirror: never + +- name: browser.display.background_color.dark + type: String + value: "#1C1B22" + mirror: never + +# This preference is a bit confusing because we use the opposite +# string value in the colors dialog to indicate to users how FF HCM +# will behave. +# With resect to document colors, these values mean: +# 0 = "default" = always, except in high contrast mode +# 1 = "always" +# 2 = "never" +# +# On windows, we set this to 0, which means FF HCM will mirror OS HCM. +# Everywhere else, we set this to 1, disabling FF HCM. +- name: browser.display.document_color_use + type: RelaxedAtomicUint32 +#if defined(XP_WIN) + value: 0 +#else + value: 1 +#endif + mirror: always + rust: true + +# 0 = always native +# 1 = never native +# other = default +- name: browser.display.windows.non_native_menus + type: RelaxedAtomicUint32 + value: 2 + mirror: always + rust: true + +# This pref dictates whether or not backplates and background images +# are to be drawn, when in high-contrast mode: +# false: do not draw backplates or render background images +# true: render background images and draw backplates +# This condition is only considered when high-contrast mode is enabled +# in Firefox, ie. when the user has: +# (1) mUseAccessibilityMode set to true (Widows high-contrast mode is on) +# AND browser.display.document_color_use set to 0 +# (only with high-contrast themes) OR +# (2) browser.display.document_color_use set to 2 (always) +- name: browser.display.permit_backplate + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Whether we should suppress the background-image of the canvas (the root +# frame) if we're in forced colors mode. +# +# This is important because some sites use background-image with a plain color +# and it causes undesirable results in high-contrast mode. +# +# See bug 1614921 for example. +- name: browser.display.suppress_canvas_background_image_on_forced_colors + type: bool + value: true + mirror: always + +- name: browser.display.foreground_color + type: String + value: "#000000" + mirror: never + +- name: browser.display.foreground_color.dark + type: String + value: "#FBFBFE" + mirror: never + +# Determines the behavior of OS zoom settings. +# +# 0: doesn't affect rendering at all +# 1: affects full zoom (dpi, effectively). +# 2: affects text zoom. +# +# Default is (1): Historical behavior on Linux, matches other browsers on +# Windows, and generally creates more consistent rendering. +- name: browser.display.os-zoom-behavior + type: RelaxedAtomicInt32 + value: 1 + mirror: always + rust: true + +# Whether focus rings are always shown by default. +# +# This is the initial value of nsWindowRoot::mShowFocusRings, but it can be +# overridden by system preferences. +- name: browser.display.show_focus_rings + type: bool + value: false + mirror: always + +# Enable showing image placeholders while image is loading or when image is broken. +- name: browser.display.show_image_placeholders + type: bool + value: true + mirror: always + +# Whether we should always enable focus rings after focus was moved by keyboard. +# +# This behavior matches both historical and GTK / Windows focus behavior. +# +# :focus-visible is intended to provide better heuristics than this. +- name: browser.display.always_show_rings_after_key_focus + type: bool + value: false + mirror: always + +# In theory: 0 = never, 1 = quick, 2 = always, though we always just use it as +# a bool! +- name: browser.display.use_document_fonts + type: RelaxedAtomicInt32 + value: 1 + mirror: always + rust: true + +# font-family names for which we'll override use_document_fonts=0, and always +# use the specified font. +# This is to support ligature-icon fonts, which render literal strings like +# "arrow_drop_down" with an icon, even when use_document_fonts is disabled. +# If an author provides & uses such a font, and we decline to use it, we'll end +# up rendering these literal strings where the author intended an icon, which +# can cause all sorts of overlapping/unreadable content. +- name: browser.display.use_document_fonts.icon_font_allowlist + type: String + value: >- + Material Icons, + Material Icons Extended, + Material Icons Outlined, + Material Icons Round, + Material Icons Sharp, + Material Icons Two Tone, + Google Material Icons, + Google Material Icons Filled, + Material Symbols Outlined, + Material Symbols Round, + Material Symbols Rounded, + Material Symbols Sharp, + Google Symbols, + FontAwesome + mirror: never + +- name: browser.display.use_system_colors + type: RelaxedAtomicBool +#ifdef XP_WIN + value: true +#else + value: false +#endif + mirror: always + +- name: browser.dom.window.dump.enabled + type: RelaxedAtomicBool + value: @IS_NOT_MOZILLA_OFFICIAL@ + mirror: always + +# See bug 1738574 +- name: browser.download.start_downloads_in_tmp_dir + type: bool + value: false + mirror: always + +# See bug 1747343 +- name: browser.download.always_ask_before_handling_new_types + type: bool + value: false + mirror: always + +# See bug 1731668 +- name: browser.download.enable_spam_prevention + type: bool + value: false + mirror: always + +# See bug 1772569 +- name: browser.download.open_pdf_attachments_inline + type: bool + value: false + mirror: always + +# See bug 1811830 +- name: browser.download.force_save_internally_handled_attachments + type: bool + value: false + mirror: always + +- name: browser.download.sanitize_non_media_extensions + type: bool + value: true + mirror: always + +# Image document's automatic image sizing. +- name: browser.enable_automatic_image_resizing + type: bool + value: true + mirror: always + +# Image document's click-to-resize. +- name: browser.enable_click_image_resizing + type: bool + value: @IS_NOT_ANDROID@ + mirror: always + +- name: browser.find.ignore_ruby_annotations + type: bool + value: true + mirror: always + +#if defined(XP_MACOSX) +# Whether pressing Esc will exit fullscreen. +- name: browser.fullscreen.exit_on_escape + type: bool + value: true + mirror: always +#endif + +# The max url length we'll store in history. +# +# The default value is mostly a guess based on various facts: +# +# * IE didn't support urls longer than 2083 chars +# * Sitemaps protocol used to support a maximum of 2048 chars +# * Various SEO guides suggest to not go over 2000 chars +# * Various apps/services are known to have issues over 2000 chars +# * RFC 2616 - HTTP/1.1 suggests being cautious about depending +# on URI lengths above 255 bytes +# +- name: browser.history.maxUrlLength + type: uint32_t + value: 2000 + mirror: always + +# Max size of push/replaceState data parameter +- name: browser.history.maxStateObjectSize + type: int32_t + value: 16777216 + mirror: always + +# True to collect wireframes upon navigations / pushState +- name: browser.history.collectWireframes + type: bool + value: false + mirror: always + +# The minimum area for a rect to be included in a wireframe, in CSS pixels. +# +# The current value of 50 is pretty arbitrary, and will be tuned as we refine +# and test the wireframing capability. +- name: browser.history.wireframeAreaThreshold + type: uint32_t + value: 50 + mirror: always + +#if defined(XP_WIN) || defined(XP_LINUX) + # Notify TabUnloader or send the memory pressure if the memory resource + # notification is signaled AND the available commit space is lower than + # this value. +- name: browser.low_commit_space_threshold_mb + type: RelaxedAtomicUint32 + value: 200 + mirror: always +#endif + +#ifdef XP_LINUX + # On Linux we also check available memory in comparison to total memory, + # and use this percent value (out of 100) to determine if we are in a + # low memory scenario. +- name: browser.low_commit_space_threshold_percent + type: RelaxedAtomicUint32 + value: 5 + mirror: always +#endif + +# Render animations and videos as a solid color +- name: browser.measurement.render_anims_and_video_solid + type: RelaxedAtomicBool + value: false + mirror: always + +- name: browser.navigation.requireUserInteraction + type: bool + value: true + mirror: always + +# Indicates if about:newtab shows content (enabled) or just blank. +- name: browser.newtabpage.enabled + type: bool + value: true + mirror: always + +# Open PDFs in Edge with the --app flag if it is the default. +- name: browser.pdf.launchDefaultEdgeAsApp + type: bool + value: true + mirror: always + +# Maximium delay between keystrokes that will be considered typing (milliseconds). +- name: browser.places.interactions.typing_timeout_ms + type: RelaxedAtomicUint32 + value: 3000 + mirror: always + +# Maximum delay between scroll input events that will be considered a scrolling interaction (milliseconds). +- name: browser.places.interactions.scrolling_timeout_ms + type: RelaxedAtomicUint32 + value: 5000 + mirror: always + +# Number of seconds till the sponsored session is timeout. +- name: browser.places.sponsoredSession.timeoutSecs + type: RelaxedAtomicUint32 + value: 3600 + mirror: always + +# Whether to start the private browsing mode at application startup +- name: browser.privatebrowsing.autostart + type: bool + value: false + mirror: always + +# Force usage of in-memory (rather than file on disk) media cache for video streaming when private browsing +- name: browser.privatebrowsing.forceMediaMemoryCache + type: bool + value: false + mirror: always + +# Communicates the toolbar color to platform (for e.g., prefers-color-scheme). +# +# Returns whether the toolbar is dark (0), light (1), or system (2). The +# theming code overrides it if appropriate. +- name: browser.theme.toolbar-theme + type: RelaxedAtomicUint32 + value: 2 + mirror: always + +# Communicates the preferred content theme color to platform (for e.g., +# prefers-color-scheme). +# +# dark (0), light (1), system (2), or toolbar (3). +# +# Default to "toolbar", the theming code sets it appropriately. +- name: browser.theme.content-theme + type: RelaxedAtomicUint32 + value: 2 + mirror: always + rust: true + +# Whether the firefox titlebar respects the +# -moz-windows-accent-color-in-titlebar setting on the tab strip. +- name: browser.theme.windows.accent-color-in-tabs.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# Blocked plugin content +- name: browser.safebrowsing.blockedURIs.enabled + type: bool + value: true + mirror: always + +# Malware protection +- name: browser.safebrowsing.malware.enabled + type: bool + value: true + mirror: always + +# Phishing protection +- name: browser.safebrowsing.phishing.enabled + type: bool + value: true + mirror: always + +# Maximum size for an array to store the safebrowsing prefixset. +- name: browser.safebrowsing.prefixset_max_array_size + type: RelaxedAtomicUint32 + value: 512*1024 + mirror: always + +# SessionStore prefs +# Maximum number of bytes of DOMSessionStorage data we collect per origin. +- name: browser.sessionstore.dom_storage_limit + type: uint32_t + value: 2048 + mirror: always + +# Maximum number of characters of form field data per field we collect. +- name: browser.sessionstore.dom_form_limit + type: uint32_t + value: 1024*1024*2 + mirror: always + +# Maximum number of characters of form data we collect per origin. +- name: browser.sessionstore.dom_form_max_limit + type: uint32_t + value: 1024*1024*50 + mirror: always + +# Minimal interval between two save operations in milliseconds (while the user is active). +- name: browser.sessionstore.interval + type: RelaxedAtomicUint32 + value: 15000 + mirror: always + +# Disable collection of data for session store using the native collector code, +# instead use the older implementation that's not compatible with session +# history in the parent (and thus Fission). +- name: browser.sessionstore.disable_platform_collection + type: bool +#if defined(MOZ_THUNDERBIRD) + value: true +#else + value: false +#endif + mirror: once + do_not_use_directly: true + +#if defined(NIGHTLY_BUILD) || defined(MOZ_DEV_EDITION) || defined(DEBUG) +- name: browser.startup.record + type: bool + value: false + mirror: always +#endif + +# Causes SessionStore to ignore non-final update messages from +# browser tabs that were not caused by a flush from the parent. +# This is a testing flag and should not be used by end-users. +- name: browser.sessionstore.debug.no_auto_updates + type: RelaxedAtomicBool + value: false + mirror: always + +# If set, when a link is opened to a new tab, do not switch to the new tab. +# +# This pref is used when the link is opened with "Open Link in New Tab", +# middle-click, etc. +# +# See also browser.tabs.loadDivertedInBackground, which is used when the website +# diverts the link into a new tab. +- name: browser.tabs.loadInBackground + type: bool + value: true + mirror: always + +# Whether we should draw the tabs on top of the titlebar. +# +# no (0), yes (1), or default (2), which is true everywhere except Linux. +- name: browser.tabs.inTitlebar + type: int32_t + value: 2 + mirror: always + +# If set, use DocumentChannel to directly initiate loads entirely +# from parent-process BrowsingContexts +- name: browser.tabs.documentchannel.parent-controlled + type: bool + value: false + mirror: always + +# If set, middle clicking on a link opens the link in a new tab. +- name: browser.tabs.opentabfor.middleclick + type: bool + value: true + mirror: always + +# Testing-only pref which makes data: URIs be loaded in a "web" content process +# instead of within a process based on the URI's loader. +- name: browser.tabs.remote.dataUriInDefaultWebProcess + type: bool + value: false + mirror: always + +# Testing-only pref to force system-triggered about:blank loads to not change +# content processes. This is used for performance tests which load an +# about:blank document between navigations for historical reasons to avoid +# unnecessary process switches. +- name: browser.tabs.remote.systemTriggeredAboutBlankAnywhere + type: bool + value: false + mirror: always + +# Testing-only pref to cause PBrowser creation for a specific BrowsingContext to +# fail, to test the errored codepath. +- name: browser.tabs.remote.testOnly.failPBrowserCreation.enabled + type: bool + value: false + mirror: always + +- name: browser.tabs.remote.force-paint + type: bool + value: true + mirror: always + +# When this pref is enabled document loads with a mismatched +# Cross-Origin-Embedder-Policy header will fail to load +- name: browser.tabs.remote.useCrossOriginEmbedderPolicy + type: RelaxedAtomicBool + value: true + mirror: always + +# This pref makes `credentialless` a valid value for +# Cross-Origin-Embedder-Policy header +- name: browser.tabs.remote.coep.credentialless + type: RelaxedAtomicBool +#if defined(ANDROID) + value: @IS_NIGHTLY_BUILD@ +#else + value: true +#endif + mirror: always + do_not_use_directly: true + +# When this pref is enabled top level loads with a mismatched +# Cross-Origin-Opener-Policy header will be loaded in a separate process. +- name: browser.tabs.remote.useCrossOriginOpenerPolicy + type: RelaxedAtomicBool + value: true + mirror: always + +# When this pref is enabled then we use a separate content process for +# top-level load of file:// URIs +- name: browser.tabs.remote.separateFileUriProcess + type: RelaxedAtomicBool +#if !defined(ANDROID) + value: true +#else + value: false +#endif + mirror: always + +# Pref to control whether we use a separate privileged content process +# for certain mozilla webpages (which are listed in the pref +# browser.tabs.remote.separatedMozillaDomains). +- name: browser.tabs.remote.separatePrivilegedMozillaWebContentProcess + type: bool + value: false + mirror: always + +# Whether or not process selection for subframes will prefer re-using an +# existing content process over creating a new one. Enabling this pref should +# reduce the number of processes allocated for non-first-party domains if +# dom.ipc.processCount.webIsolated > 1. +- name: browser.tabs.remote.subframesPreferUsed + type: bool + value: true + mirror: always + +# When this pref is enabled, opaque response is only allowed to enter the +# content process if it's a response for media (audio, image, video), CSS, or +# JavaScript. +- name: browser.opaqueResponseBlocking + type: RelaxedAtomicBool +#if defined(ANDROID) + value: false +#else + value: true +#endif + mirror: always + +# When this pref is enabled, the JS validator will be enabled for +# ORB. +- name: browser.opaqueResponseBlocking.javascriptValidator + type: bool + value: true + mirror: always + +# This pref controls how filtering of opaque responses for calls to `Window.fetch`. +# (and similar) is performed in the parent process. This is intended to make sure +# that data that would be filtered in a content process never actually reaches that +# content process. +# See https://fetch.spec.whatwg.org/#concept-filtered-response-opaque +# 0) Don't filter in the parent process at all, and let content processes handle +# opaque filtering. Regardless of if ORB is enabled or not. N.B. that if ORB +# is enabled opaque responses will be blocked. +# 1) If ORB is enabled, in the parent process, filter the responses that ORB allows. +# N.B. any responses ORB doesn't allow will not send data to a content process +# since they will return a NetworkError. If the request is allowed by ORB, the +# internal response will be intact and sent to the content process as is. +# 2) If ORB is enabled, in the parent process, filter the responses that ORB blocks, +# when they were issued by `Window.fetch` (and similar). +# 3) Filter all responses in the parent, regardless of if ORB is enabled or not. +# This means that opaque responses coming from `Window.fetch` won't even be +# considered for being blocked by ORB. +- name: browser.opaqueResponseBlocking.filterFetchResponse + type: uint32_t + value: 2 + mirror: always + do_not_use_directly: true + +# This pref controls how exceptions to opaque response blocking for the media MIME types +# `audio/*` and `video/*` are handled. This is because step 8 in the spec that performs +# audio or video type pattern matching cannot handle certain MIME types (yet). +# See https://whatpr.org/fetch/1442.html#orb-algorithm +# 0) No exceptions +# 1) Some exceptions, explicitly hard coded in `IsOpaqueSafeListedSpecBreakingMIMEType` +# 2) Allow all MIME types beginning with `audio/*` or `video/*`. +- name: browser.opaqueResponseBlocking.mediaExceptionsStrategy + type: uint32_t + value: 1 + mirror: always + do_not_use_directly: true + +# When true, zooming will be enabled on all sites, even ones that declare +# user-scalable=no or use touch-action to disable pinch gestures. +- name: browser.ui.zoom.force-user-scalable + type: RelaxedAtomicBool + value: false + mirror: always + +- name: browser.viewport.desktopWidth + type: RelaxedAtomicInt32 + value: 980 + mirror: always + +- name: browser.visited_color + type: String + value: "#551A8B" + mirror: never + +# If you change this, you probably also want to change +# nsXPLookAndFeel::GenericDarkColor for MozNativevisitedhyperlinktext. +- name: browser.visited_color.dark + type: String + value: "#FFADFF" + mirror: never + +# When true, soft reloads (including location.reload()) +# will only froce validate the top level document, subresources will +# be loaded normally as-if users normally navigated to the page. +- name: browser.soft_reload.only_force_validate_top_level_document + type: bool + value: true + mirror: always + +# Whether or not to save and restore zoom levels on a per-site basis. +- name: browser.zoom.siteSpecific + type: bool + value: @IS_NOT_ANDROID@ + mirror: always + +# Whether we block opening pickers from background tabs. +- name: browser.disable_pickers_background_tabs + type: RelaxedAtomicBool + value: true + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "channelclassifier." +#--------------------------------------------------------------------------- + +- name: channelclassifier.allowlist_example + type: bool + value: false + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "clipboard." +#--------------------------------------------------------------------------- + +# Clipboard behavior. +- name: clipboard.autocopy + type: bool +#if !defined(ANDROID) && !defined(XP_MACOSX) && defined(XP_UNIX) + value: true +#else + value: false +#endif + mirror: always + +#ifdef XP_WIN + # allow to copy clipboard data to Clipboard History/Cloud + # (used on sensitive data in about:logins and Private Browsing) +- name: clipboard.copyPrivateDataToClipboardCloudOrHistory + type: bool + value: false + mirror: always + + # Whether to put a file promise onto the clipboard when copying images on Windows +- name: clipboard.imageAsFile.enabled + type: bool + value: @IS_NOT_EARLY_BETA_OR_EARLIER@ + mirror: always +#endif + +#--------------------------------------------------------------------------- +# Prefs starting with "consoleservice." +#--------------------------------------------------------------------------- + +#if defined(ANDROID) + # Disable sending console to logcat on release builds. +- name: consoleservice.logcat + type: RelaxedAtomicBool + value: @IS_NOT_RELEASE_OR_BETA@ + mirror: always +#endif + +#--------------------------------------------------------------------------- +# Prefs starting with "content." +#--------------------------------------------------------------------------- + +- name: content.cors.disable + type: bool + value: false + mirror: always + +# Back off timer notification after count. +# -1 means never. +- name: content.notify.backoffcount + type: int32_t + value: -1 + mirror: always + +# Notification interval in microseconds. +# The notification interval has a dramatic effect on how long it takes to +# initially display content for slow connections. The current value +# provides good incremental display of content without causing an increase +# in page load time. If this value is set below 1/10 of a second it starts +# to impact page load performance. +# See bugzilla bug 72138 for more info. +- name: content.notify.interval + type: int32_t + value: 120000 + mirror: always + +# Do we notify based on time? +- name: content.notify.ontimer + type: bool + value: true + mirror: always + +# How many times to deflect in interactive mode. +- name: content.sink.interactive_deflect_count + type: int32_t + value: 0 + mirror: always + +# How many times to deflect in perf mode. +- name: content.sink.perf_deflect_count + type: int32_t + value: 200 + mirror: always + +# Parse mode for handling pending events. +# 0 = don't check for pending events +# 1 = don't deflect if there are pending events +# 2 = bail if there are pending events +- name: content.sink.pending_event_mode + type: int32_t +#ifdef XP_WIN + value: 1 +#else + value: 0 +#endif + mirror: always + +# How often to probe for pending events. 1 = every token. +- name: content.sink.event_probe_rate + type: int32_t + value: 1 + mirror: always + +# How long to stay off the event loop in interactive mode (microseconds). +- name: content.sink.interactive_parse_time + type: int32_t + value: 3000 + mirror: always + +# How long to stay off the event loop in perf mode. +- name: content.sink.perf_parse_time + type: int32_t + value: 30000 + mirror: always + +# How long to be in interactive mode after an event. +- name: content.sink.interactive_time + type: uint32_t + value: 750000 + mirror: always + +# How long to stay in perf mode after initial loading. +- name: content.sink.initial_perf_time + type: uint32_t + value: 2000000 + mirror: always + +# Should we switch between perf-mode and interactive-mode? +# 0 = Switch +# 1 = Interactive mode +# 2 = Perf mode +- name: content.sink.enable_perf_mode + type: int32_t + value: 0 + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "converter." +#--------------------------------------------------------------------------- + +# Whether we include ruby annotation in the text despite whether it +# is requested. This was true because we didn't explicitly strip out +# annotations. Set false by default to provide a better behavior, but +# we want to be able to pref-off it if user doesn't like it. +- name: converter.html2txt.always_include_ruby + type: bool + value: false + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "cookiebanners." +#--------------------------------------------------------------------------- + +# Controls the cookie banner handling mode in normal browsing. +# 0: Disables all cookie banner handling. +# 1: Reject-all if possible, otherwise do nothing. +# 2: Reject-all if possible, otherwise accept-all. +- name: cookiebanners.service.mode + type: uint32_t + value: 0 + mirror: always + +# When set to true, cookie banners are detected and detection events are +# dispatched, but they will not be handled. Requires the service to be enabled +# for the desired mode via pref cookiebanners.service.mode* +- name: cookiebanners.service.detectOnly + type: bool + value: false + mirror: always + +# Controls the cookie banner handling mode in private browsing. Same mode +# options as the normal browsing pref above. +- name: cookiebanners.service.mode.privateBrowsing + type: uint32_t + value: 0 + mirror: always + +# Enables use of global CookieBannerRules, which apply to all sites. This is +# used for click rules that can handle common Consent Management Providers +# (CMP). +# Enabling this (when the cookie handling feature is enabled) may negatively +# impact site performance since it requires us to run rule-defined query +# selectors for every page. +- name: cookiebanners.service.enableGlobalRules + type: bool + value: true + mirror: always + +# Whether global rules are allowed to run in sub-frames. Running query selectors +# in every sub-frame may negatively impact performance, but is required for some +# CMPs. +- name: cookiebanners.service.enableGlobalRules.subFrames + type: bool + value: true + mirror: always + +# Enables the cookie banner cookie injector. The cookie banner cookie injector +# depends on the `cookiebanners.service.mode` pref above. +- name: cookiebanners.cookieInjector.enabled + type: bool + value: true + mirror: always + +# By default, how many seconds in the future cookies should expire after they +# have been injected. Defaults to 12 months. Individual cookie rules may +# override this. +- name: cookiebanners.cookieInjector.defaultExpiryRelative + type: uint32_t + value: 31536000 + mirror: always + +# How many times per site and site load to check for cookie banners after which +# the mechanism is considered on cooldown for the site in the current browsing +# session. If the threshold is set to zero, banner clicking won't be considered +# as being on cooldown regardless of how many times the site is loaded. The +# maximum value for the retry is 255, any value over than that will be capped. +- name: cookiebanners.bannerClicking.maxTriesPerSiteAndSession + type: uint32_t + value: 3 + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "datareporting." +#--------------------------------------------------------------------------- + +# Do note that the toggle on Fenix and Focus does NOT reflect to this pref. +- name: datareporting.healthreport.uploadEnabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +#--------------------------------------------------------------------------- +# Prefs starting with "device." +#--------------------------------------------------------------------------- + +# Is support for the device sensors API enabled? +- name: device.sensors.enabled + type: bool + value: true + mirror: always + +# KaiOS-only, see https://bugzilla.mozilla.org/show_bug.cgi?id=1699707#c10 +- name: device.sensors.ambientLight.enabled + type: bool + value: false + mirror: always + +- name: device.sensors.motion.enabled + type: bool + value: true + mirror: always + +- name: device.sensors.orientation.enabled + type: bool + value: true + mirror: always + +# KaiOS-only, see https://bugzilla.mozilla.org/show_bug.cgi?id=1699707#c10 +- name: device.sensors.proximity.enabled + type: bool + value: false + mirror: always + +- name: device.sensors.test.events + type: bool + value: false + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "devtools." +#--------------------------------------------------------------------------- + +- name: devtools.console.stdout.chrome + type: RelaxedAtomicBool + value: @IS_NOT_MOZILLA_OFFICIAL@ + mirror: always + +- name: devtools.console.stdout.content + type: RelaxedAtomicBool + value: false + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "docshell." +#--------------------------------------------------------------------------- + +# Used to indicate whether session history listeners should be notified +# about content viewer eviction. Used only for testing. +- name: docshell.shistory.testing.bfevict + type: bool + value: false + mirror: always + +# If true, pages with an opener won't be bfcached. +- name: docshell.shistory.bfcache.require_no_opener + type: bool + value: @IS_ANDROID@ + mirror: always + +# If true, page with beforeunload or unload event listeners can be bfcached. +- name: docshell.shistory.bfcache.allow_unload_listeners + type: bool + value: @IS_ANDROID@ + mirror: always + +# If true, page with beforeunload event listeners can be bfcached. +# This only works when sessionHistoryInParent is enabled. +- name: docshell.shistory.bfcache.ship_allow_beforeunload_listeners + type: bool + value: true + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "dom." +#--------------------------------------------------------------------------- + +# Allow cut/copy +- name: dom.allow_cut_copy + type: bool + value: true + mirror: always + +# Checks if offscreen animation throttling is enabled. +- name: dom.animations.offscreen-throttling + type: bool + value: true + mirror: always + +# Is support for Navigator.getBattery enabled? +- name: dom.battery.enabled + type: bool + value: true + mirror: always + +# Block multiple external protocol URLs in iframes per single event. +- name: dom.block_external_protocol_in_iframes + type: bool + value: true + mirror: always + +# Without this my windows build crashes +- name: "dom.block_multiple_popups" + type: bool + value: true + mirror: always + +# Block sandboxed BrowsingContexts from navigating to external protocols. +- name: dom.block_external_protocol_navigation_from_sandbox + type: bool + value: true + mirror: always + +# Block Insecure downloads from Secure Origins +- name: dom.block_download_insecure + type: bool + value: true + mirror: always + +# The maximum number of popup that is allowed to be opened. Set to -1 for no +# limit. +- name: dom.popup_maximum + type: int32_t + value: -1 + mirror: always + +# Enable experimental popup blocker changes. +- name: dom.popup.experimental + type: bool + value: true + mirror: always + + # Enable CacheAPI in private browsing mode with encryption +- name: dom.cache.privateBrowsing.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Exposes window.caches and skips SecureContext check. +# dom.serviceWorkers.testing.enabled also includes the same effect. +- name: dom.caches.testing.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# A pref that is used to slow down database initialization for testing purposes. +- name: dom.cache.databaseInitialization.pauseOnIOThreadMs + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +# Disable capture attribute for input elements; only supported on GeckoView. +- name: dom.capture.enabled + type: bool + value: false + mirror: always + +# HTML specification says the level should be 5 +# https://html.spec.whatwg.org/#timer-initialisation-steps +- name: dom.clamp.timeout.nesting.level + type: uint32_t + value: 5 + mirror: once + +# Skip the security checks for document.cookie. +- name: dom.cookie.testing.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# https://whatpr.org/html/10168/interaction.html#closewatcher +- name: dom.closewatcher.enabled + type: bool + value: false + mirror: always + +# Disable custom highlight API; implementation pending. +- name: dom.customHighlightAPI.enabled + type: RelaxedAtomicBool + value: @IS_NIGHTLY_BUILD@ + mirror: always + rust: true + +# Allow control characters appear in composition string. +# When this is false, control characters except +# CHARACTER TABULATION (horizontal tab) are removed from +# both composition string and data attribute of compositionupdate +# and compositionend events. +- name: dom.compositionevent.allow_control_characters + type: bool + value: false + mirror: always + +# Compression Streams (CompressionStream/DecompressionStream) +- name: dom.compression_streams.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Disable cookie-store API +- name: dom.cookieStore.enabled + type: RelaxedAtomicBool + value: @IS_EARLY_BETA_OR_EARLIER@ + mirror: always + +# Is support for CSSPseudoElement enabled? +- name: dom.css_pseudo_element.enabled + type: bool + value: false + mirror: always + +# After how many seconds we allow external protocol URLs in iframe when not in +# single events +- name: dom.delay.block_external_protocol_in_iframes + type: uint32_t + value: 10 # in seconds + mirror: always + +# Whether the above pref has any effect at all. +# Make sure cases like bug 1795380 work before trying to turn this off. See +# bug 1680721 for some other context that might be relevant. +- name: dom.delay.block_external_protocol_in_iframes.enabled + type: bool + value: true + mirror: always + +- name: dom.details_group.enabled + type: bool + value: true + mirror: always + +# Only propagate the open window click permission if the setTimeout() is equal +# to or less than this value. +- name: dom.disable_open_click_delay + type: int32_t + value: 1000 + mirror: always + +- name: dom.disable_open_during_load + type: bool + value: false + mirror: always + +- name: dom.disable_beforeunload + type: bool + value: false + mirror: always + +- name: dom.require_user_interaction_for_beforeunload + type: bool + value: true + mirror: always + +# Enable/disable Gecko specific edit commands +- name: dom.document.edit_command.contentReadOnly.enabled + type: bool + value: @IS_NOT_EARLY_BETA_OR_EARLIER@ + mirror: always + +- name: dom.document.edit_command.insertBrOnReturn.enabled + type: bool + value: @IS_NOT_EARLY_BETA_OR_EARLIER@ + mirror: always + +# Only intended for fuzzing purposes, this will break mozPrintCallback, etc. +- name: dom.window_print.fuzzing.block_while_printing + type: bool + value: false + mirror: always + +# Enable/disable contenteditable="plaintext-only". +- name: dom.element.contenteditable.plaintext-only.enabled + type: bool + value: @IS_EARLY_BETA_OR_EARLIER@ + mirror: always + +# Whether Dialog elements emit beforetoggle and toggle events during opening and closing. +# See https://github.com/whatwg/html/pull/10091 +- name: dom.element.dialog.toggle_events.enabled + type: bool + value: true + mirror: always + +- name: dom.element.transform-getters.enabled + type: bool + value: false + mirror: always + +# Whether the blocking attribute implementation is enabled, +# see https://html.spec.whatwg.org/#blocking-attributes +- name: dom.element.blocking.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether CustomStateSet is enabled +- name: dom.element.customstateset.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Whether the invoketarget attribute implementation is enabled +- name: dom.element.invokers.enabled + type: bool + value: false + mirror: always + +- name: dom.mouse_capture.enabled + type: bool + value: true + mirror: always + +# Is support for Performance.mozMemory enabled? +- name: dom.enable_memory_stats + type: bool + value: false + mirror: always + +# Enable Performance API +# Whether nonzero values can be returned from performance.timing.* +- name: dom.enable_performance + type: RelaxedAtomicBool + value: true + mirror: always + +# Enable Performance Observer API +- name: dom.enable_performance_observer + type: RelaxedAtomicBool + value: true + mirror: always + +# Whether resource timing will be gathered and returned by performance.GetEntries* +- name: dom.enable_resource_timing + type: bool + value: true + mirror: always + +# Whether event timing will be gathered and returned by performance observer* +- name: dom.enable_event_timing + type: RelaxedAtomicBool + value: true + mirror: always + +# Whether the LargestContentfulPaint API will be gathered and returned by performance observer* +- name: dom.enable_largest_contentful_paint + type: RelaxedAtomicBool + value: true + mirror: always + +# Whether performance.GetEntries* will contain an entry for the active document +- name: dom.enable_performance_navigation_timing + type: bool + value: true + mirror: always + +# Whether the scheduler interface will be exposed +- name: dom.enable_web_task_scheduling + type: RelaxedAtomicBool + value: false + mirror: always + +# If this is true, it's allowed to fire "cut", "copy" and "paste" events. +# Additionally, "input" events may expose clipboard content when inputType +# is "insertFromPaste" or something. +- name: dom.event.clipboardevents.enabled + type: bool + value: true + mirror: always + +# Whether Shift+Right click force-opens the context menu +- name: dom.event.contextmenu.shift_suppresses_event + type: bool + value: true + mirror: always + +- name: dom.event.dragexit.enabled + type: bool + value: @IS_NOT_NIGHTLY_BUILD@ + mirror: always + +# If this pref is set to true, typing a surrogate pair causes one `keypress` +# event whose `charCode` stores the unicode code point over 0xFFFF. This is +# compatible with Safari and Chrome in non-Windows platforms. +# Otherwise, typing a surrogate pair causes two `keypress` events. This is +# compatible with legacy web apps which does +# `String.fromCharCode(event.charCode)`. +- name: dom.event.keypress.dispatch_once_per_surrogate_pair + type: bool + value: false + mirror: always + +# This is meaningful only when `dispatch_once_per_surrogate_pair` is false. +# If this pref is set to true, `.key` of the first `keypress` is set to the +# high-surrogate and `.key` of the other is set to the low-surrogate. +# Therefore, setting this exposing ill-formed UTF-16 string with `.key`. +# (And also `InputEvent.data` if pressed in an editable element.) +# Otherwise, `.key` of the first `keypress` is set to the surrogate pair, and +# `.key` of the second `keypress` is set to the empty string. +- name: dom.event.keypress.key.allow_lone_surrogate + type: bool + value: @IS_NOT_EARLY_BETA_OR_EARLIER@ + mirror: always + +# Whether the result of screenX, screenY, clientX, clientY, offsetX, offsetY, +# x and y of trusted MouseEvent and subclasses may be fractional values. +# Enabling this may cause backward compatibility issues. +# Note that this pref is referred only when +# `dom.event.pointer.fractional_coordinates.enabled` is `true`. +- name: dom.event.mouse.fractional_coordinates.trusted.enabled + type: bool + value: false + mirror: always + +# Whether the result of screenX, screenY, clientX, clientY, offsetX, offsetY, +# x and y of untrusted MouseEvent and subclasses may be fractional values. +# I.e., this allows web apps to use fractional values with their own DOM events +# which have MouseEvent interface. However, this might cause backward +# compatibility issues if web apps initializes untrusted events with quotients. +# Note that this pref is referred only when +# `dom.event.pointer.fractional_coordinates.enabled` is `true`. +- name: dom.event.mouse.fractional_coordinates.untrusted.enabled + type: bool + value: false + mirror: always + +# Whether the result of screenX, screenY, clientX, clientY, offsetX, offsetY, +# x and y of PointerEvent may be fractional values (except `click`, `auxclick` +# and `contextmenu`) +- name: dom.event.pointer.fractional_coordinates.enabled + type: bool + value: true + mirror: always + +# Whether wheel event target's should be grouped. When enabled, all wheel +# events that occur in a given wheel transaction have the same event target. +- name: dom.event.wheel-event-groups.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Whether WheelEvent should return pixels instead of lines for +# WheelEvent.deltaX/Y/Z, when deltaMode hasn't been checked. +# +# Other browsers don't use line deltas and websites forget to check for it, see +# bug 1392460. +- name: dom.event.wheel-deltaMode-lines.disabled + type: bool + value: true + mirror: always + +# Mostly for debugging. Whether we should do the same as +# dom.event.wheel-deltaMode-lines.disabled, but unconditionally rather than +# only when deltaMode hasn't been checked. +- name: dom.event.wheel-deltaMode-lines.always-disabled + type: bool + value: false + mirror: always + +# A blocklist (list of domains) for the +# dom.event.wheel-deltaMode-lines.disabled behavior, in case potential +# unforeseen problems with it arrive. +- name: dom.event.wheel-deltaMode-lines.always-enabled + type: String + value: "" + mirror: never + +#if defined(XP_MACOSX) +# Whether to disable treating ctrl click as right click +- name: dom.event.treat_ctrl_click_as_right_click.disabled + type: bool + value: @IS_NIGHTLY_BUILD@ + mirror: always +#endif + +# Whether Gecko keeps store or forgets the last deepest "enter" event target for +# the next "enter" or "leave" event dispatching when the last "over" event +# target is removed from the DOM tree. +- name: dom.events.mouse-pointer-boundary.keep-enter-targets-after-over-target-removed + type: bool + value: true + mirror: always + +# Whether .offset{X,Y} for events targeted at SVG nodes returns bounds relative +# to the outer SVG. +- name: dom.events.offset-in-svg-relative-to-svg-root + type: bool + value: true + mirror: always + +# Control whether clipboard.read(), clipboard.write() and ClipboardItem are exposed +# to content. +- name: dom.events.asyncClipboard.clipboardItem + type: bool + value: true + mirror: always + +# Skips checking permission and user activation when accessing the clipboard. +# Should only be enabled in tests. +# Access with Clipboard::IsTestingPrefEnabled(). +- name: dom.events.testing.asyncClipboard + type: bool + value: false + mirror: always + do_not_use_directly: true + +# Control whether `navigator.clipboard.readText()` is exposed to content. +- name: dom.events.asyncClipboard.readText + type: bool + value: true + mirror: always + do_not_use_directly: true + +# This pref controls whether or not the `protected` dataTransfer state is +# enabled. If the `protected` dataTransfer stae is disabled, then the +# DataTransfer will be read-only whenever it should be protected, and will not +# be disconnected after a drag event is completed. +- name: dom.events.dataTransfer.protected.enabled + type: bool + value: false + mirror: always + +# Whether to hide normal files (i.e. non-images) in dataTransfer inside +# the content process. +- name: dom.events.dataTransfer.mozFile.enabled + type: bool + value: true + mirror: always + +- name: dom.events.dataTransfer.imageAsFile.enabled + type: bool + value: false + mirror: always + +# User interaction timer interval, in ms +- name: dom.events.user_interaction_interval + type: uint32_t + value: 5000 + mirror: always + +# Whether to try to compress touchmove events on IPC layer. +- name: dom.events.compress.touchmove + type: bool + value: true + mirror: always + +# In addition to the above IPC layer compresison, allow touchmove +# events to be further coalesced in the child side after they +# are sent. +- name: dom.events.coalesce.touchmove + type: bool + value: true + mirror: always + +# Allow mousemove events to be coalesced in the child side after they are sent. +- name: dom.events.coalesce.mousemove + type: bool + value: true + mirror: always + +# Expose Window.TextEvent and make the builtin editors dispatch `textInput` +# event as a default action of `beforeinput`. +- name: dom.events.textevent.enabled + type: bool + value: true + mirror: always + +# Whether to expose test interfaces of various sorts +- name: dom.expose_test_interfaces + type: bool + value: false + mirror: always + +- name: dom.fetchKeepalive.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# The maximum number of pending fetch keepalive requests per browser instance +- name: dom.fetchKeepalive.total_request_limit + type: RelaxedAtomicUint32 + value: 500 + mirror: always + +# The maximum number of pending fetch keepalive requests per origin +- name: dom.fetchKeepalive.request_limit_per_origin + type: RelaxedAtomicUint32 + value: 250 + mirror: always + +- name: dom.fetchObserver.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether to set the incremental flag on the top level document's +# priority header +- name: dom.document_priority.incremental + type: RelaxedAtomicBool + value: true + mirror: always + +# Allow the content process to create a File from a path. This is allowed just +# on parent process, on 'file' Content process, or for testing. +- name: dom.file.createInChild + type: RelaxedAtomicBool + value: false + mirror: always + +# Support @autocomplete values for form autofill feature. +- name: dom.forms.autocomplete.formautofill + type: bool + value: false + mirror: always + +# Is support for HTMLElement.autocorrect enabled? +- name: dom.forms.autocorrect + type: bool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +# Only trusted submit event could trigger form submission. +- name: dom.forms.submit.trusted_event_only + type: bool + value: false + mirror: always + +# This pref just controls whether we format the number with grouping separator +# characters when the internal value is set or updated. It does not stop the +# user from typing in a number and using grouping separators. +- name: dom.forms.number.grouping + type: bool + value: false + mirror: always + +# The interval in milliseconds between two Escape key events where the second +# key event will exit fullscreen, even if it is consumed. +- name: dom.fullscreen.force_exit_on_multiple_escape_interval + type: uint32_t + value: 500 + mirror: always + +# Whether the Gamepad API is enabled +- name: dom.gamepad.enabled + type: bool + value: true + mirror: always + +# Is Gamepad Extension API enabled? +- name: dom.gamepad.extensions.enabled + type: bool + value: true + mirror: always + +# Is LightIndicator API enabled in Gamepad Extension API? +- name: dom.gamepad.extensions.lightindicator + type: bool + value: false + mirror: always + +# Is MultiTouch API enabled in Gamepad Extension API? +- name: dom.gamepad.extensions.multitouch + type: bool + value: false + mirror: always + +# Is Gamepad vibrate haptic feedback function enabled? +- name: dom.gamepad.haptic_feedback.enabled + type: bool + value: true + mirror: always + +- name: dom.gamepad.non_standard_events.enabled + type: bool + value: @IS_NOT_RELEASE_OR_BETA@ + mirror: always + +- name: dom.gamepad.test.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# W3C draft ImageCapture API +- name: dom.imagecapture.enabled + type: bool + value: false + mirror: always + +# The root margin for image lazy loading, defined as four (value, percentage) +# pairs. +- name: dom.image-lazy-loading.root-margin.top + type: float + value: 600 + mirror: always + +- name: dom.image-lazy-loading.root-margin.top.percentage + type: bool + value: false + mirror: always + +- name: dom.image-lazy-loading.root-margin.bottom + type: float + value: 600 + mirror: always + +- name: dom.image-lazy-loading.root-margin.bottom.percentage + type: bool + value: false + mirror: always + +- name: dom.image-lazy-loading.root-margin.left + type: float + value: 600 + mirror: always + +- name: dom.image-lazy-loading.root-margin.left.percentage + type: bool + value: false + mirror: always + +- name: dom.image-lazy-loading.root-margin.right + type: float + value: 600 + mirror: always + +- name: dom.image-lazy-loading.root-margin.right.percentage + type: bool + value: false + mirror: always + +# Enable indexedDB in private browsing mode with encryption +- name: dom.indexedDB.privateBrowsing.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# A pref that is used to slow down connection idle maintenance for testing +# purposes. +- name: dom.indexedDB.connectionIdleMaintenance.pauseOnConnectionThreadMs + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +# Whether or not indexedDB test mode is enabled. +- name: dom.indexedDB.testing + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether or not indexedDB experimental features are enabled. +- name: dom.indexedDB.experimental + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether or not indexedDB preprocessing is enabled. +- name: dom.indexedDB.preprocessing + type: RelaxedAtomicBool + value: false + mirror: always + +# A pref that is used to slow down database initialization for testing purposes. +- name: dom.indexedDB.databaseInitialization.pauseOnIOThreadMs + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +# How innerWidth / innerHeight return rounded or fractional sizes. +# +# 0 or others: Do not round at all. +# 1: Round. +# 2: Truncate. +# +# NOTE(emilio): Fractional sizes are not web-compatible, see the regressions +# from bug 1676843, but we want to expose the fractional sizes (probably in +# another API) one way or another, see [1], so we're keeping the code for the +# time being. +# +# [1]: https://github.com/w3c/csswg-drafts/issues/5260 +- name: dom.innerSize.rounding + type: uint32_t + value: 1 + mirror: always + +# Whether we conform to Input Events Level 1 or Input Events Level 2. +# true: conforming to Level 1 +# false: conforming to Level 2 +- name: dom.input_events.conform_to_level_1 + type: bool + value: true + mirror: always + +# Whether we allow BrowsingContextGroup to suspend input events +- name: dom.input_events.canSuspendInBCG.enabled + type: bool + value: false + mirror: always + +# The minimum number of ticks after page navigation +# that need to occur before user input events are allowed to be handled. +- name: dom.input_events.security.minNumTicks + type: uint32_t + value: 3 + mirror: always + +# The minimum elapsed time (in milliseconds) after page navigation +# for user input events are allowed to be handled. +- name: dom.input_events.security.minTimeElapsedInMS + type: uint32_t + value: 100 + mirror: always + +# By default user input handling delay is disabled (mostly) for testing , +# this is used for forcefully enable it for certain tests. +- name: dom.input_events.security.isUserInputHandlingDelayTest + type: bool + value: false + mirror: always + +# The maximum time (milliseconds) we reserve for handling input events in each +# frame. +- name: dom.input_event_queue.duration.max + type: uint32_t + value: 8 + mirror: always + +- name: dom.interactive_widget_default_resizes_visual + type: RelaxedAtomicBool + value: true + mirror: always + +# How often to check for CPOW timeouts (ms). CPOWs are only timed +# out by the hang monitor. +- name: dom.ipc.cpow.timeout + type: uint32_t + value: 500 + mirror: always + +#ifdef MOZ_ENABLE_FORKSERVER +- name: dom.ipc.forkserver.enable + type: bool +#if defined(MOZ_CODE_COVERAGE) || defined(MOZ_ASAN) || defined(MOZ_TSAN) || defined(MOZ_MSAN) || defined(MOZ_UBSAN) + value: false +#else + value: @IS_NIGHTLY_BUILD@ +#endif + mirror: once +#endif + +#ifdef MOZ_WIDGET_GTK +# +# Avoid the use of GTK in content processes if possible, by running +# them in headless mode, to conserve resources (e.g., connections to +# the X server). See the usage in `ContentParent.cpp` for the full +# definition of "if possible". +# +# This does not affect sandbox policies; content processes may still +# dynamically connect to the display server for, e.g., WebGL. +- name: dom.ipc.avoid-gtk + type: bool + value: true + mirror: always +#endif + +# Whether or not to collect a paired minidump when force-killing a +# content process. +- name: dom.ipc.tabs.createKillHardCrashReports + type: bool + value: @IS_NOT_RELEASE_OR_BETA@ + mirror: once + +# Enable e10s hang monitoring (slow script checking and plugin hang detection). +- name: dom.ipc.processHangMonitor + type: bool + value: true + mirror: once + +# Whether we report such process hangs +- name: dom.ipc.reportProcessHangs + type: RelaxedAtomicBool +# Don't report hangs in DEBUG builds. They're too slow and often a +# debugger is attached. +#ifdef DEBUG + value: false +#else + value: true +#endif + mirror: always + +# If true, disables non-required re-use of content processes. This can be used +# in tests to force a new process to be used whenever a process selection +# decision is made. Setting this pref can cause dom.ipc.processCount limits to +# be exceeded. +# WARNING: This will exceed even process limits for the extension or +# privilegedAbout remote types, which may lead to unexpected breakage! +# Should only be used for testing. +- name: dom.ipc.disableContentProcessReuse + type: bool + value: false + mirror: always + +# If non-zero, a grace delay (in milliseconds) during which unused content +# processes are kept available for re-use to avoid unnecessary process churn. +- name: dom.ipc.processReuse.unusedGraceMs + type: uint32_t + value: 0 + mirror: always + +# Process launch delay (in milliseconds). +- name: dom.ipc.processPrelaunch.delayMs + type: uint32_t +# This number is fairly arbitrary ... the intention is to put off +# launching another app process until the last one has finished +# loading its content, to reduce CPU/memory/IO contention. + value: 1000 + mirror: always + +- name: dom.ipc.processPrelaunch.startupDelayMs + type: uint32_t +# delay starting content processes for a short time after browser start +# to provide time for the UI to come up + value: 1000 + mirror: always + +# Process preallocation cache +# Only used in fission; in e10s we use 1 always +- name: dom.ipc.processPrelaunch.fission.number + type: uint32_t + value: 3 + mirror: always + +# Limit preallocated processes below this memory size (in MB) +- name: dom.ipc.processPrelaunch.lowmem_mb + type: uint32_t + value: 4096 + mirror: always + +- name: dom.ipc.processPriorityManager.enabled + type: bool + value: true + mirror: always + +- name: dom.ipc.processPriorityManager.testMode + type: bool + value: false + mirror: always + +- name: dom.ipc.processPriorityManager.backgroundPerceivableGracePeriodMS + type: uint32_t +#if defined(MOZ_WIDGET_ANDROID) + value: 3000 +#else + value: 0 +#endif + mirror: always + +- name: dom.ipc.processPriorityManager.backgroundGracePeriodMS + type: uint32_t +#if defined(MOZ_WIDGET_ANDROID) + value: 3000 +#else + value: 0 +#endif + mirror: always + +#ifdef XP_WIN +- name: dom.ipc.processPriorityManager.backgroundUsesEcoQoS + type: bool + value: false + mirror: always +#endif + +# Support for input type=month, type=week. By default, disabled. +- name: dom.forms.datetime.others + type: bool + value: @IS_ANDROID@ + mirror: always + +- name: dom.forms.always_allow_pointer_events.enabled + type: bool + value: true + mirror: always + +# Is support for key events and focus events on disabled elements enabled? +- name: dom.forms.always_allow_key_and_focus_events.enabled + type: bool + value: true + mirror: always + +# Whether to disable only the descendants or the parent fieldset element too +# Note that this still allows it to be selected by `:disable`. +- name: dom.forms.fieldset_disable_only_descendants.enabled + type: bool + value: true + mirror: always + +# Does mousewheel-scrolling over a focused or +# field cause the value to increase/decrease (rather +# than scrolling the page)? +- name: dom.input.number_and_range_modified_by_mousewheel + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether to allow or disallow web apps to cancel `beforeinput` events caused +# by MozEditableElement#setUserInput() which is used by autocomplete, autofill +# and password manager. +- name: dom.input_event.allow_to_cancel_set_user_input + type: bool + value: false + mirror: always + +# How long a content process can take before closing its IPC channel +# after shutdown is initiated. If the process exceeds the timeout, +# we fear the worst and kill it. +- name: dom.ipc.tabs.shutdownTimeoutSecs + type: RelaxedAtomicUint32 +#if !defined(DEBUG) && !defined(MOZ_ASAN) && !defined(MOZ_VALGRIND) && !defined(MOZ_TSAN) + value: 20 +#else + value: 0 +#endif + mirror: always + +# Whether a native event loop should be used in the content process. +- name: dom.ipc.useNativeEventProcessing.content + type: RelaxedAtomicBool +#if defined(XP_WIN) || defined(XP_MACOSX) + value: false +#else + value: true +#endif + mirror: always + +# If this is true, TextEventDispatcher dispatches keydown and keyup events +# even during composition (keypress events are never fired during composition +# even if this is true). +- name: dom.keyboardevent.dispatch_during_composition + type: bool + value: true + mirror: always + +# Enable/disable KeyboardEvent.initKeyEvent function +- name: dom.keyboardevent.init_key_event.enabled + type: bool + value: false + mirror: always + +# Enable/disable KeyboardEvent.initKeyEvent function in addons even if it's +# disabled. +- name: dom.keyboardevent.init_key_event.enabled_in_addons + type: bool + value: @IS_NOT_NIGHTLY_BUILD@ + mirror: always + +# If this is true, keypress events for non-printable keys are dispatched only +# for event listeners of the system event group in web content. +- name: dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content + type: bool + value: true + mirror: always + +# If this is true, "keypress" event's keyCode value and charCode value always +# become same if the event is not created/initialized by JS. +- name: dom.keyboardevent.keypress.set_keycode_and_charcode_to_same_value + type: bool + value: true + mirror: always + +# Whether "W3C Web Manifest" processing is enabled +- name: dom.manifest.enabled + type: bool + value: true + mirror: always + +# Enable mapped array buffer by default. +- name: dom.mapped_arraybuffer.enabled + type: bool + value: true + mirror: always + +# Autoplay Policy Detection https://w3c.github.io/autoplay/ +- name: dom.media.autoplay-policy-detection.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# WebCodecs API +- name: dom.media.webcodecs.enabled + type: RelaxedAtomicBool +#if defined(MOZ_WIDGET_ANDROID) + value: @IS_NIGHTLY_BUILD@ +#else + value: true +#endif + mirror: always + +# WebCodecs API - Image decoder +- name: dom.media.webcodecs.image-decoder.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Number of seconds of very quiet or silent audio before considering the audio +# inaudible. +- name: dom.media.silence_duration_for_audibility + type: AtomicFloat + value: 2.0f + mirror: always + +# Inform mozjemalloc that the foreground content processes can keep more dirty +# pages in memory. +- name: dom.memory.foreground_content_processes_have_larger_page_cache + type: bool + value: true + mirror: always + +# 0 no-op +# 1 free dirty mozjemalloc pages +# 2 trigger memory-pressure/heap-minimize +# 3 trigger memory-pressure/low-memory +- name: dom.memory.memory_pressure_on_background + type: uint32_t + value: 0 + mirror: always + +# Enable meta-viewport support in remote APZ-enabled frames. +- name: dom.meta-viewport.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Timeout clamp in ms for timeouts we clamp. +- name: dom.min_timeout_value + type: RelaxedAtomicInt32 + value: 4 + mirror: always + +# Timeout clamp in ms for background windows. +- name: dom.min_background_timeout_value + type: int32_t + value: 1000 + mirror: always + +# Timeout clamp in ms for background windows when throttling isn't enabled. +- name: dom.min_background_timeout_value_without_budget_throttling + type: int32_t + value: 1000 + mirror: always + +# Are missing-property use counters for certain DOM attributes enabled? +- name: dom.missing_prop_counters.enabled + type: bool + value: true + mirror: always + +# Whether to dispatch mutation events. +- name: dom.mutation_events.enabled + type: bool + value: true + mirror: always + +# Limit of location change caused by content scripts in a time span per +# BrowsingContext. This includes calls to History and Location APIs. +- name: dom.navigation.navigationRateLimit.count + type: uint32_t + value: 200 + mirror: always + +# Time span in seconds for location change rate limit. +- name: dom.navigation.navigationRateLimit.timespan + type: uint32_t + value: 10 + mirror: always + +# Whether to allow and element loads to be retargeted to an +# external application or download. +- name: dom.navigation.object_embed.allow_retargeting + type: bool + value: false + mirror: always + +# Whether the navigation API will be exposed. +- name: dom.navigation.webidl.enabled + type: RelaxedAtomicBool + value: false + mirror: always + do_not_use_directly: true + +# Network Information API +# This feature is not available on Firefox desktop. It exposes too much +# user information. Let's be consistent and disable it on Android. +# But let's keep it around in case it becomes necessary for webcompat +# reasons +# https://bugzilla.mozilla.org/show_bug.cgi?id=1637922 +- name: dom.netinfo.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether we should open noopener links in a new process. +- name: dom.noopener.newprocess.enabled + type: bool + value: true + mirror: always + +# Whether origin trials are enabled. +- name: dom.origin-trials.enabled + type: bool + value: true + mirror: always + +# Whether we use the test key to verify tokens. +- name: dom.origin-trials.test-key.enabled + type: bool + value: false + mirror: always + +# Origin trial state for "TestTrial". +# 0: normal, 1: always-enabled, 2: always-disabled +- name: dom.origin-trials.test-trial.state + type: RelaxedAtomicInt32 + value: 0 + mirror: always + +# Origin trial state for COEP: Credentialless. +# 0: normal, 1: always-enabled, 2: always-disabled +- name: dom.origin-trials.coep-credentialless.state + type: RelaxedAtomicInt32 + value: 0 + mirror: always + +# Origin trial state for Private Attribution +# 0: normal, 1: always-enabled, 2: always-disabled +- name: dom.origin-trials.private-attribution.state + type: RelaxedAtomicInt32 +#ifdef ANDROID + value: 2 +#else + value: 0 +#endif + mirror: always + +# Origin trial state for MLS +# 0: normal, 1: always-enabled, 2: always-disabled +- name: dom.origin-trials.mls.state + type: RelaxedAtomicInt32 + value: 0 + mirror: always + +# User pref to control whether Private Attribution +# information should be collected / submitted. +- name: dom.private-attribution.submission.enabled + type: bool + value: @IS_NOT_ANDROID@ + mirror: always + +# Is support for Window.paintWorklet enabled? +- name: dom.paintWorklet.enabled + type: bool + value: false + mirror: always + +# Enable/disable the PaymentRequest API +- name: dom.payments.request.enabled + type: bool + value: false + mirror: always + +# Whether a user gesture is required to call PaymentRequest.prototype.show(). +- name: dom.payments.request.user_interaction_required + type: bool + value: true + mirror: always + +# Time in milliseconds for PaymentResponse to wait for +# the Web page to call complete(). +- name: dom.payments.response.timeout + type: uint32_t + value: 5000 + mirror: always + +# Enable printing performance marks/measures to log +- name: dom.performance.enable_user_timing_logging + type: RelaxedAtomicBool + value: false + mirror: always + +# Enable notification of performance timing +- name: dom.performance.enable_notify_performance_timing + type: bool + value: false + mirror: always + +# Is support for PerformanceTiming.timeToContentfulPaint enabled? +- name: dom.performance.time_to_contentful_paint.enabled + type: bool + value: false + mirror: always + +# Is support for PerformanceTiming.timeToFirstInteractive enabled? +- name: dom.performance.time_to_first_interactive.enabled + type: bool + value: false + mirror: always + +# Is support for PerformanceTiming.timeToNonBlankPaint enabled? +- name: dom.performance.time_to_non_blank_paint.enabled + type: bool + value: false + mirror: always + +# Is support for Element.requestPointerLock enabled? +# This is added for accessibility purpose. When user has no way to exit +# pointer lock (e.g. no keyboard available), they can use this pref to +# disable the Pointer Lock API altogether. +- name: dom.pointer-lock.enabled + type: bool + value: true + mirror: always + +# re-SAB: Whether to allow postMessage of a SharedArrayBuffer if various +# preconditions related to COOP and COEP are met +- name: dom.postMessage.sharedArrayBuffer.withCOOP_COEP + type: bool + value: true + mirror: once + +# Overridden in all.js on RELEASE_OR_BETA in order to add the locked attribute. +- name: dom.postMessage.sharedArrayBuffer.bypassCOOP_COEP.insecure.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Should we speculatively prefetch dns for anchor elements on http documents +- name: dom.prefetch_dns_for_anchor_http_document + type: bool + value: true + mirror: always + +# Should we speculatively prefetch dns for anchor elements on https documents +- name: dom.prefetch_dns_for_anchor_https_document + type: bool + value: false + mirror: always + +# This currently only affects XHTML. For XUL the cache is always allowed. +- name: dom.prototype_document_cache.enabled + type: bool + value: true + mirror: always + +# Push +- name: dom.push.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Indicate the deprecated aesgcm support in PushManager.supportedContentEncodings. +# +# This does not affect actual aesgcm support, any new and existing subscriptions +# can still use aesgcm regardless of this pref. +- name: dom.push.indicate_aesgcm_support.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Preference that is primarily used for testing of problematic file paths. +# It can also be used for switching between different storage directories, but +# such feature is not officially supported. +- name: dom.quotaManager.storageName + type: String + value: "storage" + mirror: never + +# An upper limit for the "age" of an origin. Any origin which is older than the +# threshold is considered as unaccessed. That doesn't necessarily mean that +# such origins will be immediatelly archived. They will be archived only when +# dom.quotaManager.checkQuotaInfoLoadTime is true and loading of quota info +# takes a long time (dom.quotaManager.longQuotaInfoLoadTimeThresholdMs is used +# to decide what is a long quota info load time). +- name: dom.quotaManager.unaccessedForLongTimeThresholdSec + type: RelaxedAtomicUint32 + value: 33696000 # 13 months + mirror: always + +# Should we try to load origin information from the cache? +# See bug 1563023 for more details. +- name: dom.quotaManager.loadQuotaFromCache + type: RelaxedAtomicBool + value: true + mirror: always + +# Should we check build ID as part of the cache validation? +# When enabled, the cache is invalidated on any upgrade (or downgrade), +# ensuring that changes in how quota usage is calculated can't cause +# inconsistencies at the cost of a slower initialization. Currently, this +# should only be set to false in tests using a packaged profile that inherently +# includes a build id different from the building running the tests. In the +# future this may be set to false if we are confident that we have sufficiently +# thorough schema versioning. +- name: dom.quotaManager.caching.checkBuildId + type: RelaxedAtomicBool + value: true + mirror: always + +# Should we check quota info load time and eventually archive some unaccessed +# origins if loading of quota info takes a long time ? +- name: dom.quotaManager.checkQuotaInfoLoadTime + type: RelaxedAtomicBool + value: true + mirror: always + +# An upper limit for quota info load time, anything which takes longer than the +# threshold is considered as long quota info load time. +- name: dom.quotaManager.longQuotaInfoLoadTimeThresholdMs + type: RelaxedAtomicUint32 + value: 21000 # 21 seconds + mirror: always + +# Preference that users can set to override temporary storage smart limit +# calculation. +- name: dom.quotaManager.temporaryStorage.fixedLimit + type: RelaxedAtomicInt32 + value: -1 + mirror: always + +# Should we do lazy initialization of origins ? +# When enabled, origins for temporary storage are not initialized during +# temporary storage initialization, they are initialized lazily instead. +# If there are other origins in the group, they are initialized all together. +# This feature is currently still in development and experimental, not +# recommended for normal use yet. +- name: dom.quotaManager.temporaryStorage.lazyOriginInitialization + type: RelaxedAtomicBool + value: false + mirror: always + +# Should we trigger initialization of all temporary origins in the background? +# When enabled, temporary origins collected during temporary storage +# initialization are initialized in the background. The background +# initialization of temporary origins is always done for entire groups of +# origins to preserve consistency of quota checks related to the group limit. +# This feature is currently still in development and experimental, not +# recommended for normal use yet. +- name: dom.quotaManager.temporaryStorage.triggerOriginInitializationInBackground + type: RelaxedAtomicBool + value: false + mirror: always + +# A pref that is used to slow down origin operations for testing purposes. +- name: dom.quotaManager.originOperations.pauseOnIOThreadMs + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +# A pref that is used to slow down storage initialization for testing purposes. +- name: dom.quotaManager.storageInitialization.pauseOnIOThreadMs + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +# A pref that is used to slow down origin initialization for testing purposes. +- name: dom.quotaManager.originInitialization.pauseOnIOThreadMs + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +# A pref that is used to enable testing features. +- name: dom.quotaManager.testing + type: SequentiallyConsistentAtomicBool + value: false + mirror: always + +#if defined(XP_WIN) + # Preference that is used to set nsILocalFileWin::useDOSDevicePathSyntax + # attribute for all local file instances created by QuotaManager and its + # clients. The value of this preference is cached so changing the preference + # during runtime has no effect. + # See bug 1626846 for setting this to false by default. +- name: dom.quotaManager.useDOSDevicePathSyntax + type: RelaxedAtomicBool + value: true + mirror: always + do_not_use_directly: true + + # Preference that is used to enable the hack for overrriding xFullPathname in + # QuotaVFS. +- name: dom.quotaManager.overrideXFullPathname + type: RelaxedAtomicBool + value: true + mirror: always +#elif defined(XP_UNIX) + # Preference that is used to enable the overriding of Unix xFullPathname + # implementation in QuotaVFS. +- name: dom.quotaManager.overrideXFullPathnameUnix + type: RelaxedAtomicBool + value: true + mirror: always +#endif + +# How many times we should retry directory removal or renaming if access was +# denied? +- name: dom.quotaManager.directoryRemovalOrRenaming.maxRetries + type: RelaxedAtomicUint32 +#ifdef XP_WIN + value: 10 +#else + value: 0 +#endif + mirror: always + +# How long we should wait between retries (in milliseconds)? +- name: dom.quotaManager.directoryRemovalOrRenaming.delayMs + type: RelaxedAtomicUint32 + value: 200 + mirror: always + +#ifdef MOZ_BACKGROUNDTASKS +# Use a Background Task to delete files at shutdown. +- name: dom.quotaManager.backgroundTask.enabled + type: bool +#ifdef XP_MACOSX +# Needs to figure out how to prevent bug 1827486. + value: false +#else + value: true +#endif + mirror: never +#endif + +# A pref that specifies one or more failure categories to trigger artificial +# failures for testing purposes. Multiple categories can be combined using +# bitwise OR to represent various failure points within the code. +- name: dom.quotaManager.artificialFailure.categories + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +# A probability (0-100) used to determine the likelihood of triggering an +# artificial failure for testing purposes. This value is applied when the +# specified failure categories match to decide if the failure should occur. +- name: dom.quotaManager.artificialFailure.probability + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +# An error code used to trigger an artificial failure for testing purposes. +# This code is returned when the specified failure categories match and the +# failure is triggered based on the configured probability. +- name: dom.quotaManager.artificialFailure.errorCode + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +# Use to control to dump CheckedUnsafePtr creation stack and assignment stacks. +- name: dom.checkedUnsafePtr.dumpStacks.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# A pref that is used to slow down database initialization for testing purposes. +- name: dom.simpledb.databaseInitialization.pauseOnIOThreadMs + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +# Determines within what distance of a tick mark, in pixels, dragging an input +# range range will snap the range's value to that tick mark. By default, this is +# half the default width of the range thumb. +- name: dom.range_element.magnet_effect_threshold + type: float + value: 10.0f + mirror: always + +# Reporting API. +- name: dom.reporting.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +- name: dom.reporting.testing.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +- name: dom.reporting.featurePolicy.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +- name: dom.reporting.crash.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +- name: dom.reporting.header.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# In seconds. The timeout to remove not-active report-to endpoints. +- name: dom.reporting.cleanup.timeout + type: uint32_t + value: 3600 + mirror: always + +# Any X seconds the reports are dispatched to endpoints. +- name: dom.reporting.delivering.timeout + type: uint32_t + value: 5 + mirror: always + +# How many times the delivering of a report should be tried. +- name: dom.reporting.delivering.maxFailures + type: uint32_t + value: 3 + mirror: always + +# How many reports should be stored in the report queue before being delivered. +- name: dom.reporting.delivering.maxReports + type: uint32_t + value: 100 + mirror: always + +# Enable Screen Orientation lock +- name: dom.screenorientation.allow-lock + type: bool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +# Enable Screen Wake Lock API +- name: dom.screenwakelock.enabled + type: bool + value: true + mirror: always + +# Whether to enable the JavaScript start-up cache. This causes one of the first +# execution to record the bytecode of the JavaScript function used, and save it +# in the existing cache entry. On the following loads of the same script, the +# bytecode would be loaded from the cache instead of being generated once more. +- name: dom.script_loader.bytecode_cache.enabled + type: bool + value: true + mirror: always + +# Ignore the heuristics of the bytecode cache, and always record on the first +# visit. (used for testing purposes). + +# Choose one strategy to use to decide when the bytecode should be encoded and +# saved. The following strategies are available right now: +# * -2 : (reader mode) The bytecode cache would be read, but it would never +# be saved. +# * -1 : (eager mode) The bytecode would be saved as soon as the script is +# seen for the first time, independently of the size or last access +# time. +# * 0 : (default) The bytecode would be saved in order to minimize the +# page-load time. +# +# Other values might lead to experimental strategies. For more details, have a +# look at: ScriptLoader::ShouldCacheBytecode function. +- name: dom.script_loader.bytecode_cache.strategy + type: int32_t + value: 0 + mirror: always + +# Select which parse/delazification strategy should be used while parsing +# scripts off-main-thread. (see CompileOptions.h, DelazificationOption enum) +# +# 0: On-demand only. Delazification will be triggered only on the main thread +# before the execution of the function. +# +# 1: Compare on-demand delazification (= 0) with concurrent depth-first +# delazification (= 2). +# +# 2: Depth-first. Delazify all functions off-thread in the order of appearance +# in the source. +# +# 3: Large-first. Delazify all functions off-thread starting with the largest +# functions first, and the smallest as the last one to be delazified, where +# the size of function is measured in bytes between the start to the end of +# the function. +# +# 255: Parse everything eagerly, from the first parse. All functions are parsed +# at the same time as the top-level of a file. +- name: dom.script_loader.delazification.strategy + type: uint32_t + value: 255 + mirror: always + +# Maximum total size after which the delazification strategy, specified by +# `dom.script_loader.delazification.strategy`, is no longer applied, and the +# on-demand strategy is used by default. +# +# -1 disable the threshold, and delazification strategy is applied to all +# scripts. +# +# Default value is 10MB for utf8 scripts. +- name: dom.script_loader.delazification.max_size + type: int32_t + value: 10485760 + mirror: always + +# Minimum memory, in GB, required to enable delazification strategy, specified +# by `dom.script_loader.delazification.strategy`. Otherwise, the on-demand +# delazification strategy is used. +- name: dom.script_loader.delazification.min_mem + type: int32_t + value: 2 + mirror: always + +# Enable speculative off main thread parsing of external scripts as +# soon as they are fetched. +- name: dom.script_loader.external_scripts.speculative_omt_parse.enabled + type: bool + value: true + mirror: always + +# Speculatively compile non parser inserted scripts +- name: dom.script_loader.external_scripts.speculate_non_parser_inserted.enabled + type: bool + value: false + mirror: always + +# Speculatively compile async scripts +- name: dom.script_loader.external_scripts.speculate_async.enabled + type: bool + value: false + mirror: always + +# Speculatively compile link preload scripts +- name: dom.script_loader.external_scripts.speculate_link_preload.enabled + type: bool + value: false + mirror: always + +# Cache stencil across navigation +- name: dom.script_loader.navigation_cache + type: bool + value: false + mirror: always + +- name: dom.securecontext.allowlist_onions + type: bool + value: false + mirror: always + +# This pref enables the featurePolicy header support. +- name: dom.security.featurePolicy.header.enabled + type: bool + value: false + mirror: always + +- name: dom.security.featurePolicy.experimental.enabled + type: bool + value: false + mirror: always + +# Expose the 'featurePolicy' attribute in document and HTMLIFrameElement +- name: dom.security.featurePolicy.webidl.enabled + type: bool + value: false + mirror: always + +# Perform IPC based Principal vetting in ContentParent +- name: dom.security.enforceIPCBasedPrincipalVetting + type: RelaxedAtomicBool + value: true + mirror: always + +# For testing purposes only: Flipping this pref to true allows +# to skip the allowlist for about: pages and do not ship with a +# CSP and NS_ASSERT right away. +- name: dom.security.skip_about_page_csp_allowlist_and_assert + type: RelaxedAtomicBool + value: false + mirror: always + +# For testing purposes only: Flipping this pref to true allows +# to skip the assertion that every about page ships with a CSP. +- name: dom.security.skip_about_page_has_csp_assert + type: RelaxedAtomicBool + value: false + mirror: always + +# For testing purposes only: Flipping this pref to true allows +# to skip the assertion that HTML fragments (e.g. innerHTML) can +# not be used within chrome code or about: pages. +- name: dom.security.skip_html_fragment_assertion + type: RelaxedAtomicBool + value: false + mirror: always + +# For testing purposes only; Flipping this pref to true allows +# to skip the assertion that remote scripts can not be loaded +# in system privileged contexts. +- name: dom.security.skip_remote_script_assertion_in_system_priv_context + type: RelaxedAtomicBool + value: false + mirror: always + +# If and only if true, support for Trusted Types +# (https://w3c.github.io/trusted-types/dist/spec/) is enabled. +- name: dom.security.trusted_types.enabled + type: RelaxedAtomicBool + value: False + mirror: always + +# If true, all content requests will get upgraded to HTTPS:// +# (some Firefox functionality requests, like OCSP will not be affected) +- name: dom.security.https_only_mode + type: RelaxedAtomicBool + value: false + mirror: always + +# If true, all content requests in Private Browsing Mode will get +# upgraded to HTTPS://. (If dom.security.https_only_mode is set +# to true then this pref has no effect) +- name: dom.security.https_only_mode_pbm + type: RelaxedAtomicBool + value: false + mirror: always + +# If true, sends http background request for top-level sites to +# counter long timeouts. +- name: dom.security.https_only_mode_send_http_background_request + type: RelaxedAtomicBool + value: true + mirror: always + +# Time limit, in milliseconds, before sending the http background +# request for HTTPS-Only and HTTPS-First +- name: dom.security.https_only_fire_http_request_background_timer_ms + type: RelaxedAtomicUint32 + value: 3000 + mirror: always + +# If true, tries to break upgrade downgrade cycles where https-only tries +# to upgrad ethe connection, but the website tries to downgrade again. +- name: dom.security.https_only_mode_break_upgrade_downgrade_endless_loop + type: RelaxedAtomicBool + value: true + mirror: always + +# If true and HTTPS-only mode is enabled, requests +# to local IP addresses are also upgraded +- name: dom.security.https_only_mode.upgrade_local + type: RelaxedAtomicBool + value: false + mirror: always + +# If true and HTTPS-only mode is enabled, requests +# to .onion hosts are also upgraded +- name: dom.security.https_only_mode.upgrade_onion + type: RelaxedAtomicBool + value: false + mirror: always + +# WARNING: Don't ever update that pref manually! It is only used +# for telemetry purposes and allows to reason about retention of +# the pref dom.security.https_only_mode from above. +- name: dom.security.https_only_mode_ever_enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# WARNING: Don't ever update that pref manually! It is only used +# for telemetry purposes and allows to reason about retention of +# the pref dom.security.https_only_mode_pbm from above. +- name: dom.security.https_only_mode_ever_enabled_pbm + type: RelaxedAtomicBool + value: false + mirror: always + +# If true checks for secure www connections when https fails +# and gives the user suggestions on the error page +- name: dom.security.https_only_mode_error_page_user_suggestions + type: RelaxedAtomicBool + value: false + mirror: always + +# If true, top-level request will get upgraded to HTTPS and +# downgraded again if the request failed. +- name: dom.security.https_first + type: RelaxedAtomicBool + value: @IS_EARLY_BETA_OR_EARLIER@ + mirror: always + +# If true, HTTPS-First will upgrade non-default ports +- name: dom.security.https_first_for_custom_ports + type: RelaxedAtomicBool + value: false + mirror: always + +# If true, top-level requests in Private Browsing Mode will get +# upgraded to HTTPS. (If dom.security.https_first +# is set to true then this pref has no effect) +- name: dom.security.https_first_pbm + type: RelaxedAtomicBool + value: true + mirror: always + +# If true, top-level requests that are initiated from the address +# bar and with an empty scheme get upgraded to HTTPS +# with a fallback +- name: dom.security.https_first_schemeless + type: RelaxedAtomicBool + value: true + mirror: always + +# If true, will add a special temporary HTTPS-First exception for a site when a +# HTTPS-First upgrade fails. +- name: dom.security.https_first_add_exception_on_failure + type: RelaxedAtomicBool + value: true + mirror: always + +- name: dom.security.https_first_exception_lifetime + type: uint32_t + value: 7*24*60*60*1000 # 7 days in milliseconds + mirror: always + +- name: dom.security.unexpected_system_load_telemetry_enabled + type: bool + value: @IS_EARLY_BETA_OR_EARLIER@ + mirror: always + +# pref controls `Sanitizer` API being exposed +# https://wicg.github.io/sanitizer-api/ +- name: dom.security.sanitizer.enabled + type: bool + value: false + mirror: always + +# Pref that controls the Element.setHTML API idenpendetly of the sanitizer +# API. +- name: dom.security.setHTML.enabled + type: bool + value: false + mirror: always + +# Logs elements and attributes removed by the Sanitizer API to the console. +- name: dom.security.sanitizer.logging + type: bool + value: false + mirror: always + +# pref controls credential chooser UI for testing. When true, UI is not shown and +# either a credential with ID `wpt-pick-me` is selected, or none. +- name: dom.security.credentialmanagement.chooser.testing.enabled + type: bool + value: false + mirror: always + +# pref controls `identity` credentials being exposed +- name: dom.security.credentialmanagement.identity.enabled + type: bool + value: false + mirror: always + +# pref controls "heavyweight" network discoverable `identity` credentials being exposed +- name: dom.security.credentialmanagement.identity.heavyweight.enabled + type: bool + value: false + mirror: always + +# pref controls storable "lightweight" `identity` credentials being exposed +- name: dom.security.credentialmanagement.identity.lightweight.enabled + type: bool + value: false + mirror: always + +# pref controls `identity` credential UI for testing. When true, UI is not shown and +# the first option in the account and provider lists are chosen +- name: dom.security.credentialmanagement.identity.select_first_in_ui_lists + type: bool + value: false + mirror: always + +# pref controls `identity` credential platform behavior for testing. When true, +# the .well-known file check is not performed. +- name: dom.security.credentialmanagement.identity.test_ignore_well_known + type: bool + value: false + mirror: always + +# pref controls whether we should delay identity credential rejections at all +- name: dom.security.credentialmanagement.identity.reject_delay.enabled + type: bool + value: true + mirror: always + +# pref controls how long we should delay identity credential rejections if enabled +- name: dom.security.credentialmanagement.identity.reject_delay.duration_ms + type: uint32_t + value: 120000 + mirror: always + +# Enforce origin check whenever a content process tries to set a document URI +- name: dom.security.setdocumenturi + type: bool + value: true + mirror: always + +# Whether or not selection events on text controls are enabled. +- name: dom.select_events.textcontrols.selectionchange.enabled + type: bool + value: true + mirror: always + +- name: dom.select_events.textcontrols.selectstart.enabled + type: bool + value: false + mirror: always + +- name: dom.select.showPicker.enabled + type: bool + value: true + mirror: always + +- name: dom.send_after_paint_to_content + type: bool + value: false + mirror: always + +- name: dom.separate_event_queue_for_post_message.enabled + type: bool + value: true + mirror: always + +- name: dom.arena_allocator.enabled + type: bool + value: true + mirror: once + +- name: dom.serviceWorkers.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: dom.serviceWorkers.navigationPreload.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Mitigates ServiceWorker navigation faults by bypassing the ServiceWorker on +# navigation faults. This is more extensive than just resetting interception +# because we also mark the page as uncontrolled so that subresources will not +# go to the ServiceWorker either. +- name: dom.serviceWorkers.mitigations.bypass_on_fault + type: bool + value: true + mirror: always + +# Additional ServiceWorker navigation mitigation control to unregister the +# ServiceWorker after multiple faults are encountered. The mitigation is +# disabled when this is set to zero, otherwise this is the number of faults that +# need to occur for a specific ServiceWorker before it will be unregistered. +- name: dom.serviceWorkers.mitigations.navigation_fault_threshold + type: uint32_t + value: 3 + mirror: always + +# This is the group usage head room for service workers. +# The quota usage mitigation algorithm uses this preference to determine if the +# origin or also group data should be cleared or not. +# The default value is 400 MiB. +- name: dom.serviceWorkers.mitigations.group_usage_headroom_kb + type: uint32_t + value: 400 * 1024 + mirror: always + +- name: dom.serviceWorkers.testing.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether ServiceWorkerManager should persist the service worker +# registered by temporary installed extension (only meant to be used +# for testing purpose, to make it easier to test some particular scenario +# with a temporary installed addon, which doesn't need to be signed to be +# installed on release channel builds). +- name: dom.serviceWorkers.testing.persistTemporarilyInstalledAddons + type: RelaxedAtomicBool + value: false + mirror: always + +- name: dom.storage.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: dom.workers.pFetch.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: dom.workers.importScripts.enforceStrictMimeType + type: RelaxedAtomicBool + value: true + mirror: always + +- name: dom.workers.throttling.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +- name: dom.workers.serialized-sab-access + type: RelaxedAtomicBool + value: false + mirror: always + +# Enable stronger diagnostics on worker shutdown. +# If this is true, we will potentially run an extra GCCC when a worker should +# exit its DoRunLoop but holds any WorkerRef and we will MOZ_DIAGNOSTIC_ASSERT +# when during that extra GCCC such a WorkerRef is freed. +- name: dom.workers.GCCC_on_potentially_last_event + type: RelaxedAtomicBool +#if defined(FUZZING) || defined(DEBUG) + value: true +#else + value: false +#endif + mirror: always + +- name: dom.sitepermsaddon-provider.enabled + type: bool + value: @IS_NOT_ANDROID@ + mirror: always + +# Server-Sent Events +# Equal to the DEFAULT_RECONNECTION_TIME_VALUE value in nsEventSource.cpp +- name: dom.serverEvents.defaultReconnectionTime + type: RelaxedAtomicUint32 + value: 5000 # in milliseconds + mirror: always + +# Whether automatic storage access granting heuristics should be turned on. +- name: dom.storage_access.auto_grants + type: bool + value: true + mirror: always + +- name: dom.storage_access.auto_grants.delayed + type: bool + value: true + mirror: always + +# Storage-access API. +- name: dom.storage_access.enabled + type: bool + value: true + mirror: always + +# Forward-Declared Storage-access API. +- name: dom.storage_access.forward_declared.enabled + type: bool + value: false + mirror: always + +# How long the Forward-Declared Storage-access API allows between pair requests +# in seconds +- name: dom.storage_access.forward_declared.lifetime + type: uint32_t + value: 15 * 60 + mirror: always + +# The maximum number of origins that a given third-party tracker is allowed +# to have concurrent access to before the user is presented with a storage +# access prompt. Only effective when the auto_grants pref is turned on. +- name: dom.storage_access.max_concurrent_auto_grants + type: int32_t + value: 5 + mirror: always + +- name: dom.storage_access.frame_only + type: bool + value: true + mirror: always + +# Only grant storage access to secure contexts. +- name: dom.storage_access.dont_grant_insecure_contexts + type: RelaxedAtomicBool + value: true + mirror: always + +# Whether the File System API is enabled +- name: dom.fs.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Whether the WritableFileStream is enabled or disabled. +- name: dom.fs.writable_file_stream.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# A pref that is used to enable testing features. +- name: dom.fs.testing + type: SequentiallyConsistentAtomicBool + value: false + mirror: always + +# A pref that is used to slow down database initialization for testing purposes. +- name: dom.fs.databaseInitialization.pauseOnIOThreadMs + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +# LocalStorage data limit as determined by summing up the lengths of all string +# keys and values. This is consistent with the legacy implementation and other +# browser engines. This value should really only ever change in unit testing +# where being able to lower it makes it easier for us to test certain edge +# cases. Measured in KiBs. +- name: dom.storage.default_quota + type: RelaxedAtomicUint32 + # Only allow relatively small amounts of data since performance of the + # synchronous IO is very bad. We are enforcing simple per-origin quota only. + value: 5 * 1024 + mirror: always + +# Per-site quota for legacy LocalStorage implementation. +- name: dom.storage.default_site_quota + type: RelaxedAtomicUint32 + value: 25 * 1024 + mirror: always + +# Whether or not the unsupported legacy implemenation should be enabled. Please +# don't advertise this pref as a way for disabling LSNG. This pref is intended +# for internal testing only and will be removed in near future. Accidental +# disabling of LSNG can lead to a data loss in a combination with disabled +# shadow writes. Disabling of shadow writes is the initial step towards +# removing legacy implementation and will be done soon. +- name: dom.storage.enable_unsupported_legacy_implementation + type: RelaxedAtomicBool + value: false + mirror: always + do_not_use_directly: true + +# Whether the migration from unsupported legacy implementation is enabled. +- name: dom.storage.enable_migration_from_unsupported_legacy_implementation + type: RelaxedAtomicBool + value: false + mirror: always + +# The amount of snapshot peak usage which is attempted to be pre-incremented +# during snapshot creation. +- name: dom.storage.snapshot_peak_usage.initial_preincrement + type: RelaxedAtomicUint32 + value: 16384 + mirror: always + +# The amount of snapshot peak usage which is attempted to be pre-incremented +# during snapshot creation if the LocalStorage usage was already close to the +# limit (a fallback for dom.storage.snapshot_peak_usage.initial_preincrement). +- name: dom.storage.snapshot_peak_usage.reduced_initial_preincrement + type: RelaxedAtomicUint32 + value: 4096 + mirror: always + +# The amount of snapshot peak usage which is attempted to be pre-incremented +# beyond the specific values which are subsequently requested after snapshot +# creation. +- name: dom.storage.snapshot_peak_usage.gradual_preincrement + type: RelaxedAtomicUint32 + value: 4096 + mirror: always + +# The amount of snapshot peak usage which is attempted to be pre-incremented +# beyond the specific values which are subsequently requested after snapshot +# creation if the LocalStorage total usage was already close to the limit +# (a fallback for dom.storage.snapshot_peak_usage.gradual_preincrement). +- name: dom.storage.snapshot_peak_usage.reduced_gradual_preincrement + type: RelaxedAtomicUint32 + value: 1024 + mirror: always + +# How long between a snapshot becomes idle and when we actually finish the +# snapshot. This preference is only used when "dom.storage.snapshot_reusing" +# is true. +- name: dom.storage.snapshot_idle_timeout_ms + type: uint32_t + value: 5000 + mirror: always + +# Is support for Storage test APIs enabled? +- name: dom.storage.testing + type: SequentiallyConsistentAtomicBool + value: false + mirror: always + +# A pref that is used to slow down database initialization for testing purposes. +- name: dom.storage.databaseInitialization.pauseOnIOThreadMs + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +# A pref that is used to slow down request finalization for testing purposes. +- name: dom.storage.requestFinalization.pauseOnDOMFileThreadMs + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +# This enables the SVGPathSegment APIs +- name: dom.svg.pathSegment.enabled + type: bool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +# For area and anchor elements with target=_blank and no rel set to +# opener/noopener. +- name: dom.targetBlankNoOpener.enabled + type: bool + value: true + mirror: always + +# Is support for Selection.GetRangesForInterval enabled? +- name: dom.testing.selection.GetRangesForInterval + type: bool + value: false + mirror: always + +- name: dom.testing.structuredclonetester.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# To enable TestUtils interface on WPT +- name: dom.testing.testutils.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +- name: dom.text_fragments.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +- name: dom.textMetrics.actualBoundingBox.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: dom.textMetrics.baselines.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: dom.textMetrics.emHeight.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: dom.textMetrics.fontBoundingBox.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Time (in ms) that it takes to regenerate 1ms. +- name: dom.timeout.background_budget_regeneration_rate + type: RelaxedAtomicInt32 + value: 100 + mirror: always + +# Time (in ms) that it takes to regenerate 1ms. +- name: dom.timeout.foreground_budget_regeneration_rate + type: RelaxedAtomicInt32 + value: 1 + mirror: always + +# Maximum value (in ms) for the background budget. Only valid for +# values greater than 0. +- name: dom.timeout.background_throttling_max_budget + type: RelaxedAtomicInt32 + value: 50 + mirror: always + +# Maximum value (in ms) for the foreground budget. Only valid for +# values greater than 0. +- name: dom.timeout.foreground_throttling_max_budget + type: RelaxedAtomicInt32 + value: -1 + mirror: always + +# The maximum amount a timeout can be delayed by budget throttling. +- name: dom.timeout.budget_throttling_max_delay + type: RelaxedAtomicInt32 + value: 15000 + mirror: always + +# Turn on budget throttling by default. +- name: dom.timeout.enable_budget_timer_throttling + type: RelaxedAtomicBool + value: true + mirror: always + +# Should we defer timeouts and intervals while loading a page. Released +# on Idle or when the page is loaded. +- name: dom.timeout.defer_during_load + type: bool + value: true + mirror: always + +# Maximum amount of time in milliseconds consecutive setTimeout()/setInterval() +# callback are allowed to run before yielding the event loop. +- name: dom.timeout.max_consecutive_callbacks_ms + type: RelaxedAtomicUint32 + value: 4 + mirror: always + +# Maximum deferral time for setTimeout/Interval in milliseconds +- name: dom.timeout.max_idle_defer_ms + type: uint32_t + value: 10*1000 + mirror: always + +# Delay in ms from document load until we start throttling background timeouts. +- name: dom.timeout.throttling_delay + type: RelaxedAtomicInt32 + value: 30000 + mirror: always + +# UDPSocket API +- name: dom.udpsocket.enabled + type: bool + value: false + mirror: always + +# Whether to dump worker use counters +- name: dom.use_counters.dump.worker + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether to dump document use counters +- name: dom.use_counters.dump.document + type: bool + value: false + mirror: always + +# Whether to dump page use counters +- name: dom.use_counters.dump.page + type: bool + value: false + mirror: always + +# Time limit, in milliseconds, for user gesture transient activation. +- name: dom.user_activation.transient.timeout + type: uint32_t + value: 5000 + mirror: always + +# Whether to treat the clicks on scrollbars as user interaction with web content. +- name: dom.user_activation.ignore_scrollbars + type: bool + value: true + mirror: always + +# Whether to shim a Components object on untrusted windows. +- name: dom.use_components_shim + type: bool + value: @IS_NOT_NIGHTLY_BUILD@ + mirror: always + +- name: dom.vibrator.enabled + type: bool + value: false + mirror: always + +- name: dom.vibrator.max_vibrate_ms + type: RelaxedAtomicUint32 + value: 10000 + mirror: always + +- name: dom.vibrator.max_vibrate_list_len + type: RelaxedAtomicUint32 + value: 128 + mirror: always + +# Is support for View Transitions Level 1 enabled? +- name: dom.viewTransitions.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# Timeout for view transitions. +# TODO(emilio): Figure out the right time-out, Blink uses between 4 and 15 +# seconds. +- name: dom.viewTransitions.timeout-ms + type: uint32_t + value: 10000 + mirror: always + +# Is support for WebVR APIs enabled? +# Disabled everywhere, but not removed. +- name: dom.vr.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Should VR sessions always be reported as supported, without first +# checking for VR runtimes? This will prevent permission prompts +# from being suppressed on machines without VR runtimes and cause +# navigator.xr.isSessionSupported to always report that immersive-vr +# is supported. +- name: dom.vr.always_support_vr + type: RelaxedAtomicBool + value: false + mirror: always + +# Should AR sessions always be reported as supported, without first +# checking for AR runtimes? This will prevent permission prompts +# from being suppressed on machines without AR runtimes and cause +# navigator.xr.isSessionSupported to always report that immersive-ar +# is supported. +- name: dom.vr.always_support_ar + type: RelaxedAtomicBool + value: false + mirror: always + +# It is often desirable to automatically start vr presentation when +# a user puts on the VR headset. This is done by emitting the +# Window.vrdisplayactivate event when the headset's sensors detect it +# being worn. This can result in WebVR content taking over the headset +# when the user is using it outside the browser or inadvertent start of +# presentation due to the high sensitivity of the proximity sensor in some +# headsets, so it is off by default. +- name: dom.vr.autoactivate.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Minimum number of milliseconds that the browser will wait before +# attempting to poll again for connected VR controllers. The browser +# will not attempt to poll for VR controllers until it needs to use them. +- name: dom.vr.controller.enumerate.interval + type: RelaxedAtomicInt32 + value: 1000 + mirror: always + +# The threshold value of trigger inputs for VR controllers. +- name: dom.vr.controller_trigger_threshold + type: AtomicFloat + value: 0.1f + mirror: always + +# Minimum number of milliseconds that the browser will wait before +# attempting to poll again for connected VR displays. The browser +# will not attempt to poll for VR displays until it needs to use +# them, such as when detecting a WebVR site. +- name: dom.vr.display.enumerate.interval + type: RelaxedAtomicInt32 + value: 5000 + mirror: always + +# The number of milliseconds since last frame start before triggering a new +# frame. When content is failing to submit frames on time or the lower level +# VR platform APIs are rejecting frames, it determines the rate at which RAF +# callbacks will be called. +- name: dom.vr.display.rafMaxDuration + type: RelaxedAtomicUint32 + value: 50 + mirror: always + +# Minimum number of milliseconds the browser will wait before attempting +# to re-start the VR service after an enumeration returned no devices. +- name: dom.vr.external.notdetected.timeout + type: RelaxedAtomicInt32 + value: 60000 + mirror: always + +# Minimum number of milliseconds the browser will wait before attempting +# to re-start the VR service after a VR API (eg, OpenVR or Oculus) +# requests that we shutdown and unload its libraries. +# To ensure that we don't interfere with VR runtime software auto-updates, +# we will not attempt to re-load the service until this timeout has elapsed. +- name: dom.vr.external.quit.timeout + type: RelaxedAtomicInt32 + value: 10000 + mirror: always + +# Minimum number of milliseconds that the VR session will be kept +# alive after the browser and content no longer are using the +# hardware. If a VR multitasking environment, this should be set +# very low or set to 0. +- name: dom.vr.inactive.timeout + type: RelaxedAtomicInt32 + value: 5000 + mirror: always + +# Maximum number of milliseconds the browser will wait for content to call +# VRDisplay.requestPresent after emitting vrdisplayactivate during VR +# link traversal. This prevents a long running event handler for +# vrdisplayactivate from later calling VRDisplay.requestPresent, which would +# result in a non-responsive browser in the VR headset. +- name: dom.vr.navigation.timeout + type: RelaxedAtomicInt32 + value: 5000 + mirror: always + +# Oculus device +- name: dom.vr.oculus.enabled + type: RelaxedAtomicBool +#if defined(HAVE_64BIT_BUILD) && !defined(ANDROID) + # We are only enabling WebVR by default on 64-bit builds (Bug 1384459). + value: true +#else + # On Android, this pref is irrelevant. + value: false +#endif + mirror: always + +# When enabled, Oculus sessions may be created with the ovrInit_Invisible +# flag if a page is using tracking but not presenting. When a page +# begins presenting VR frames, the session will be re-initialized without +# the flag. This eliminates the "Firefox not responding" warnings in +# the headset, but might not be compatible with all versions of the Oculus +# runtime. +- name: dom.vr.oculus.invisible.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Minimum number of milliseconds after content has stopped VR presentation +# before the Oculus session is re-initialized to an invisible / tracking +# only mode. If this value is too high, users will need to wait longer +# after stopping WebVR presentation before automatically returning to the +# Oculus home interface. (They can immediately return to the Oculus Home +# interface through the Oculus HUD without waiting this duration) +# If this value is too low, the Oculus Home interface may be visible +# momentarily during VR link navigation. +- name: dom.vr.oculus.present.timeout + type: RelaxedAtomicInt32 + value: 500 + mirror: always + +# OpenVR device +- name: dom.vr.openvr.enabled + type: RelaxedAtomicBool +#if !defined(HAVE_64BIT_BUILD) && !defined(ANDROID) + # We are only enabling WebVR by default on 64-bit builds (Bug 1384459). + value: false +#elif defined(XP_WIN) || defined(XP_MACOSX) + # We enable OpenVR by default for Windows and macOS. + value: true +#else + # See Bug 1310663 (Linux). On Android, this pref is irrelevant. + value: false +#endif + mirror: always + +# OSVR device +- name: dom.vr.osvr.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Pose prediction reduces latency effects by returning future predicted HMD +# poses to callers of the WebVR API. This currently only has an effect for +# Oculus Rift on SDK 0.8 or greater. +- name: dom.vr.poseprediction.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Enable a separate process for VR module. +- name: dom.vr.process.enabled + type: bool +#if defined(XP_WIN) + value: true +#else + value: false +#endif + mirror: once + +- name: dom.vr.process.startup_timeout_ms + type: int32_t + value: 5000 + mirror: once + +# Puppet device, used for simulating VR hardware within tests and dev tools. +- name: dom.vr.puppet.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Starting VR presentation is only allowed within a user gesture or event such +# as VRDisplayActivate triggered by the system. dom.vr.require-gesture allows +# this requirement to be disabled for special cases such as during automated +# tests or in a headless kiosk system. +- name: dom.vr.require-gesture + type: RelaxedAtomicBool + value: true + mirror: always + +# Is support for WebXR APIs enabled? +- name: dom.vr.webxr.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Points in the native bounds geometry are required to be quantized +# sufficiently to prevent fingerprinting. The WebXR spec suggests +# quantizing to the nearest 5 centimeters. +- name: dom.vr.webxr.quantization + type: AtomicFloat + value: 0.05f + mirror: always + +#ifdef XP_WIN + # Control firing WidgetMouseEvent by handling Windows pointer messages or + # mouse messages. +- name: dom.w3c_pointer_events.dispatch_by_pointer_messages + type: bool + value: true + mirror: always + +- name: dom.w3c_pointer_events.scroll_by_pen.enabled + type: bool + value: true + mirror: always +#endif + +# If the value is >= 0, it will be used for max touch points in child processes. +- name: dom.maxtouchpoints.testing.value + type: int32_t + value: -1 + mirror: always + +# Maximum value of navigator.hardwareConcurrency. +- name: dom.maxHardwareConcurrency + type: RelaxedAtomicUint32 +#ifdef NIGHTLY_BUILD + value: 128 +#else + value: 16 +#endif + mirror: always + +# W3C pointer events draft. +- name: dom.w3c_pointer_events.implicit_capture + type: bool + value: true + mirror: always + +- name: dom.w3c_pointer_events.getcoalescedevents_only_in_securecontext + type: bool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +# In case Touch API is enabled, this pref controls whether to support +# ontouch* event handlers, document.createTouch, document.createTouchList and +# document.createEvent("TouchEvent"). +- name: dom.w3c_touch_events.legacy_apis.enabled + type: bool + value: @IS_ANDROID@ + mirror: always + +# W3C touch events +# 0 - disabled, 1 - enabled, 2 - autodetect +# Autodetection is currently only supported on Windows and GTK3 (and assumed on +# Android). +- name: dom.w3c_touch_events.enabled + type: int32_t +#if defined(XP_MACOSX) + value: 0 +#else + value: 2 +#endif + mirror: always + +# Is support for the Web Audio API enabled? +- name: dom.webaudio.enabled + type: bool + value: true + mirror: always + +- name: dom.webkitBlink.dirPicker.enabled + type: RelaxedAtomicBool + value: @IS_NOT_ANDROID@ + mirror: always + +# Whether allowing selection across the boundary +# between shadow DOM and light DOM. +# This is based on https://github.com/mfreed7/shadow-dom-selection +- name: dom.shadowdom.selection_across_boundary.enabled + type: bool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +# When this pref is enabled: +# - Shadow DOM is not pierced by default anymore +# - The method accepts optional CaretPositionFromPointOptions to allow piercing +# certain ShadowRoots +# +# https://drafts.csswg.org/cssom-view/#dom-document-caretpositionfrompoint +- name: dom.shadowdom.new_caretPositionFromPoint_behavior.enabled + type: bool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +# NOTE: This preference is used in unit tests. If it is removed or its default +# value changes, please update test_sharedMap_static_prefs.js accordingly. +- name: dom.webcomponents.shadowdom.report_usage + type: bool + value: false + mirror: always + +# Is support for Declarative ShadowDOM enabled? +- name: dom.webcomponents.shadowdom.declarative.enabled + type: bool + value: true + mirror: always + +# Is support for the Web GPU API enabled? +- name: dom.webgpu.enabled + type: RelaxedAtomicBool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +# Is support for the Web GPU API enabled on DOM workers? +- name: dom.webgpu.workers.enabled + type: RelaxedAtomicBool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +# Are WebGPU indirect draws enabled? +- name: dom.webgpu.indirect-draw.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Comma-separated list of wgpu backend names to permit in WebGPU adapters. +# +# If non-empty, this is parsed by `wgpu_core::instance::parse_backends_from_comma_list` to +# produce a `wgpu_types::Backends` bitset used to create a `wgpu_core::hub::Global`. As of +# 2023-3-22, recognized names are: +# +# "vulkan" | "vk" => Backends::VULKAN, +# "dx12" | "d3d12" => Backends::DX12, +# "dx11" | "d3d11" => Backends::DX11, +# "metal" | "mtl" => Backends::METAL, +# "opengl" | "gles" | "gl" => Backends::GL, +# "webgpu" => Backends::BROWSER_WEBGPU, +- name: dom.webgpu.wgpu-backend + type: DataMutexString + value: "" + mirror: always + rust: true + +- name: dom.webgpu.allow-present-without-readback + type: RelaxedAtomicBool +#if defined(XP_WIN) || defined(XP_MACOSX) + value: true +#else + value: false +#endif + mirror: always + +# For testing purposes, crash if we don't get a hardware adapter. +- name: dom.webgpu.testing.assert-hardware-adapter + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# Whether to pass labels to the hardware abstraction layer. This is only useful when +# inspecting a WebGPU workload in a GPU debugging tool like renderdoc. Enabling it +# exposes poorly tested driver API surfaces so it should not be enabled by default. +- name: dom.webgpu.hal-labels + type: bool + value: false + mirror: once + rust: true + +# Is support for HTMLInputElement.webkitEntries enabled? +- name: dom.webkitBlink.filesystem.enabled + type: bool + value: @IS_NOT_ANDROID@ + mirror: always + +# Whether the WebMIDI API is enabled +- name: dom.webmidi.enabled + type: bool + value: @IS_NOT_ANDROID@ + mirror: always + +# midi permission is addon-gated +- name: dom.webmidi.gated + type: bool + value: true + mirror: always + +- name: dom.webnotifications.allowcrossoriginiframe + type: RelaxedAtomicBool + value: false + mirror: always + +- name: dom.webnotifications.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: dom.webnotifications.privateBrowsing.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: dom.webnotifications.requireuserinteraction + type: RelaxedAtomicBool + value: true + mirror: always + +- name: dom.webnotifications.requireinteraction.enabled + type: RelaxedAtomicBool +#if defined(XP_WIN) + value: true +#else + value: @IS_NIGHTLY_BUILD@ +#endif + mirror: always + +- name: dom.webnotifications.silent.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: dom.webnotifications.vibrate.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Setting log level for notification modules. +# The value follows the enum ConsoleLogLevel in ConsoleInstance.webidl. +- name: dom.webnotifications.loglevel + type: String + value: Error + mirror: never + +- name: dom.worker.canceling.timeoutMilliseconds + type: RelaxedAtomicUint32 + value: 30000 # 30 seconds + mirror: always + +# Enables the dispatching of console log events from worker threads to the +# main-thread. +- name: dom.worker.console.dispatch_events_to_main_thread + type: RelaxedAtomicBool + value: true + mirror: always + +- name: dom.workers.testing.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# WebIDL test prefs. +- name: dom.webidl.test1 + type: bool + value: true + mirror: always +- name: dom.webidl.test2 + type: bool + value: true + mirror: always + +# WebShare API - exposes navigator.share() +- name: dom.webshare.enabled + type: bool +#ifdef XP_WIN + value: @IS_EARLY_BETA_OR_EARLIER@ +#else + value: false +#endif + mirror: always + +# WebShare API - allows WebShare without user interaction (for tests only). +- name: dom.webshare.requireinteraction + type: bool + value: true + mirror: always + +# Hide the confirm dialog when a POST request is reloaded. +- name: dom.confirm_repost.testing.always_accept + type: bool + value: false + mirror: always + +# Whether we should suspend inactive tabs or not +- name: dom.suspend_inactive.enabled + type: bool + value: @IS_ANDROID@ + mirror: always + +# The following three prefs control the maximum script run time before slow +# script warning. + +# Controls the time that a content script can run before showing a +# notification. +- name: dom.max_script_run_time + type: int32_t + value: 10 + mirror: always + +# Controls whether we want to wait for user input before surfacing notifying +# the parent process about a long-running script. +- name: dom.max_script_run_time.require_critical_input + type: bool +# On desktop, we don't want to annoy the user with a notification if they're +# not interacting with the browser. On Android however, we automatically +# terminate long-running scripts, so we want to make sure we don't get in the +# way of that by waiting for input. +#if defined(MOZ_WIDGET_ANDROID) + value: false +#else + value: true +#endif + mirror: always + +# Controls if a content script will be aborted on child process shutdown. +- name: dom.abort_script_on_child_shutdown + type: bool + value: true + mirror: always + +- name: dom.max_chrome_script_run_time + type: int32_t + value: 0 + mirror: always + +- name: dom.max_ext_content_script_run_time + type: int32_t + value: 5 + mirror: always + +# Let Resize Observer report the size of all fragments, and not just the +# first one, as per CSSWG resolution: +# https://github.com/w3c/csswg-drafts/issues/3673#issuecomment-467221565 +- name: dom.resize_observer.support_fragments + type: bool + value: false + mirror: always + +# Whether allowing using to move focus to root elements +- name: dom.disable_tab_focus_to_root_element + type: bool + value: true + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "editor" +#--------------------------------------------------------------------------- + +# Default background color of HTML editor. This is referred only when +# "editor.use_custom_colors" is set to `true`. +- name: editor.background_color + type: String + value: "#FFFFFF" + mirror: never + +# Delay to mask last input character in password fields. +# If negative value, to use platform's default behavior. +# If 0, no delay to mask password. +# Otherwise, password fields unmask last input character(s) during specified +# time (in milliseconds). +- name: editor.password.mask_delay + type: int32_t + value: -1 + mirror: always + +# Set to true when you test mask_delay of password editor. If this is set +# to true, "MozLastInputMasked" is fired when last input characters are +# masked by timeout. +- name: editor.password.testing.mask_delay + type: bool + value: false + mirror: always + +# How line breakers are treated in single line editor: +# * 0: Only remove the leading and trailing newlines. +# * 1: Remove the first newline and all characters following it. +# * 2: Replace newlines with spaces (default of Firefox). +# * 3: Remove newlines from the string. +# * 4: Replace newlines with commas (default of Thunderbird). +# * 5: Collapse newlines and surrounding white space characters and +# remove them from the string. +# Other values are treated as 1. +- name: editor.singleLine.pasteNewlines + type: int32_t + value: 2 + mirror: always + +# Whether user pastes should be truncated. +- name: editor.truncate_user_pastes + type: bool + value: true + mirror: always + +# When this is set to `true`, "editor.background_color" must be set, then, +# the value is treated as default background color of the HTML editor. +# If `false` and "browser.display.use_system_colors" is set to `true`, +# "browser.display.background_color" is used instead. +# Otherwise, no color is used as default background color. +# This pref is for Thunderbird and SeaMonkey. +- name: editor.use_custom_colors + type: bool + value: false + mirror: always + +# If this is set to `true`, CSS mode of style editor is enabled by default +# unless it's a mail editor. +# This pref is for Thunderbird and SeaMonkey. +- name: editor.use_css + type: bool + value: false + mirror: always + +# Whether enabling blink compatible white-space normalizer or keep using +# Gecko's traditional white-space normalizer. +- name: editor.white_space_normalization.blink_compatible + type: bool + value: false + mirror: always + +# General prefs for editor, indicating whether Gecko-specific editing UI is +# enabled by default. Those UIs are not implemented by any other browsers. So, +# only Firefox users can change some styles with them. This means that Firefox +# users may get unexpected result of some web apps if they assume that users +# cannot change such styles. +- name: editor.resizing.enabled_by_default + type: bool + value: false + mirror: always +- name: editor.inline_table_editing.enabled_by_default + type: bool + value: false + mirror: always +- name: editor.positioning.enabled_by_default + type: bool + value: false + mirror: always + +# Controls if a double click word selection also deletes one adjacent whitespace +# (if feasible). This mimics native behaviour on MacOS. +- name: editor.word_select.delete_space_after_doubleclick_selection + type: bool +#ifdef XP_MACOSX + value: true +#else + value: false +#endif + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "extensions." +#--------------------------------------------------------------------------- + +# Pref that enforces the use of web_accessible_resources for content loads. +# This behavior is default for MV3. The pref controls this for MV2. +- name: extensions.content_web_accessible.enabled + type: bool + value: false + mirror: always + +# Whether the InstallTrigger implementation should be enabled (or hidden and +# none of its methods available). +- name: extensions.InstallTriggerImpl.enabled + type: bool + value: false + mirror: always + +# Whether the InstallTrigger implementation should be enabled (or completely +# hidden), separate from InstallTriggerImpl because InstallTrigger is improperly +# used also for UA detection. +- name: extensions.InstallTrigger.enabled + type: bool + value: @IS_NOT_EARLY_BETA_OR_EARLIER@ + mirror: always + + +# Whether the background.service_worker in the extension manifest.json file +# is enabled. +# all.js locks the pref to false when MOZ_WEBEXT_WEBIDL_ENABLED is false. +- name: extensions.backgroundServiceWorker.enabled + type: bool + value: false + mirror: once + +# Maximum number of misspelled words in a text. +- name: extensions.spellcheck.inline.max-misspellings + type: int32_t + value: 500 + mirror: always + +# Whether the extensions can register a service worker on its own. +# NOTE: WebExtensions Framework ability to register a background service worker +# is not controlled by this pref, only the extension code ability to use +# navigator.serviceWorker.register is locked behind this pref. +- name: extensions.serviceWorkerRegister.allowed + type: RelaxedAtomicBool + value: false + mirror: always + +# When true, content scripts of MV2 extensions can run in blob:-documents without +# requiring match_origin_as_fallback to be set, to revert bug 1897113. +# TODO bug 1899134: Remove this pref. +- name: extensions.script_blob_without_match_origin_as_fallback + type: bool + value: false + mirror: always + +# Legacy behavior on filterResponse calls on intercepted sw script requests. +- name: extensions.filterResponseServiceWorkerScript.disabled + type: bool + value: false + mirror: always + +# This pref governs whether we run webextensions in a separate process (true) +# or the parent/main process (false) +- name: extensions.webextensions.remote + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether to expose the MockExtensionAPI test interface in tests. +# The interface MockExtensionAPI doesn't represent a real extension API, +# it is only available in test and does include a series of cases useful +# to test the API request handling without tying the unit test to a +# specific WebExtensions API. +- name: extensions.webidl-api.expose_mock_interface + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether to allow acccess to AddonManager to developer sites for testing +# NOTE: We'd like this to be a "hidden" pref once StaticPrefs supports it. +- name: extensions.webapi.testing + type: RelaxedAtomicBool + value: false + mirror: always + +# Automation-only pref to allow AddonManager over insecure protocols. +# NOTE: We'd like this to be a "hidden" pref once StaticPrefs supports it. +- name: extensions.webapi.testing.http + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether to expose the AddonManager web API. +- name: extensions.webapi.enabled + type: RelaxedAtomicBool + value: @IS_NOT_ANDROID@ + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "fission." +#--------------------------------------------------------------------------- + +# Whether to enable Fission in new windows by default. +# IMPORTANT: This preference should *never* be checked directly, since any +# session can contain a mix of Fission and non-Fission windows. Instead, +# callers should check whether the relevant nsILoadContext has the +# `useRemoteSubframes` flag set. +# Callers which cannot use `useRemoteSubframes` must use +# `Services.appinfo.fissionAutostart` or `mozilla::FissionAutostart()` to check +# whether fission is enabled by default. +- name: fission.autostart + type: bool + value: @IS_NOT_ANDROID@ + mirror: never + +# Disable storing the session history in the parent process, and accessing it +# over IPC from the child processes. +- name: fission.disableSessionHistoryInParent + type: bool + value: @IS_ANDROID@ + mirror: once + do_not_use_directly: true + +# If session history is stored in the parent process, enable bfcache for it. +- name: fission.bfcacheInParent + type: bool + value: true + mirror: always + do_not_use_directly: true + +# Allow renaming of processes from Private Windows to the eTLD+1 on nightly +# Setting this pref creates a privacy leak, but helps greatly with +# debugging. +- name: fission.processPrivateWindowSiteNames + type: bool + value: false + mirror: always + +# Allow renaming of process names to the eTLD+1 on all versions, NOT +# including processes from Private Windows +# Setting this pref creates a privacy leak, but helps greatly with +# debugging +- name: fission.processSiteNames + type: bool + value: false + mirror: always + +# Allow showing of current profile along with process names, NOT +# including processes from Private Windows +# Setting this pref creates a privacy leak, but helps greatly with +# debugging +- name: fission.processProfileName + type: bool + value: false + mirror: always + +# The strategy used to control how sites are isolated into separate processes +# when Fisison is enabled. This pref has no effect if Fission is disabled. +# See the `WebContentIsolationStrategy` enum in `ProcessIsolation.cpp`. +- name: fission.webContentIsolationStrategy + type: uint32_t + value: 1 + mirror: always + +# Time in seconds before a site loaded with the Cross-Origin-Opener-Policy +# header is no longer considered high-value and isolated in the "highValueCOOP" +# configuration. +- name: fission.highValue.coop.expiration + type: uint32_t + value: 2592000 # 30 days (in seconds) + mirror: always + +# Time in seconds before a site are considered high-value by the login detection +# service is no longer considered high-value and isolated in the "highValueHasSavedLogin" +# or "highValueIsLoggedIn" configuration. +- name: fission.highValue.login.expiration + type: uint32_t + value: 2592000 # 30 days (in seconds) + mirror: always + +# If true, capture login attemp, and add "highValueIsLoggedIn" permission to +# the permission manager no matter whether fission is enabled and +# WebContentIsolationStrateg is set to IsolateHighvalue. +- name: fission.highValue.login.monitor + type: bool + value: @IS_ANDROID@ + mirror: always + +# If true, do not send blocklisted preference values to the subprocess +- name: fission.omitBlocklistedPrefsInSubprocesses + type: RelaxedAtomicBool + value: true + mirror: always + +# If true, crash when a blocklisted preference is accessed in a subprocess +- name: fission.enforceBlocklistedPrefsInSubprocesses + type: RelaxedAtomicBool +#ifdef DEBUG + value: true +#else + value: false +#endif + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "font." +#--------------------------------------------------------------------------- + +# A value greater than zero enables font size inflation for +# pan-and-zoom UIs, so that the fonts in a block are at least the size +# that, if a block's width is scaled to match the device's width, the +# fonts in the block are big enough that at most the pref value ems of +# text fit in *the width of the device*. +# +# When both this pref and the next are set, the larger inflation is used. +- name: font.size.inflation.emPerLine + type: uint32_t + value: 0 + mirror: always + +# A value greater than zero enables font size inflation for +# pan-and-zoom UIs, so that if a block's width is scaled to match the +# device's width, the fonts in a block are at least the given font size. +# The value given is in twips, i.e., 1/20 of a point, or 1/1440 of an inch. +# +# When both this pref and the previous are set, the larger inflation is used. +- name: font.size.inflation.minTwips + type: uint32_t + value: 0 + mirror: always + +# In products with multi-mode pan-and-zoom and non-pan-and-zoom UIs, +# this pref forces font inflation to always be enabled in all modes. +# That is, any heuristics used to detect pan-and-zoom +# vs. non-pan-and-zoom modes are disabled and all content is treated +# as pan-and-zoom mode wrt font inflation. +# +# This pref has no effect if font inflation is not enabled through +# either of the prefs above. It has no meaning in single-mode UIs. +- name: font.size.inflation.forceEnabled + type: bool + value: false + mirror: always + +# In products with multi-mode pan-and-zoom and non-pan-and-zoom UIs, +# this pref disables font inflation in master-process contexts where +# existing heuristics can't be used determine enabled-ness. +# +# This pref has no effect if font inflation is not enabled through +# either of the prefs above. The "forceEnabled" pref above overrides +# this pref. +- name: font.size.inflation.disabledInMasterProcess + type: bool + value: false + mirror: always + +# Defines the font size inflation mapping intercept parameter. +# +# Font size inflation computes a minimum font size, m, based on +# other preferences (see font.size.inflation.minTwips and +# font.size.inflation.emPerLine, above) and the width of the +# frame in which the text resides. Using this minimum, a specified +# font size, s, is mapped to an inflated font size, i, using an +# equation that varies depending on the value of the font size +# inflation mapping intercept parameter, P. +# +# If the intercept parameter is negative, then the following mapping +# function is used: +# +# i = m + s +# +# If the intercept parameter is non-negative, then the mapping function +# is a function such that its graph meets the graph of i = s at the +# point where both i and s are (1 + P/2) * m for values of s that are +# large enough. This means that when s=0, i is always equal to m. +- name: font.size.inflation.mappingIntercept + type: int32_t + value: 1 + mirror: always + +# Since the goal of font size inflation is to avoid having to +# repeatedly scroll side to side to read a block of text, and there are +# a number of page layouts where a relatively small chunk of text is +# better off not being inflated according to the same algorithm we use +# for larger chunks of text, we want a threshold for an amount of text +# that triggers font size inflation. This preference controls that +# threshold. +# +# It controls the threshold used within an *approximation* of the +# number of lines of text we use. In particular, if we assume that +# each character (collapsing collapsible whitespace) has a width the +# same as the em-size of the font (when, normally, it's actually quite +# a bit smaller on average), this preference gives the percentage of a +# number of lines of text we'd need to trigger inflation. This means +# that a percentage of 100 means that we'd need a number of characters +# (we know the font size and the width) equivalent to one line of +# square text (which is actually a lot less than a real line of text). +# +# A value of 0 means there's no character length threshold. +- name: font.size.inflation.lineThreshold + type: uint32_t + value: 400 + mirror: always + +# This controls the percentage that fonts will be inflated, if font +# size inflation is enabled. Essentially, if we have a specified font +# size, s, and an inflated font size, i, this specifies that the ratio +# i/s * 100 should never exceed the value of this preference. In order +# for this preference to have any effect, its value must be greater +# than 100, since font inflation can never decrease the ratio i/s. +- name: font.size.inflation.maxRatio + type: uint32_t + value: 0 + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "full-screen-api." +#--------------------------------------------------------------------------- + +- name: full-screen-api.enabled + type: bool + value: true + mirror: always + +- name: full-screen-api.allow-trusted-requests-only + type: bool + value: true + mirror: always + +- name: full-screen-api.mouse-event-allow-left-button-only + type: bool + value: true + mirror: always + +- name: full-screen-api.exit-on.windowOpen + type: bool + value: true + mirror: always + +- name: full-screen-api.exit-on.windowRaise + type: bool + value: true + mirror: always + +- name: full-screen-api.pointer-lock.enabled + type: bool + value: true + mirror: always + +# whether to prevent the top level widget from going fullscreen +- name: full-screen-api.ignore-widgets + type: bool + value: false + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "fuzzing.". It's important that these can only be +# checked in fuzzing builds (when FUZZING is defined), otherwise you could +# enable the fuzzing stuff on your regular build which would be bad :) +#--------------------------------------------------------------------------- + +#ifdef FUZZING +- name: fuzzing.enabled + type: bool +#ifdef FUZZING_SNAPSHOT + value: true +#else + value: false +#endif + mirror: always + +- name: fuzzing.necko.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +- name: fuzzing.necko.http3 + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +#ifdef FUZZING_SNAPSHOT +- name: fuzzing.snapshot.enabled + type: RelaxedAtomicBool + value: true + mirror: always +#endif + +# This configures a virtual authenticator for WebAuthn. The value encodes the +# arguments to the WebDriver "Add Virtual Authenticator" extension command. +# Bits 0, 1, 2, and 3 encode "is_user_verified", "is_user_consenting", +# "has_user_verification", and "has_resident_key" in that order. Bit 5 encodes +# the transport, either "usb" (0) or "internal" (1). Bits 6 and 7 encode the +# protocol, either "ctap1/u2f" (1), "ctap2" (2), or "ctap2_1" (3). Note that +# the valid protocol values are non-zero---an authenticator will not be +# configured if this pref is set to zero. Changing this pref requires +# a restart. +- name: fuzzing.webauthn.authenticator_config + type: RelaxedAtomicUint32 + value: 0 + mirror: always + rust: true +#endif + +#--------------------------------------------------------------------------- +# Prefs starting with "general." +#--------------------------------------------------------------------------- + +- name: general.aboutConfig.enable + type: bool + value: true + mirror: always + +# Limits the depth of recursive conversion of data when opening +# a content to view. This is mostly intended to prevent infinite +# loops with faulty converters involved. +- name: general.document_open_conversion_depth_limit + type: uint32_t + value: 20 + mirror: always + +- name: general.smoothScroll + type: RelaxedAtomicBool + value: true + mirror: always + +# This pref and general.smoothScroll.stopDecelerationWeighting determine +# the timing function. +- name: general.smoothScroll.currentVelocityWeighting + type: AtomicFloat + value: 0.25 + mirror: always + +# To connect consecutive scroll events into a continuous flow, the animation's +# duration should be longer than scroll events intervals (or else the scroll +# will stop before the next event arrives - we're guessing the next interval +# by averaging recent intervals). +# This defines how much longer the duration is compared to the events +# interval (percentage). +- name: general.smoothScroll.durationToIntervalRatio + type: RelaxedAtomicInt32 + value: 200 + mirror: always + +- name: general.smoothScroll.lines + type: RelaxedAtomicBool + value: true + mirror: always + +- name: general.smoothScroll.lines.durationMaxMS + type: RelaxedAtomicInt32 + value: 150 + mirror: always + +- name: general.smoothScroll.lines.durationMinMS + type: RelaxedAtomicInt32 + value: 150 + mirror: always + +- name: general.smoothScroll.mouseWheel + type: RelaxedAtomicBool + value: true + mirror: always + +- name: general.smoothScroll.mouseWheel.durationMaxMS + type: RelaxedAtomicInt32 + value: 200 + mirror: always + +- name: general.smoothScroll.mouseWheel.durationMinMS + type: RelaxedAtomicInt32 + value: 50 + mirror: always + +- name: general.smoothScroll.other + type: RelaxedAtomicBool + value: true + mirror: always + +- name: general.smoothScroll.other.durationMaxMS + type: RelaxedAtomicInt32 + value: 150 + mirror: always + +- name: general.smoothScroll.other.durationMinMS + type: RelaxedAtomicInt32 + value: 150 + mirror: always + +- name: general.smoothScroll.pages + type: RelaxedAtomicBool + value: true + mirror: always + +- name: general.smoothScroll.pages.durationMaxMS + type: RelaxedAtomicInt32 + value: 150 + mirror: always + +- name: general.smoothScroll.pages.durationMinMS + type: RelaxedAtomicInt32 + value: 150 + mirror: always + +- name: general.smoothScroll.scrollbars + type: RelaxedAtomicBool + value: true + mirror: always + +- name: general.smoothScroll.scrollbars.durationMaxMS + type: RelaxedAtomicInt32 + value: 150 + mirror: always + +- name: general.smoothScroll.scrollbars.durationMinMS + type: RelaxedAtomicInt32 + value: 150 + mirror: always + +- name: general.smoothScroll.pixels + type: RelaxedAtomicBool + value: true + mirror: always + +- name: general.smoothScroll.pixels.durationMaxMS + type: RelaxedAtomicInt32 + value: 150 + mirror: always + +- name: general.smoothScroll.pixels.durationMinMS + type: RelaxedAtomicInt32 + value: 150 + mirror: always + +# This pref and general.smoothScroll.currentVelocityWeighting determine +# the timing function. +- name: general.smoothScroll.stopDecelerationWeighting + type: AtomicFloat + value: 0.4f + mirror: always + +# Alternative smooth scroll physics. ("MSD" = Mass-Spring-Damper) +- name: general.smoothScroll.msdPhysics.enabled + type: RelaxedAtomicBool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +- name: general.smoothScroll.msdPhysics.continuousMotionMaxDeltaMS + type: RelaxedAtomicInt32 + value: 120 + mirror: always + +- name: general.smoothScroll.msdPhysics.motionBeginSpringConstant + type: RelaxedAtomicInt32 + value: 1250 + mirror: always + +- name: general.smoothScroll.msdPhysics.slowdownMinDeltaMS + type: RelaxedAtomicInt32 + value: 12 + mirror: always + +- name: general.smoothScroll.msdPhysics.slowdownMinDeltaRatio + type: AtomicFloat + value: 1.3f + mirror: always + +- name: general.smoothScroll.msdPhysics.slowdownSpringConstant + type: RelaxedAtomicInt32 + value: 2000 + mirror: always + +- name: general.smoothScroll.msdPhysics.regularSpringConstant + type: RelaxedAtomicInt32 + value: 1000 + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "geo." +#--------------------------------------------------------------------------- + +# Is support for Navigator.geolocation enabled? +- name: geo.enabled + type: bool + value: true + mirror: always + +# Time, in milliseconds, to wait for the location provider to spin up. +- name: geo.timeout + type: int32_t + value: 6000 + mirror: always + +#ifdef MOZ_ENABLE_DBUS +# Whether to use Geoclue location provider (if available on the system). +- name: geo.provider.use_geoclue + type: bool + value: true + mirror: always + +# Whether to always provide high location accuracy, even if site +# doesn't actually request this level of accuracy. +# Almost no site correctly requests high accuracy so force it by default +# for compatibility with other geolocation providers. +- name: geo.provider.geoclue.always_high_accuracy + type: bool + value: true + mirror: always + +# Time in milliseconds after which geoclue will try to fallback to MLS if no +# location is received after successful start. +- name: geo.provider.geoclue.mls_fallback_timeout_ms + type: uint32_t + value: 5000 + mirror: always +#endif + +# If true, open system preferences for the user when geolocation is requested +# by the user but OS geolocation permission is not available. +- name: geo.prompt.open_system_prefs + type: bool + value: true + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "gfx." +#--------------------------------------------------------------------------- + +# Allow 24-bit colour when the hardware supports it. +- name: gfx.android.rgb16.force + type: bool + value: false + mirror: once + +- name: gfx.apitrace.enabled + type: bool + value: false + mirror: once + +- name: gfx.blithelper.precision + type: RelaxedAtomicUint32 + value: 2 # { 0: lowp, 1: mediump, 2: highp } + mirror: always + +- name: gfx.blithelper.lut-size.rgb.b + type: RelaxedAtomicUint32 + value: 15 + mirror: always +- name: gfx.blithelper.lut-size.rgb.g + type: RelaxedAtomicUint32 + value: 31 + mirror: always +- name: gfx.blithelper.lut-size.rgb.r + type: RelaxedAtomicUint32 + value: 31 + mirror: always + +- name: gfx.blithelper.lut-size.ycbcr.cb + type: RelaxedAtomicUint32 + value: 15 + mirror: always +- name: gfx.blithelper.lut-size.ycbcr.cr + type: RelaxedAtomicUint32 + value: 31 + mirror: always +- name: gfx.blithelper.lut-size.ycbcr.y + type: RelaxedAtomicUint32 + value: 31 + mirror: always + +# Nb: we ignore this pref on release and beta. +- name: gfx.blocklist.all + type: int32_t + value: 0 + mirror: once + +#if defined(XP_DARWIN) +- name: gfx.cairo_quartz_cg_layer.enabled + type: bool + value: true + mirror: always +#endif + +- name: gfx.canvas.accelerated + type: bool +#if defined(XP_MACOSX) || defined(XP_LINUX) && !defined(ANDROID) + value: true +#elif defined(MOZ_WIDGET_ANDROID) + value: true +#elif defined(XP_WIN) + value: true +#else + value: false +#endif + mirror: always + +# Whether to attempt to enable Accelerated Canvas2D regardless of blocklisting. +- name: gfx.canvas.accelerated.force-enabled + type: bool + value: false + mirror: always + +- name: gfx.canvas.accelerated.async-present + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.canvas.accelerated.cache-items + type: RelaxedAtomicUint32 + value: 8192 + mirror: always + +- name: gfx.canvas.accelerated.cache-size + type: RelaxedAtomicUint32 + value: 256 + mirror: always + +- name: gfx.canvas.accelerated.reserve-empty-cache + type: RelaxedAtomicUint32 + value: 36 + mirror: always + +- name: gfx.canvas.accelerated.max-draw-target-count + type: RelaxedAtomicUint32 + value: 200 + mirror: always + +- name: gfx.canvas.accelerated.max-size + type: RelaxedAtomicInt32 + value: 8192 + mirror: always + +- name: gfx.canvas.accelerated.min-size + type: RelaxedAtomicInt32 + value: 128 + mirror: always + +- name: gfx.canvas.accelerated.max-surface-size + type: RelaxedAtomicUint32 + value: 5280 + mirror: always + +- name: gfx.canvas.accelerated.shared-page-size + type: RelaxedAtomicUint32 + value: 1024 + mirror: always + +# The minimum number of frames before acting on performance profile info +- name: gfx.canvas.accelerated.profile-frames + type: RelaxedAtomicUint32 + value: 10 + mirror: always + +# The ratio of failed frames to total frames when to fall back from acceleration +- name: gfx.canvas.accelerated.profile-fallback-ratio + type: AtomicFloat + value: 0.3 + mirror: always + +# The ratio of cache misses at which to fail a profile frame +- name: gfx.canvas.accelerated.profile-cache-miss-ratio + type: AtomicFloat + value: 0.66 + mirror: always + +# The maximum size of the GPU path cache in MB. +- name: gfx.canvas.accelerated.gpu-path-size + type: RelaxedAtomicUint32 + value: 4 + mirror: always + +# The maximum allowed complexity of a GPU path. +- name: gfx.canvas.accelerated.gpu-path-complexity + type: RelaxedAtomicUint32 + value: 4000 + mirror: always + +# Whether to accelerate stroked paths by converting them to fill paths. +- name: gfx.canvas.accelerated.stroke-to-fill-path + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether to use aa-stroke to accelerate stroked paths. +- name: gfx.canvas.accelerated.aa-stroke.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Draws an indicator if acceleration is used. +- name: gfx.canvas.accelerated.debug + type: RelaxedAtomicBool + value: false + mirror: always + +# 0x7fff is the maximum supported xlib surface size and is more than enough for canvases. +- name: gfx.canvas.max-size + type: RelaxedAtomicInt32 + value: 0x7fff + mirror: always + +- name: gfx.canvas.remote + type: bool +#if defined(XP_WIN) + value: true +#else + value: false +#endif + mirror: once + +- name: gfx.canvas.remote.allow-in-parent + type: bool + value: false + mirror: once + +# Whether OffscreenCanvas can use remote canvas +- name: gfx.canvas.remote.allow-offscreen + type: RelaxedAtomicBool + value: true + mirror: always + +# How many worker threads spawned for remote canvas +# -1 - Calculate based on processor cores +# 0 - No worker threads spawned, will do work on CanvasRenderThread +# >0 - Create worker thread pool with given size +- name: gfx.canvas.remote.worker-threads + type: int32_t +#if defined(XP_WIN) + value: -1 +#else + value: 0 +#endif + mirror: once + +# Default size of the shmem buffers used for recording +- name: gfx.canvas.remote.default-buffer-size + type: RelaxedAtomicUint32 + value: 32 * 1024 + mirror: always + +# Maximum number of Default size shmem buffers to use +- name: gfx.canvas.remote.max_default_buffers + type: RelaxedAtomicUint32 + value: 256 + mirror: always + +# How many times to spin before waiting in remote canvas +- name: gfx.canvas.remote.max-spin-count + type: RelaxedAtomicUint32 + value: 500 + mirror: always + +# How long to wait in milliseconds for the next event while in a transaction +- name: gfx.canvas.remote.event-timeout-ms + type: RelaxedAtomicUint32 + value: 2 + mirror: always + +# How many times we have a spare buffer before we drop one +- name: gfx.canvas.remote.drop-buffer-limit + type: RelaxedAtomicUint32 + value: 100 + mirror: always + +# Delay in milliseconds to drop buffers when there have been no non-empty transactions +- name: gfx.canvas.remote.drop-buffer-milliseconds + type: RelaxedAtomicUint32 + value: 10000 + mirror: always + +- name: gfx.canvas.remote.use-draw-image-fast-path + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.canvas.remote.use-draw-image-fast-path-d3d + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.canvas.remote.recycle-used-data-surface + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.canvas.remote.use-canvas-translator-event + type: bool + value: true + mirror: once + +- name: gfx.canvas.willreadfrequently.enabled + type: bool +#if defined(XP_WIN) + value: false +#else + value: true +#endif + mirror: once + + +- name: gfx.color_management.display_profile + type: DataMutexString + value: "" + mirror: always # But be warned: We cache the result. + +- name: gfx.color_management.force_srgb + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.color_management.native_srgb + type: RelaxedAtomicBool +#if defined(XP_MACOSX) + value: true +#else + value: false +#endif + mirror: always + +- name: gfx.color_management.enablev4 + type: RelaxedAtomicBool + value: true + mirror: always + +# 0 = Off, 1 = Full, 2 = Tagged Images Only. +# See CMSMode in gfx/thebes/gfxPlatform.h. +- name: gfx.color_management.mode + type: RelaxedAtomicInt32 + value: 2 + mirror: always + +# The zero default here should match QCMS_INTENT_DEFAULT from qcms.h +- name: gfx.color_management.rendering_intent + type: RelaxedAtomicInt32 + value: 0 + mirror: always + +- name: gfx.color_management.rec709_gamma_as_srgb + type: RelaxedAtomicBool + value: true # Tragic backwards compat. + mirror: always + +- name: gfx.color_management.rec2020_gamma_as_rec709 + type: RelaxedAtomicBool + value: true # Match naive behavior, but hopefully we can stop soon! + mirror: always + +# Whether GL contexts can be migrated to a different GPU (to match the one the +# OS is using for composition). +# +# 0 = force disable migration +# 1 = use migration where in safe configurations (the default) +# 2 = force enable migration (for testing) +- name: gfx.compositor.gpu-migration + type: RelaxedAtomicInt32 + value: 1 + mirror: always + +- name: gfx.core-animation.tint-opaque + type: RelaxedAtomicBool + value: false + mirror: always + +#ifdef XP_DARWIN + # Create specialized video-only layers for video content in + # fullscreen windows. Consistently works well on Apple Silicon, + # some issues remain on Intel hardware. +- name: gfx.core-animation.specialize-video + type: RelaxedAtomicBool +#if defined(MOZ_AARCH64) + value: true +#else + value: false +#endif + mirror: always +#endif + +#if defined(XP_DARWIN) && defined(NIGHTLY_BUILD) + # Spoof the timing of the video sample instead of marking the untimed + # sample to be displayed immediately. +- name: gfx.core-animation.specialize-video.spoof-timing + type: RelaxedAtomicBool + value: false + mirror: always + + # Check that the sample has a color space and if it doesn't, log that + # and supply the default color space from the main display. +- name: gfx.core-animation.specialize-video.check-color-space + type: RelaxedAtomicBool + value: false + mirror: always + + # Log properties of the video surface, buffer, and format. +- name: gfx.core-animation.specialize-video.log + type: RelaxedAtomicBool + value: false + mirror: always +#endif + +#ifdef XP_DARWIN +- name: gfx.core-animation.low-power-telemetry-frames + type: int32_t + value: 600 + mirror: once +#endif + +#if defined(MOZ_WIDGET_ANDROID) + # Overrides the glClear color used when the surface origin is not (0, 0) + # Used for drawing a border around the content. +- name: gfx.compositor.override.clear-color.r + type: AtomicFloat + value: 0.0f + mirror: always + +- name: gfx.compositor.override.clear-color.g + type: AtomicFloat + value: 0.0f + mirror: always + +- name: gfx.compositor.override.clear-color.b + type: AtomicFloat + value: 0.0f + mirror: always + +- name: gfx.compositor.override.clear-color.a + type: AtomicFloat + value: 0.0f + mirror: always +#endif # defined(MOZ_WIDGET_ANDROID) + +- name: gfx.content.always-paint + type: RelaxedAtomicBool + value: false + mirror: always + +# Size in megabytes +- name: gfx.content.skia-font-cache-size + type: int32_t + value: 5 + mirror: once + +- name: gfx.device-reset.limit + type: int32_t + value: 10 + mirror: once + +- name: gfx.device-reset.threshold-ms + type: int32_t + value: -1 + mirror: once + + +# Whether to disable the automatic detection and use of direct2d. +- name: gfx.direct2d.disabled + type: bool + value: true + mirror: once + +# Whether to attempt to enable Direct2D regardless of automatic detection or +# blacklisting. +- name: gfx.direct2d.force-enabled + type: bool + value: false + mirror: once + +- name: gfx.direct2d.target-independent-rasterization.disabled + type: bool + value: false + mirror: once + +- name: gfx.direct3d11.reuse-decoder-device + type: bool + value: true + mirror: once +# Enable reuse decoder device even when it is blocked. +- name: gfx.direct3d11.reuse-decoder-device-force-enabled + type: bool + value: false + mirror: once + +- name: gfx.direct3d11.allow-keyed-mutex + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.direct3d11.use-double-buffering + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.direct3d11.enable-debug-layer + type: bool + value: false + mirror: once + +- name: gfx.direct3d11.break-on-error + type: bool + value: false + mirror: once + +- name: gfx.direct3d11.sleep-on-create-device + type: int32_t + value: 0 + mirror: once + +# Rate by which the frame rate is divided. I.e. at a number higher than 1 we +# will only refresh every frames. +- name: gfx.display.frame-rate-divisor + type: RelaxedAtomicInt32 + value: 1 + mirror: always + +- name: gfx.display.max-frame-rate + type: RelaxedAtomicInt32 + value: 0 + mirror: always + +# Whether to disable downloadable font cache so that behavior is consistently +# the uncached load behavior across pages (useful for testing reflow problems) +- name: gfx.downloadable_fonts.disable_cache + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether to preserve color bitmap tables in fonts (bypassing OTS). +# Currently these are supported only on platforms where we use Freetype +# to render fonts (Linux/Gtk and Android). +- name: gfx.downloadable_fonts.keep_color_bitmaps + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether to validate OpenType variation tables in fonts. +- name: gfx.downloadable_fonts.validate_variation_tables + type: RelaxedAtomicBool + value: true + mirror: always + +# Whether OTS validation should be applied to OpenType Layout (OTL) tables. +- name: gfx.downloadable_fonts.otl_validation + type: RelaxedAtomicBool + value: @IS_NOT_RELEASE_OR_BETA@ + mirror: always + +- name: gfx.e10s.font-list.shared + type: bool + value: true + mirror: once + +# Do we fire a notification about missing fonts, so the front-end can decide +# whether to try and do something about it (e.g. download additional fonts)? +- name: gfx.missing_fonts.notify + type: RelaxedAtomicBool + value: false + mirror: always + +#if !defined(MOZ_WIDGET_ANDROID) +- name: gfx.egl.prefer-gles.enabled + type: bool +#if defined(MOZ_WIDGET_GTK) && defined(MOZ_AARCH64) + value: true +#else + value: false +#endif + mirror: once +#endif + +# [Windows] Whether registry FontSubstitutes entries are used unconditionally, +# or only if the original font is not available. +#if defined(XP_WIN) +- name: gfx.windows-font-substitutes.always + type: bool + value: false + mirror: once +#endif + +- name: gfx.font-list-omt.enabled + type: bool +#if defined(XP_MACOSX) + value: true +#else + value: false +#endif + mirror: once + +# [Android] OPPO, realme and OnePlus device seem to crash when using Font +# Match API. We turn off this feature on these devices. Set true if you want to +# turn on it at force. +#if defined(MOZ_WIDGET_ANDROID) +- name: gfx.font-list.use_font_match_api.force-enabled + type: bool + value: false + mirror: once +#endif + +# Whether to load fonts (e.g. Twemoji Mozilla) bundled with the application: +# -1 - Auto behavior based on OS version (currently, disables loading on +# "low-memory" Android devices) +# 0 - Skip loading any bundled fonts +# 1 - Always load bundled fonts +- name: gfx.bundled-fonts.activate + type: int32_t + value: -1 + mirror: once + +- name: gfx.font_loader.delay + type: RelaxedAtomicUint32 +#if defined(XP_WIN) + value: 60000 +#else + value: 8000 +#endif + mirror: always + +# Disable antialiasing of Ahem, for use in tests. +- name: gfx.font_rendering.ahem_antialias_none + type: RelaxedAtomicBool + value: false + mirror: always + +#if defined(XP_DARWIN) + # Set to true to revert from HarfBuzz AAT shaping to the old Core Text + # backend. +- name: gfx.font_rendering.coretext.enabled + type: RelaxedAtomicBool + value: false + mirror: always +#endif + +- name: gfx.font_rendering.colr_v1.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.font_rendering.opentype_svg.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +- name: gfx.font_rendering.fallback.async + type: RelaxedAtomicBool + value: true + mirror: always + +# whether to always search all font cmaps during system font fallback +- name: gfx.font_rendering.fallback.always_use_cmaps + type: RelaxedAtomicBool + value: false + mirror: always + +# whether to do font fallback for codepoints with General Category = Unassigned +- name: gfx.font_rendering.fallback.unassigned_chars + type: RelaxedAtomicBool + value: false + mirror: always + +#ifdef MOZ_WIDGET_GTK +- name: gfx.font_rendering.fontconfig.max_generic_substitutions + type: RelaxedAtomicUint32 + value: 3 + mirror: always +#endif + +#if defined(XP_WIN) +# Whether the DirectWrite bold simulation should be used when a bold font-weight +# is requested but no bold face available in the family. This renders poorly with +# some third-party fonts, so by default we disable it for webfonts and allow it +# only with locally-installed fonts. +# Values: +# 0 - never use DWrite bold simulation; always multi-strike instead +# 1 - use DWrite bold for installed fonts, multi-strike for webfont resources +# 2 - use DWrite bold for all fonts +- name: gfx.font_rendering.directwrite.bold_simulation + type: RelaxedAtomicUint32 + value: 1 + mirror: always +#endif + +- name: gfx.font_rendering.graphite.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Cache shaped word results +- name: gfx.font_rendering.wordcache.charlimit + type: RelaxedAtomicUint32 + value: 32 + mirror: always + +# Cache shaped word results +- name: gfx.font_rendering.wordcache.maxentries + type: RelaxedAtomicUint32 + value: 10000 + mirror: always + +# The level of logging: +# - 0: no logging; +# - 1: adds errors; +# - 2: adds warnings; +# - 3 or 4: adds debug logging. +# If you set the value to 4, you will also need to set the environment +# variable MOZ_LOG to gfx:4. See mozilla/Logging.h for details. +- name: gfx.logging.level + type: RelaxedAtomicInt32 + value: mozilla::gfx::LOG_DEFAULT + mirror: always + include: mozilla/gfx/LoggingConstants.h + +- name: gfx.logging.crash.length + type: uint32_t + value: 16 + mirror: once + +# The maximums here are quite conservative, we can tighten them if problems show up. +- name: gfx.logging.texture-usage.enabled + type: bool + value: false + mirror: once + +- name: gfx.logging.peak-texture-usage.enabled + type: bool + value: false + mirror: once + +- name: gfx.logging.slow-frames.enabled + type: bool + value: false + mirror: once + +# Use gfxPlatform::MaxAllocSize instead of the pref directly. +- name: gfx.max-alloc-size + type: int32_t + value: (int32_t)0x7FFFFFFF + mirror: once + do_not_use_directly: true + +# Use gfxPlatform::MaxTextureSize instead of the pref directly. +- name: gfx.max-texture-size + type: int32_t + value: (int32_t)32767 + mirror: once + do_not_use_directly: true + +- name: gfx.offscreencanvas.shared-provider + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.offscreencanvas.snapshot-timeout-ms + type: int32_t + value: 10000 + mirror: always + +- name: gfx.omta.background-color + type: bool + value: true + mirror: always + +- name: gfx.partialpresent.force + type: RelaxedAtomicInt32 + value: 0 + mirror: always + +# SwapInterval +- name: gfx.swap-interval.glx + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.swap-interval.egl + type: RelaxedAtomicBool + mirror: always +#ifdef MOZ_WIDGET_ANDROID + value: true +#else + value: false +#endif + + +# Log severe performance warnings to the error console and profiles. +# This should be use to quickly find which slow paths are used by test cases. +- name: gfx.perf-warnings.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +#ifdef MOZ_X11 +# Whether to force using GLX over EGL. +- name: gfx.x11-egl.force-disabled + type: bool + value: false + mirror: once + +# Whether to force using EGL over GLX. +- name: gfx.x11-egl.force-enabled + type: bool + value: false + mirror: once + +- name: gfx.x11.glx_sgi_video_sync + type: bool + value: false + mirror: once +#endif + +- name: gfx.testing.device-fail + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.testing.device-reset + type: RelaxedAtomicInt32 + value: 0 + mirror: always + +# Meant to be used for tests only. If greater than 0 then we assert that the +# number of active render textures increases by this amount or less. +#ifdef DEBUG +- name: gfx.testing.assert-render-textures-increase + type: RelaxedAtomicInt32 + value: 0 + mirror: always +#endif + +- name: gfx.text.disable-aa + type: bool + value: false + mirror: once + +- name: gfx.text.subpixel-position.force-enabled + type: bool + value: false + mirror: once + +- name: gfx.text.subpixel-position.force-disabled + type: bool + value: false + mirror: once + +- name: gfx.use-iosurface-textures + type: bool + value: false + mirror: once + +- name: gfx.use-mutex-on-present + type: bool + value: false + mirror: once + +# Use SurfaceTextures as preferred backend for TextureClient/Host. +- name: gfx.use-surfacetexture-textures + type: bool + value: false + mirror: once + +- name: gfx.vsync.compositor.unobserve-count + type: int32_t + value: 10 + mirror: once + +- name: gfx.vsync.force-disable-waitforvblank + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.will-change.ignore-opacity + type: RelaxedAtomicBool + value: true + mirror: always + +# Should we override the blocklist to enable WebGPU? +- name: gfx.webgpu.ignore-blocklist + type: bool + value: false + mirror: once + +# Whether to use the WebRender hardware backend +- name: gfx.webrender.all + type: bool + value: false + mirror: once + +#ifdef XP_WIN +- name: gfx.webrender.force-angle + type: bool + value: true + mirror: once +#endif + +# WebRender is not enabled when there is no GPU process on window when +# WebRender uses ANGLE. It is for avoiding that WebGL and WebRender use ANGLE +# at once. But there is a case that we want to enable WebRender for testing. +#ifdef XP_WIN +- name: gfx.webrender.enabled-no-gpu-process-with-angle-win + type: bool + value: true + mirror: once +#endif + +- name: gfx.webrender.svg-filter-effects + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.webrender.svg-filter-effects.also-convert-css-filters + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.webrender.svg-filter-effects.also-use-for-docshell-fecolormatrix + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.webrender.svg-filter-effects.opacity + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.webrender.svg-filter-effects.toalpha + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.webrender.svg-filter-effects.feblend + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.webrender.svg-filter-effects.fecolormatrix + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.webrender.svg-filter-effects.fecomponenttransfer + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.webrender.svg-filter-effects.fecomposite + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.webrender.svg-filter-effects.feconvolvematrix + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.webrender.svg-filter-effects.fediffuselighting + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.webrender.svg-filter-effects.fedisplacementmap + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.webrender.svg-filter-effects.fedropshadow + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.webrender.svg-filter-effects.feflood + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.webrender.svg-filter-effects.fegaussianblur + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.webrender.svg-filter-effects.feimage + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.webrender.svg-filter-effects.femerge + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.webrender.svg-filter-effects.femorphology + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.webrender.svg-filter-effects.feoffset + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.webrender.svg-filter-effects.fespecularlighting + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.webrender.svg-filter-effects.fetile + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.webrender.svg-filter-effects.feturbulence + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.webrender.svg-images + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.webrender.svg-shapes + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gfx.webrender.debug.blob.paint-flashing + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.webrender.debug.enable-capture + type: bool + value: false + mirror: once + +- name: gfx.webrender.debug.dl.dump-parent + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.webrender.debug.dl.dump-content + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.webrender.debug.dl.dump-content-serialized + type: RelaxedAtomicBool + value: false + mirror: always + +# When true, we output warning messages when rejecting surface promotion +# when it has been requested. This is important for color correctness of +# wide color videos, as well as for GPU performance for all videos. +- name: gfx.webrender.debug.surface-promotion-logging + type: RelaxedAtomicBool + value: false + mirror: always + +#ifdef MOZ_WIDGET_GTK +- name: gfx.webrender.reject-software-driver + type: bool + value: true + mirror: once +#endif + +- name: gfx.webrender.debug.highlight-painted-layers + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.webrender.debug.slow-cpu-frame-threshold + type: AtomicFloat + value: 10.0 + mirror: always + +- name: gfx.webrender.late-scenebuild-threshold + type: RelaxedAtomicInt32 + value: 4 + mirror: always + +- name: gfx.webrender.max-filter-ops-per-chain + type: RelaxedAtomicUint32 + value: 64 + mirror: always + +- name: gfx.webrender.batching.lookback + type: uint32_t + value: 10 + mirror: always + +- name: gfx.webrender.blob-tile-size + type: uint32_t + value: 256 + mirror: always + +- name: gfx.webrender.batched-upload-threshold + type: int32_t +#if defined(MOZ_WIDGET_ANDROID) + value: 262144 +#else + value: 65536 +#endif + mirror: always + +- name: gfx.webrender.compositor + type: bool +#if defined(XP_WIN) || defined(XP_MACOSX) + value: true +#else + value: false +#endif + mirror: once + +#ifdef NIGHTLY_BUILD + # Keep this pref hidden on non-nightly builds to avoid people accidentally + # turning it on. +- name: gfx.webrender.layer-compositor + type: bool + value: false + mirror: once +#endif + +- name: gfx.webrender.scissored-cache-clears.enabled + type: bool + value: true + mirror: once + +- name: gfx.webrender.scissored-cache-clears.force-enabled + type: bool + value: false + mirror: once + +- name: gfx.webrender.compositor.force-enabled + type: bool + value: false + mirror: once + +- name: gfx.webrender.compositor.max_update_rects + type: uint32_t + value: 1 + mirror: once + +- name: gfx.webrender.compositor.surface-pool-size + type: uint32_t + value: 25 + mirror: once + +# Number of damage rects we can give to the compositor for a new frame with +# partial present. This controls whether partial present is used or not. +- name: gfx.webrender.max-partial-present-rects + type: uint32_t +#if defined(XP_WIN) || defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GTK) + value: 1 +#else + value: 0 +#endif + mirror: once + +# Whether or not we can reuse the buffer contents using the GL buffer age +# extension, if supported by the platform. This requires partial present +# to be used. +- name: gfx.webrender.allow-partial-present-buffer-age + type: bool + value: true + mirror: once + +# Whether or not we should force partial present on. +- name: gfx.webrender.force-partial-present + type: bool + value: false + mirror: once + +- name: gfx.webrender.enable-gpu-markers + type: bool +#ifdef DEBUG + value: true +#else + value: false +#endif + mirror: once + +- name: gfx.webrender.enable-item-cache + type: bool + value: true + mirror: once + +# Whether or not to fallback from WebRender to Software WebRender. +- name: gfx.webrender.fallback.software + type: bool + value: true + mirror: once + +#ifdef XP_WIN + # Use IDCompositionFilterEffect to color manage dcomp surfaces. +- name: gfx.webrender.dcomp.color-manage-with-filters + type: RelaxedAtomicBool + value: false + mirror: always + # Whether to use an overlay of hardware decoded video with DirectComposition +- name: gfx.webrender.dcomp-video-hw-overlay-win + type: bool + value: true + mirror: once + # Enable hardware decoded video overlay even when it is blocked. +- name: gfx.webrender.dcomp-video-hw-overlay-win-force-enabled + type: bool + value: false + mirror: once + # Whether to use a yuv video overlay layers with DirectComposition +- name: gfx.webrender.dcomp-video-yuv-overlay-win + type: bool + value: false + mirror: once +- name: gfx.webrender.dcomp-video-vp-scaling-win + type: bool + value: true + mirror: once + # Whether to use virtual surfaces, as opposed to each tile owning a surface. +- name: gfx.webrender.dcomp-use-virtual-surfaces + type: bool + value: true + mirror: once + # Whether to use an overlay of software decoded video with DirectComposition +- name: gfx.webrender.dcomp-video-sw-overlay-win + type: bool + value: true + mirror: once + # Enable software decoded video overlay even when it is blocked. +- name: gfx.webrender.dcomp-video-sw-overlay-win-force-enabled + type: bool + value: false + mirror: once +- name: gfx.webrender.dcomp-video-check-slow-present + type: RelaxedAtomicBool + value: true + mirror: always + # Force triple buffering in overlay's video swap chain +- name: gfx.webrender.dcomp-video-force-triple-buffering + type: RelaxedAtomicBool + value: false + mirror: always +- name: gfx.webrender.dcomp-video-swap-chain-present-interval-0 + type: RelaxedAtomicBool + value: false + mirror: always +- name: gfx.video.convert-yuv-to-nv12.image-host-win + type: RelaxedAtomicBool + value: true + mirror: always +#endif + +# Whether or not fallback to Software WebRender requires the GPU process. +- name: gfx.webrender.fallback.software.requires-gpu-process + type: bool + value: false + mirror: once + +- name: gfx.webrender.program-binary-disk + type: bool +#if defined(XP_WIN) || defined(ANDROID) + value: true +#else + value: false +#endif + mirror: once + +- name: gfx.webrender.use-optimized-shaders + type: bool + value: true + mirror: once + +- name: gfx.webrender.precache-shaders + type: bool + value: false + mirror: once + +# When gl debug message is a high severity message, forwward it to gfx critical +# note. +- name: gfx.webrender.gl-debug-message-critical-note + type: bool +#if defined(XP_WIN) && defined(NIGHTLY_BUILD) + value: true +#else + value: false +#endif + mirror: once + +# Enable printing gl debug messages +- name: gfx.webrender.gl-debug-message-print + type: bool + value: false + mirror: once + +#ifdef NIGHTLY_BUILD + # Keep this pref hidden on non-nightly builds to avoid people accidentally + # turning it on. +- name: gfx.webrender.panic-on-gl-error + type: bool + value: false + mirror: once +#endif + +#ifdef XP_WIN + # Enables display of performance debugging counters when DirectComposition + # is used. + # Performance counters are displayed on the top-right corner of the screen. +- name: gfx.webrender.debug.dcomp-counter + type: RelaxedAtomicBool + value: false + mirror: always + # Enables highlighting redraw regions of DCompositionVisual +- name: gfx.webrender.debug.dcomp-redraw-regions + type: RelaxedAtomicBool + value: false + mirror: always +#endif + +#ifdef XP_DARWIN + # Files show up in $HOME/Desktop/nativelayerdumps-PID/frame-123.html +- name: gfx.webrender.debug.dump-native-layer-tree-to-file + type: RelaxedAtomicBool + value: false + mirror: always +#endif + +- name: gfx.webrender.enable-low-priority-pool + type: RelaxedAtomicBool +#if defined(ANDROID) + value: false +#else + value: true +#endif + mirror: always + + # Force subpixel anti-aliasing as much as possible, despite performance cost. +- name: gfx.webrender.quality.force-subpixel-aa-where-possible + type: bool + value: false + mirror: always + +- name: gfx.webrender.enable-subpixel-aa + type: bool + mirror: once +#ifdef MOZ_WIDGET_ANDROID + value: false +#else + value: true +#endif + +#ifdef XP_MACOSX +- name: gfx.webrender.enable-client-storage + type: bool + value: true + mirror: once +#endif + + # Width of WebRender tile size +- name: gfx.webrender.picture-tile-width + type: RelaxedAtomicInt32 + value: 1024 + mirror: always + + # Width of WebRender tile size +- name: gfx.webrender.picture-tile-height + type: RelaxedAtomicInt32 + value: 512 + mirror: always + +# WebRender upper bound for shared surface size +# According to apitrace, textures larger than 2048 break fast clear +# optimizations on some intel drivers. We sometimes need to go larger, but +# we try to avoid it. +- name: gfx.webrender.max-shared-surface-size + type: int32_t + value: 2048 + mirror: once + +# Whether to use EGL robustness or not. +- name: gfx.webrender.prefer-robustness + type: bool +#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) + value: true +#else + value: false +#endif + mirror: once + +# Whether to use the WebRender software backend +- name: gfx.webrender.software + type: bool + value: false + mirror: once + +# Whether to use the D3D11 RenderCompositor when using WebRender software backend +- name: gfx.webrender.software.d3d11 + type: bool + value: true + mirror: once + +- name: gfx.webrender.software.opengl + type: bool +#if defined(MOZ_WIDGET_ANDROID) + value: true +#else + value: false +#endif + mirror: once + +- name: gfx.webrender.software.d3d11.upload-mode + type: RelaxedAtomicInt32 + value: 4 + mirror: always + +# Whether to force widgets to don't support acceleration to use WebRender +# despite that +- name: gfx.webrender.unaccelerated-widget.force + type: RelaxedAtomicBool + value: false + mirror: always + +# Enable a lower quality, but higher performance pinch-zoom mode. Primarily +# for devices with weak GPUs, or when running SWGL. +- name: gfx.webrender.low-quality-pinch-zoom + type: bool +#if defined(MOZ_WIDGET_ANDROID) && defined(NIGHTLY_BUILD) + value: true +#else + value: false +#endif + mirror: once + +# Disable wait of GPU execution completion +- name: gfx.webrender.wait-gpu-finished.disabled + type: bool +#if defined(XP_WIN) + value: true +#else + value: false +#endif + mirror: once + +# Enable VideoProcessor Super Resolution for video overlay +- name: gfx.webrender.overlay-vp-super-resolution + type: bool +#if defined(XP_WIN) + value: true +#else + value: false +#endif + mirror: once + +# Enable VideoProcessor-HDR on SDR content for video overlay +- name: gfx.webrender.overlay-vp-auto-hdr + type: bool +#if defined(XP_WIN) + value: true +#else + value: false +#endif + mirror: once + +# Enable a dedicated arena on frame builder threads. +- name: gfx.webrender.frame-builder-thread-local-arena + type: bool + rust: true + value: false + mirror: once + +# Enable a dedicated arena on scene builder threads. +- name: gfx.webrender.scene-builder-thread-local-arena + type: bool + rust: true + value: false + mirror: once + +# Enable a dedicated arena on WebRender worker threads. +- name: gfx.webrender.worker-thread-local-arena + type: bool + rust: true + value: true + mirror: once + +# Use vsync events generated by hardware +- name: gfx.work-around-driver-bugs + type: bool + value: true + mirror: once + +- name: gfx.ycbcr.accurate-conversion + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.remote-texture.recycle.disabled + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gfx.remote-texture.wait-owner-at-image-host + type: RelaxedAtomicBool + value: false + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "gl." (OpenGL) +#--------------------------------------------------------------------------- + +- name: gl.allow-high-power + type: RelaxedAtomicBool + value: true + mirror: always + +- name: gl.ignore-dx-interop2-blacklist + type: RelaxedAtomicBool + value: false + mirror: always + +- name: gl.use-tls-is-current + type: RelaxedAtomicInt32 + value: 0 + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "html5." +#--------------------------------------------------------------------------- + +# Time in milliseconds between the time a network buffer is seen and the timer +# firing when the timer hasn't fired previously in this parse in the +# off-the-main-thread HTML5 parser. +- name: html5.flushtimer.initialdelay + type: RelaxedAtomicInt32 + value: 16 + mirror: always + +# Time in milliseconds between the time a network buffer is seen and the timer +# firing when the timer has already fired previously in this parse. +- name: html5.flushtimer.subsequentdelay + type: RelaxedAtomicInt32 + value: 16 + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "idle_period." +#--------------------------------------------------------------------------- + +- name: idle_period.min + type: uint32_t + value: 3 + mirror: always + +- name: idle_period.during_page_load.min + type: uint32_t + value: 12 + mirror: always + +- name: idle_period.cross_process_scheduling + type: RelaxedAtomicBool + value: true + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "image." +#--------------------------------------------------------------------------- + +# The maximum size (in kB) that the aggregate frames of an animation can use +# before it starts to discard already displayed frames and redecode them as +# necessary. +- name: image.animated.decode-on-demand.threshold-kb + type: RelaxedAtomicUint32 + value: 20*1024 + mirror: always + +# The minimum number of frames we want to have buffered ahead of an +# animation's currently displayed frame. +- name: image.animated.decode-on-demand.batch-size + type: RelaxedAtomicUint32 + value: 6 + mirror: always + +# Whether we should recycle already displayed frames instead of discarding +# them. This saves on the allocation itself, and may be able to reuse the +# contents as well. Only applies if generating full frames. +- name: image.animated.decode-on-demand.recycle + type: bool + value: true + mirror: once + +# Resume an animated image from the last displayed frame rather than +# advancing when out of view. +- name: image.animated.resume-from-last-displayed + type: RelaxedAtomicBool + value: true + mirror: always + +# Maximum number of surfaces for an image before entering "factor of 2" mode. +# This in addition to the number of "native" sizes of an image. A native size +# is a size for which we can decode a frame without up or downscaling. Most +# images only have 1, but some (i.e. ICOs) may have multiple frames for the +# same data at different sizes. +- name: image.cache.factor2.threshold-surfaces + type: RelaxedAtomicInt32 + value: 4 + mirror: always + +# Maximum size of a surface in KB we are willing to produce when rasterizing +# an SVG. +- name: image.cache.max-rasterized-svg-threshold-kb + type: RelaxedAtomicInt32 + value: 200*1024 + mirror: always + +# The maximum size, in bytes, of the decoded images we cache. +- name: image.cache.size + type: int32_t + value: 5*1024*1024 + mirror: once + +# A weight, from 0-1000, to place on time when comparing to size. +# Size is given a weight of 1000 - timeweight. +- name: image.cache.timeweight + type: int32_t + value: 500 + mirror: once + +# Decode all images automatically on load, ignoring our normal heuristics. +- name: image.decode-immediately.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Decode all images synchronously, intended to be used for reftests. +- name: image.testing.decode-sync.enabled + type: bool + value: false + mirror: always + +# Whether we attempt to downscale images during decoding. +- name: image.downscale-during-decode.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Whether we use EXIF metadata for image density. +- name: image.exif-density-correction.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Whether EXIF density metadata is sanity checked against PixelXDimension and PixelYDimension +- name: image.exif-density-correction.sanity-check.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# The threshold for inferring that changes to an element's |src| +# attribute by JavaScript represent an animation, in milliseconds. If the |src| +# attribute is changing more frequently than this value, then we enter a +# special "animation mode" which is designed to eliminate flicker. Set to 0 to +# disable. +- name: image.infer-src-animation.threshold-ms + type: RelaxedAtomicUint32 + value: 2000 + mirror: always + +# Whether the network request priority should be adjusted according +# the layout and view frame position of each particular image. +- name: image.layout_network_priority + type: RelaxedAtomicBool + value: true + mirror: always + +# Chunk size for calls to the image decoders. +- name: image.mem.decode_bytes_at_a_time + type: uint32_t + value: 16384 + mirror: once + +# Discards inactive image frames and re-decodes them on demand from +# compressed data. +- name: image.mem.discardable + type: RelaxedAtomicBool + value: true + mirror: always + +# Discards inactive image frames of _animated_ images and re-decodes them on +# demand from compressed data. Has no effect if image.mem.discardable is false. +- name: image.mem.animated.discardable + type: bool + value: true + mirror: once + +# Enable extra information for debugging in the image memory reports. +- name: image.mem.debug-reporting + type: RelaxedAtomicBool + value: false + mirror: always + +# Force unmapping of unused shared surfaces after a timeout period or when we +# encounter virtual memory pressure. By default this is only enabled on 32-bit +# Firefox. +- name: image.mem.shared.unmap.force-enabled + type: bool + value: false + mirror: once + +# Minimum timeout to unmap shared surfaces since they have been last used, +# in milliseconds. +- name: image.mem.shared.unmap.min_expiration_ms + type: uint32_t + value: 60*1000 + mirror: once + +# Mininum size for shared surfaces to consider unmapping, in kilobytes. +- name: image.mem.shared.unmap.min_threshold_kb + type: uint32_t + value: 100 + mirror: once + +# How much of the data in the surface cache is discarded when we get a memory +# pressure notification, as a fraction. The discard factor is interpreted as a +# reciprocal, so a discard factor of 1 means to discard everything in the +# surface cache on memory pressure, a discard factor of 2 means to discard half +# of the data, and so forth. The default should be a good balance for desktop +# and laptop systems, where we never discard visible images. +- name: image.mem.surfacecache.discard_factor + type: uint32_t + value: 1 + mirror: once + +# Maximum size for the surface cache, in kilobytes. +- name: image.mem.surfacecache.max_size_kb + type: uint32_t + value: 2024 * 1024 + mirror: once + +# Minimum timeout for expiring unused images from the surface cache, in +# milliseconds. This controls how long we store cached temporary surfaces. +- name: image.mem.surfacecache.min_expiration_ms + type: uint32_t + value: 60*1000 + mirror: once + +# The surface cache's size, within the constraints of the maximum size set +# above, is determined as a fraction of main memory size. The size factor is +# interpreted as a reciprocal, so a size factor of 4 means to use no more than +# 1/4 of main memory. The default should be a good balance for most systems. +- name: image.mem.surfacecache.size_factor + type: uint32_t + value: 4 + mirror: once + +# Maximum size in kilobytes that we allow to allocate an imgFrame, meant for +# testing/fuzzing purposes. -1 disables this limit (there are other limits in +# place). +- name: image.mem.max_legal_imgframe_size_kb + type: RelaxedAtomicInt32 + value: -1 + mirror: always + +# Whether we record SVG images as blobs or not. +- name: image.svg.blob-image + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether to set the incremental attribute in the Priority header for images +- name: image.priority.incremental + type: RelaxedAtomicBool + value: true + mirror: always + +# Whether we attempt to decode AVIF images or not. +- name: image.avif.enabled + type: RelaxedAtomicBool +#if defined(MOZ_AV1) + value: true +#else + value: false +#endif + mirror: always + +# How strict we are in accepting/rejecting AVIF inputs according to whether they +# conform to the specification +# 0 = Permissive: accept whatever we can simply, unambiguously interpret +# 1 = Normal: reject violations of "shall" specification directives +# 2 = Strict: reject violations of "should" specification directives +- name: image.avif.compliance_strictness + type: RelaxedAtomicInt32 + value: 1 + mirror: always + +# Whether we apply container-level transforms like mirroring and rotation +- name: image.avif.apply_transforms + type: RelaxedAtomicBool + value: true + mirror: always + +# Whether we use dav1d (true) or libaom (false) to decode AVIF image +- name: image.avif.use-dav1d + type: RelaxedAtomicBool + value: true + mirror: always + +# Whether to allow decoding of animated AVIF sequences. +- name: image.avif.sequence.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Whether AVIF files containing sequences should be animated even when the +# major brand is set to 'avif'. +- name: image.avif.sequence.animate_avif_major_branded_images + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether we attempt to decode JXL images or not. +- name: image.jxl.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "intl." +#--------------------------------------------------------------------------- + +#ifdef XP_WIN + # Whether making Gecko TSF-aware or only working with IMM. TSF is a modern + # IME API set of Windows which replaces IMM APIs. Unless you can avoid the + # problem which you see with enabling TSF, you shouldn't change this pref + # to false since IMM handler is now not maintained nor tested with latest + # Windows. If you need to change this pref to false, please file a bug to + # . + # Restart required to apply this pref change. +- name: intl.tsf.enabled + type: bool + value: true + mirror: once + + # Whether Gecko creates or does not create native caret for legacy ATOK + # (2011 - 2015). +- name: intl.tsf.hack.atok.create_native_caret + type: bool + value: true + mirror: always + + # Without this my windows build crashes +- name: "intl.compare_against_brokered_complex_line_breaks" + type: bool + value: false + mirror: always + + # Whether Gecko returns available composition string rect or TS_E_NOLAYOUT + # from ITextStoreACP::GetTextExt() when the specified range is same as the + # range of composition string but some character rects in it are still + # dirty if and only if ATOK is active TIP. + # Note that this is ignored if active ATOK is or older than 2016 and + # create_native_caret is true. +- name: intl.tsf.hack.atok.do_not_return_no_layout_error_of_composition_string + type: bool + value: true + mirror: always + + # Whether Gecko sets input scope of ATOK to "search" or never does it. + # When "search" is set to the input scope, ATOK may stop their suggestions. + # To avoid it, turn this pref on, or changing the settings in ATOK. + # Note that if you enable this pref and you use the touch keyboard for touch + # screens, you cannot access some specific features for a "search" input + # field. +- name: intl.tsf.hack.atok.search_input_scope_disabled + type: bool + value: false + mirror: always + + # Whether Gecko returns caret rect before composition string or TS_E_NOLAYOUT + # from ITextStoreACP::GetTextExt() when the specified range is larger than + # composition start offset if and only if Free ChangJie is active TIP. +- name: intl.tsf.hack.free_chang_jie.do_not_return_no_layout_error + type: bool + value: true + mirror: always + + # Whether Gecko returns available composition string rect or TS_E_NOLAYOUT + # from ITextStoreACP::GetTextExt() when the specified range is same as the + # range of composition string but some character rects in it are still + # dirty if and only if Japanist 10 is active TIP. +- name: intl.tsf.hack.japanist10.do_not_return_no_layout_error_of_composition_string + type: bool + value: true + mirror: always + + # Whether Gecko returns previous character rect or TS_E_NOLAYOUT from + # ITfContextView::GetTextExt() when the specified range is the first + # character of selected clause of composition string if and only if Japanese TIP + # of Microsoft is active. +- name: intl.tsf.hack.ms_japanese_ime.do_not_return_no_layout_error_at_first_char + type: bool + value: true + mirror: always + + # Whether Gecko returns previous character rect or TS_E_NOLAYOUT from + # ITfContextView::GetTextExt() when the specified range is the caret of + # composition string if and only if Japanese TIP of Microsoft is active. +- name: intl.tsf.hack.ms_japanese_ime.do_not_return_no_layout_error_at_caret + type: bool + value: true + mirror: always + + # Whether Gecko returns caret rect before composition string or TS_E_NOLAYOUT + # from ITfContextView::GetTextExt() when the specified range is larger than + # composition start offset if and only Simplified Chinese TIP of Microsoft + # is active. +- name: intl.tsf.hack.ms_simplified_chinese.do_not_return_no_layout_error + type: bool + value: true + mirror: always + + # Whether Geckos hacks ITextStoreACP::QueryInsert() or not. The method should + # return new selection after specified length text is inserted at specified + # range. However, Microsoft Pinyin and Microsoft Wubi expect that the result + # is same as specified range. If following prefs are true, + # ITextStoreACP::QueryInsert() returns specified range only when one of the + # TIPs is active. +- name: intl.tsf.hack.ms_simplified_chinese.query_insert_result + type: bool + value: true + mirror: always + + # Whether Gecko returns caret rect before composition string or TS_E_NOLAYOUT + # from ITfContextView::GetTextExt() when the specified range is larger than + # composition start offset if and only Traditional Chinese TIP of Microsoft + # is active. +- name: intl.tsf.hack.ms_traditional_chinese.do_not_return_no_layout_error + type: bool + value: true + mirror: always + + # Whether Geckos hacks ITextStoreACP::QueryInsert() or not. The method should + # return new selection after specified length text is inserted at specified + # range. However, Microsoft ChangJie and Microsoft Quick expect that the + # result is same as specified range. If following prefs are true, + # ITextStoreACP::QueryInsert() returns specified range only when one of the + # TIPs is active. +- name: intl.tsf.hack.ms_traditional_chinese.query_insert_result + type: bool + value: true + mirror: always + + # Whether Gecko sets input scope of the URL bar to IS_DEFAULT when black + # listed IMEs are active or does not. If you use tablet mode mainly and you + # want to use touch keyboard for URL when you set focus to the URL bar, you + # can set this to false. Then, you'll see, e.g., ".com" key on the keyboard. + # However, if you set this to false, such IMEs set its open state to "closed" + # when you set focus to the URL bar. I.e., input mode is automatically + # changed to English input mode. + # Known buggy IME list: + # - Microsoft IME for Japanese + # - Google Japanese Input + # - Microsoft Bopomofo + # - Microsoft ChangJie + # - Microsoft Phonetic + # - Microsoft Quick + # - Microsoft New ChangJie + # - Microsoft New Phonetic + # - Microsoft New Quick + # - Microsoft Pinyin + # - Microsoft Pinyin New Experience Input Style + # - Microsoft Wubi + # - Microsoft IME for Korean (except on Win7) + # - Microsoft Old Hangul +- name: intl.ime.hack.set_input_scope_of_url_bar_to_default + type: bool + value: true + mirror: always + + # On Windows 10 Build 17643 (an Insider Preview build of RS5), Microsoft + # have fixed the caller of ITextACPStore::GetTextExt() to return + # TS_E_NOLAYOUT to TIP as-is, rather than converting to E_FAIL. + # Therefore, if TIP supports asynchronous layout computation perfectly, we + # can return TS_E_NOLAYOUT and TIP waits next OnLayoutChange() + # notification. However, some TIPs still have some bugs of asynchronous + # layout support. We keep hacking the result of GetTextExt() like running + # on Windows 10, however, there could be unknown TIP bugs if we stop + # hacking the result. So, user can stop checking build ID to make Gecko + # hack the result forcibly. +- name: intl.tsf.hack.allow_to_stop_hacking_on_build_17643_or_later + type: bool + value: @IS_EARLY_BETA_OR_EARLIER@ + mirror: always + + # If true, automatically extend selection to cluster boundaries when + # TSF/TIP requests to select from/by middle of a cluster. +- name: intl.tsf.hack.extend_setting_selection_range_to_cluster_boundaries + type: bool + value: @IS_NOT_EARLY_BETA_OR_EARLIER@ + mirror: always + + # Whether Gecko supports IMM even if TSF is enabled. This pref exists + # only for check TSF behavior of new versions. Therefore, users should + # not set this to false for daily use. +- name: intl.tsf.support_imm + type: bool + value: true + mirror: once + + # If true, TSF and TIP (IME) can retrieve URL of the document containing + # the focused element. When this is set to true, Gecko exposes the spec + # of the URL. + # And Gecko exposes only "http" and "https" URLs. E.g., "data", "blob", + # "file" URLs are never exposed. +- name: intl.tsf.expose_url.allowed + type: bool + value: true + mirror: always + + # If true, TSF and TIP (IME) can retrieve URL of the document containing + # the focused element in the private browsing mode too. +- name: intl.tsf.expose_url_in_private_browsing.allowed + type: bool + value: false + mirror: always + +#if defined(ENABLE_TESTS) + # If true, NS_GetComplexLineBreaks compares the line breaks produced in the + # content process using the Uniscribe line breaker, with those from a + # brokered call to the parent. +- name: intl.compare_against_brokered_complex_line_breaks + type: bool + value: false + mirror: always +#endif +#endif + +# If you use legacy Chinese IME which puts an ideographic space to composition +# string as placeholder, this pref might be useful. If this is true and when +# web contents forcibly commits composition (e.g., moving focus), the +# ideographic space will be ignored (i.e., commits with empty string). +- name: intl.ime.remove_placeholder_character_at_commit + type: bool + value: false + mirror: always + + +#if defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK) || defined(ANDROID) +# Whether text input without keyboard press nor IME composition should cause a +# set of composition events or not. E.g., when you use Emoji picker on macOS, +# it inserts an Emoji character directly. If set to true, `compositionstart`, +# `compositionupdate` and `compositionend` events will be fired, and the +# correspnding `beforeinput` events are not cancelable. Otherwise, if set to +# false, any user input events are not exposed to web apps but only +# `beforeinput` event is fired as "insert text" as a cancelable event. +- name: intl.ime.use_composition_events_for_insert_text + type: bool + value: false + mirror: always +#endif + +# If true, we use UAX14/29 compatible segmenter rules using ICU4X +- name: intl.icu4x.segmenter.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "javascript." +# +# NOTE: SpiderMonkey starts up before `mirror: once` preferences are sealed and +# we cannot use them (Bug 1698311). Instead, we use `mirror: always` +# prefs but mark as `do_not_use_directly` and `LoadStartupJSPrefs` will +# mirror them into SpiderMonkey. +#--------------------------------------------------------------------------- + +# The JavaScript JIT compilers. These are read once on startup so a browser may +# need to be restarted if toggling them. In general each subsequent JIT depends +# on the ones before it being enabled. +- name: javascript.options.blinterp + type: bool + value: true + mirror: always # LoadStartupJSPrefs + do_not_use_directly: true + +- name: javascript.options.baselinejit + type: bool + value: true + mirror: always # LoadStartupJSPrefs + do_not_use_directly: true + +- name: javascript.options.ion + type: bool + value: true + mirror: always # LoadStartupJSPrefs + do_not_use_directly: true + +# The irregexp JIT for regex evaluation. +- name: javascript.options.native_regexp + type: bool + value: true + mirror: always # LoadStartupJSPrefs + do_not_use_directly: true + +# Jit Hints Cache - An in-process cache for the +# content process to accelerate repeated baseline +# compilations +- name: javascript.options.jithints + type: bool + value: true + mirror: always # LoadStartupJSPrefs + do_not_use_directly: true + +# "Warm-up" thresholds at which we attempt to compile a script/function with +# the next JIT tier. +# +# NOTE: These must match JitOptions defaults. +- name: javascript.options.blinterp.threshold + type: int32_t + value: 10 + mirror: always # LoadStartupJSPrefs + do_not_use_directly: true + +- name: javascript.options.baselinejit.threshold + type: int32_t + value: 100 + mirror: always # LoadStartupJSPrefs + do_not_use_directly: true + +- name: javascript.options.ion.threshold + type: int32_t + value: 1500 + mirror: always # LoadStartupJSPrefs + do_not_use_directly: true + +#ifdef NIGHTLY_BUILD +# Experimental support for off-main-thread baseline compilation. +- name: javascript.options.experimental.baselinejit.offthread_compilation + type: bool + value: false + mirror: always # LoadStartupJSPrefs + do_not_use_directly: true +#endif + +# Enable off-main-thread Warp compilation. +- name: javascript.options.ion.offthread_compilation + type: bool + value: true + mirror: always # LoadStartupJSPrefs + do_not_use_directly: true + +#ifdef DEBUG + # Enable extra correctness checks in the JITs that are slow and only available + # in debug builds. +- name: javascript.options.jit.full_debug_checks + type: bool + value: false + mirror: always # LoadStartupJSPrefs + do_not_use_directly: true +#endif + +# Heuristic threshold for Warp/Ion to decide that too many bailouts are +# happening and an IonScript should be discarded. +# +# NOTE: This must match JitOptions defaults. +- name: javascript.options.ion.frequent_bailout_threshold + type: int32_t + value: 10 + mirror: always # LoadStartupJSPrefs + do_not_use_directly: true + +# A threshold for Warp to decide whether a function can be inlined. +# If the size of a function is smaller than this threshold, then it +# may be inlined. +# +# NOTE: These must match JitOptions defaults. +- name: javascript.options.inlining_bytecode_max_length + type: uint32_t + value: 130 + mirror: always + do_not_use_directly: true + +- name: javascript.options.compact_on_user_inactive + type: bool + value: true + mirror: always + +# No-op pref for testing the SpiderMonkey pref system. +- name: javascript.options.tests.uint32-pref + type: uint32_t + value: 1 + mirror: always + set_spidermonkey_pref: always + +# Enable fuse based destructuring +- name: javascript.options.destructuring_fuse + type: bool + value: true + mirror: always + set_spidermonkey_pref: startup + +# The default amount of time to wait from the user being idle to starting a +# shrinking GC. Measured in milliseconds. +- name: javascript.options.compact_on_user_inactive_delay + type: uint32_t +#ifdef NIGHTLY_BUILD + value: 15000 +#else + value: 300000 +#endif + mirror: always + +# Use the realm local dom alloc site. +- name: javascript.options.dom_alloc_site + type: bool + value: true + mirror: always + set_spidermonkey_pref: always + +# Use better error message when accessing property of null or undefined. +- name: javascript.options.property_error_message_fix + type: bool + value: @IS_NIGHTLY_OR_DEV_EDITION@ + mirror: always + set_spidermonkey_pref: startup + +# Support for weak references in JavaScript (WeakRef and FinalizationRegistry). +- name: javascript.options.weakrefs + type: bool + value: true + mirror: always + set_spidermonkey_pref: startup + +# Whether to expose the FinalizationRegistry.prototype.cleanupSome method. +- name: javascript.options.experimental.weakrefs.expose_cleanupSome + type: bool + value: false + mirror: always + set_spidermonkey_pref: startup + +# ShadowRealms: https://github.com/tc39/proposal-shadowrealm +- name: javascript.options.experimental.shadow_realms + # Atomic, as we assert the preference, and that assertion may happen + # in a worker. + type: RelaxedAtomicBool + value: false + mirror: always + # Non-startup pref because the WPT test harness sets prefs after startup. + set_spidermonkey_pref: always + +# Support for String.prototype.{is,to}WellFormed in JavaScript. +- name: javascript.options.well_formed_unicode_strings + type: bool + value: true + mirror: always + set_spidermonkey_pref: startup + +# Support for Object.groupBy/Map.groupBy in JavaScript. +- name: javascript.options.array_grouping + type: bool + value: true + mirror: always + set_spidermonkey_pref: startup + +# Experimental support for ArrayBuffer.prototype.transfer{,ToFixedLength}() in JavaScript. +- name: javascript.options.arraybuffer_transfer + type: bool + value: true + mirror: always + set_spidermonkey_pref: startup + +# Experimental support for New Set methods +- name: javascript.options.experimental.new_set_methods + type: bool + value: true + mirror: always + set_spidermonkey_pref: startup + +# Experimental support for resizable ArrayBuffers in JavaScript. +- name: javascript.options.experimental.arraybuffer_resizable + type: bool + value: true + mirror: always + set_spidermonkey_pref: startup + +# Experimental support for growable SharedArrayBuffers in JavaScript. +- name: javascript.options.experimental.sharedarraybuffer_growable + type: bool + value: true + mirror: always + set_spidermonkey_pref: startup + +# Experimental support for Duplicate Named Capture Groups in JavaScript. +- name: javascript.options.experimental.regexp_duplicate_named_groups + type: bool + value: true + mirror: always + set_spidermonkey_pref: startup + +# Experimental support for Float16Array in JavaScript. +- name: javascript.options.experimental.float16array + type: bool + value: true + mirror: always + set_spidermonkey_pref: startup + +# Experimental support for Pattern Modifiers in JavaScript. +- name: javascript.options.experimental.regexp_modifiers + type: bool + value: true + mirror: always + set_spidermonkey_pref: startup + +# Experimental support for Uint8Array base64/hex in JavaScript. +- name: javascript.options.experimental.uint8array_base64 + type: bool + value: true + mirror: always + set_spidermonkey_pref: startup + +# Experimental support for Promise.try in JavaScript. +- name: javascript.options.experimental.promise_try + type: bool + value: true + mirror: always + set_spidermonkey_pref: startup + +# Experimental support for RegExp.escape in JavaScript. +- name: javascript.options.experimental.regexp_escape + type: bool + value: true + mirror: always + set_spidermonkey_pref: startup + +#ifdef NIGHTLY_BUILD + # Experimental support for Async Iterator Helpers in JavaScript. +- name: javascript.options.experimental.async_iterator_helpers + type: bool + value: false + mirror: always + set_spidermonkey_pref: startup + + # Experimental support for Symbols as WeakMap keys in JavaScript. +- name: javascript.options.experimental.symbols_as_weakmap_keys + type: bool + value: false + mirror: always + set_spidermonkey_pref: startup + + # Experimental support for Import Assertions in JavaScript. +- name: javascript.options.experimental.import_attributes + type: bool + value: false + mirror: always + + # Experimental support for Error.isError in JavaScript. +- name: javascript.options.experimental.error_iserror + type: bool + value: false + mirror: always + set_spidermonkey_pref: always + + # Experimental support for Math.sumPrecise in JavaScript. +- name: javascript.options.experimental.math_sumprecise + type: bool + value: false + mirror: always + set_spidermonkey_pref: startup + + # Experimental support for Iterator.range in JavaScript. +- name: javascript.options.experimental.iterator_range + type: bool + value: false + mirror: always + set_spidermonkey_pref: startup + + # Experimental support for Joint Iteration in JavaScript. +- name: javascript.options.experimental.joint_iteration + type: bool + value: false + mirror: always + set_spidermonkey_pref: startup + + # Experimental support for Atomics.pause in JavaScript. +- name: javascript.options.experimental.atomics_pause + type: bool + value: false + mirror: always + set_spidermonkey_pref: startup + + # Experimental support for Iterator Sequencing in JavaScript. +- name: javascript.options.experimental.iterator_sequencing + type: bool + value: false + mirror: always + set_spidermonkey_pref: startup + +#endif // NIGHTLY_BUILD + +#ifdef JS_HAS_TEMPORAL_API + # Experimental support for Temporal in JavaScript. +- name: javascript.options.experimental.temporal + type: bool + value: false + mirror: always + set_spidermonkey_pref: startup +#endif // JS_HAS_TEMPORAL_API + +#ifdef ENABLE_EXPLICIT_RESOURCE_MANAGEMENT + # Experimental support for Explicit Resource Management in JavaScript. +- name: javascript.options.experimental.explicit_resource_management + type: bool + value: false + mirror: always + set_spidermonkey_pref: always +#endif // ENABLE_EXPLICIT_RESOURCE_MANAGEMENT + +- name: javascript.options.experimental.error_capture_stack_trace + type: bool + value: false + mirror: always + set_spidermonkey_pref: always + +- name: javascript.options.experimental.json_parse_with_source + type: bool + value: true + mirror: always + set_spidermonkey_pref: always + +- name: javascript.options.wasm_caching + type: bool + value: true + mirror: always + +# The amount of time we wait between a request to GC (due to leaving a page) and doing the actual GC, in ms. +- name: javascript.options.gc_delay + type: uint32_t + value: 4000 + mirror: always + +# The amount of time we wait from the first request to GC to actually doing the first GC, in ms. +- name: javascript.options.gc_delay.first + type: uint32_t + value: 10000 + mirror: always + +# After doing a zonal GC, wait this much time (in ms) and then do a full GC, +# unless one is already pending. +- name: javascript.options.gc_delay.full + type: uint32_t + value: 60000 + mirror: always + +# Maximum amount of time that should elapse between incremental GC slices, in ms. +- name: javascript.options.gc_delay.interslice + type: uint32_t + value: 250 + mirror: always + +# nsJSEnvironmentObserver observes the memory-pressure notifications and +# forces a garbage collection and cycle collection when it happens, if the +# appropriate pref is set. +- name: javascript.options.gc_on_memory_pressure + type: bool + # Disable the JS engine's GC on memory pressure on Android for now to continue investigating its + # performance impacts and then decide to enable it or not. + # See bug 1450787. + value: @IS_NOT_ANDROID@ + mirror: always + +# We allow at most MIN(max, MAX(NUM_CPUS / cpu_divisor, 1)) concurrent GCs +# between processes +- name: javascript.options.concurrent_multiprocess_gcs.cpu_divisor + type: RelaxedAtomicUint32 + value: 4 + mirror: always + +# See 'cpu_divisor' above, 0 means UINT_32_MAX. +- name: javascript.options.concurrent_multiprocess_gcs.max + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +- name: javascript.options.mem.log + type: bool + value: false + mirror: always + +- name: javascript.options.mem.notify + type: bool + value: false + mirror: always + +# Whether the Parent process allocates and shares memory with all content +# processes. This is mirrored once, as the parent process will do this +# allocation early on. +- name: javascript.options.self_hosted.use_shared_memory + type: bool + value: true + mirror: always # LoadStartupJSPrefs + do_not_use_directly: true + +- name: javascript.options.main_thread_stack_quota_cap + type: uint32_t +#if defined(MOZ_ASAN) + value: 6 * 1024 * 1024 +#else + value: 2 * 1024 * 1024 +#endif + mirror: always + +- name: javascript.options.wasm_disable_huge_memory + type: bool + value: false + mirror: always + set_spidermonkey_pref: startup + +- name: javascript.options.wasm_optimizingjit + type: bool + value: true + mirror: always + +- name: javascript.options.wasm_relaxed_simd + type: bool +#if defined(ENABLE_WASM_RELAXED_SIMD) + value: @IS_NIGHTLY_BUILD@ +#else + value: false +#endif + mirror: always + set_spidermonkey_pref: always + +- name: javascript.options.wasm_moz_intgemm + type: bool +#if defined(ENABLE_WASM_MOZ_INTGEMM) + value: @IS_NIGHTLY_BUILD@ +#else + value: false +#endif + mirror: always + set_spidermonkey_pref: startup + +- name: javascript.options.wasm_exnref + type: bool + value: true + mirror: always + set_spidermonkey_pref: startup + +- name: javascript.options.wasm_gc + type: bool +#if defined(ENABLE_WASM_GC) + value: true +#else + value: false +#endif + mirror: always + set_spidermonkey_pref: always + +- name: javascript.options.wasm_memory_control + type: bool + value: false + mirror: always + set_spidermonkey_pref: always + +- name: javascript.options.wasm_branch_hinting + type: bool +#if defined(ENABLE_WASM_BRANCH_HINTING) + value: @IS_NIGHTLY_BUILD@ +#else + value: false +#endif + mirror: always + set_spidermonkey_pref: always + +#if defined(ENABLE_WASM_SIMD) +#if defined(JS_CODEGEN_X64) || defined(JS_CODEGEN_X86) + # Enables AVX instructions support on X86/X64 platforms. + # Changing these prefs requires a restart. +- name: javascript.options.wasm_simd_avx + type: bool + value: true + mirror: always + set_spidermonkey_pref: startup +#endif +#endif + +- name: javascript.options.wasm_memory64 + type: bool +#if defined(ENABLE_WASM_MEMORY64) + value: true +#else + value: false +#endif + mirror: always + set_spidermonkey_pref: always + +- name: javascript.options.wasm_multi_memory + type: bool +#if defined(ENABLE_WASM_MULTI_MEMORY) + value: true +#else + value: false +#endif + mirror: always + set_spidermonkey_pref: always + +- name: javascript.options.wasm_js_string_builtins + type: bool + value: true + mirror: always + set_spidermonkey_pref: always + +- name: javascript.options.wasm_tail_calls + type: bool +#if defined(ENABLE_WASM_TAIL_CALLS) + value: true +#else + value: false +#endif + mirror: always + set_spidermonkey_pref: always + +- name: javascript.options.wasm_js_promise_integration + type: bool + value: false + mirror: always + set_spidermonkey_pref: always + +- name: javascript.options.wasm_test_serialization + type: bool + value: false + mirror: always + set_spidermonkey_pref: always + +# Enables lazy tiering for wasm modules that have a GC type defined in them. +# Use wasm_lazy_tiering to enable it for any module. +- name: javascript.options.wasm_lazy_tiering_for_gc + type: bool + value: true + mirror: always + set_spidermonkey_pref: always + +# Enables lazy tiering for all modules. Use wasm_lazy_tiering_for_gc to only +# enable this for GC modules. +- name: javascript.options.wasm_lazy_tiering + type: bool + value: false + mirror: always + set_spidermonkey_pref: always + +# Aggressiveness of lazy tiering, allowable: 1 .. 9 +# 1 = min (almost never, set tiering threshold to max possible, == 2^31-1) +# 9 = max (request tier up at first call, set tiering threshold to zero) +- name: javascript.options.wasm_lazy_tiering_level + type: uint32_t + value: 5 + mirror: always + set_spidermonkey_pref: always + +# Forces lazy tiering to synchronously compile instead of using a background +# thread. +- name: javascript.options.wasm_lazy_tiering_synchronous + type: bool + value: false + mirror: always + set_spidermonkey_pref: always + +# Aggressiveness of inlining (regardless of call kind), allowable: 1 .. 9 +- name: javascript.options.wasm_inlining_level + type: uint32_t + value: 5 + mirror: always + set_spidermonkey_pref: always + +# Are wasm direct calls (within same Instance) candidates for inlining? +- name: javascript.options.wasm_direct_inlining + type: bool + value: true + mirror: always + set_spidermonkey_pref: always + +# Are wasm call_ref calls (within same Instance) candidates for inlining? +- name: javascript.options.wasm_call_ref_inlining + type: bool + value: true + mirror: always + set_spidermonkey_pref: always + +# When selecting call_ref targets for speculative inlining, this is the minimum +# percentage of the total number of calls from the call site that a candidate +# set of targets must collectively have in order to be elegible for inlining. +# Allowable: 10 .. 100 (%). Setting it (eg) 75 means the targets must collectively +# be 75% of all observed calls to be considered for inlining. Probably unwise to +# let this be much below 40. +- name: javascript.options.wasm_call_ref_inlining_percent + type: uint32_t + value: 40 + mirror: always + set_spidermonkey_pref: always + +# Support for pretenuring allocations based on their allocation site. +- name: javascript.options.site_based_pretenuring + type: bool + value: true + mirror: always + do_not_use_directly: true + set_spidermonkey_pref: startup + +#if defined(DEBUG) || defined(NIGHTLY_BUILD) || defined(JS_GC_ZEAL) +# Enable extra poisoning of GC memory. +- name: javascript.options.extra_gc_poisoning + type: bool +#ifdef DEBUG + value: true +#else + value: false +#endif + mirror: always + set_spidermonkey_pref: startup +#endif + +#if !defined(JS_CODEGEN_MIPS32) && !defined(JS_CODEGEN_MIPS64) && !defined(JS_CODEGEN_LOONG64) + # Spectre security vulnerability mitigations for the JS JITs. + # + # NOTE: The MIPS and LoongArch backends do not support these mitigations (and generally + # do not need them). In that case, leave the pref unlisted with its + # default value of false. +- name: javascript.options.spectre.index_masking + type: bool + value: true + mirror: always # LoadStartupJSPrefs + do_not_use_directly: true + +- name: javascript.options.spectre.object_mitigations + type: bool + value: true + mirror: always # LoadStartupJSPrefs + do_not_use_directly: true + +- name: javascript.options.spectre.string_mitigations + type: bool + value: true + mirror: always # LoadStartupJSPrefs + do_not_use_directly: true + +- name: javascript.options.spectre.value_masking + type: bool + value: true + mirror: always # LoadStartupJSPrefs + do_not_use_directly: true + +- name: javascript.options.spectre.jit_to_cxx_calls + type: bool + value: false + mirror: always # LoadStartupJSPrefs + do_not_use_directly: true +#endif // !defined(JS_CODEGEN_MIPSXX) && !defined(JS_CODEGEN_LOONG64) + +# Separate pref to override the values of the Spectre-related prefs above for +# isolated web content processes, where we don't need these mitigations. +- name: javascript.options.spectre.disable_for_isolated_content + type: bool + value: true + mirror: always + +# Whether the W^X policy is enforced to mark JIT code pages as either writable +# or executable but never both at the same time. OpenBSD defaults to W^X. +- name: javascript.options.content_process_write_protect_code + type: bool +#if defined(XP_OPENBSD) + value: true +#else + value: false +#endif + mirror: always + +# Whether to use the XPCOM thread pool for JS helper tasks. +- name: javascript.options.external_thread_pool + type: bool + value: true + mirror: always + do_not_use_directly: true + +# Whether to use the off-thread script compilation and decoding. +- name: javascript.options.parallel_parsing + type: bool + value: true + mirror: always + +# Whether to use fdlibm for Math.sin, Math.cos, and Math.tan. When +# privacy.resistFingerprinting is true, this pref is ignored and fdlibm is used +# anyway. +- name: javascript.options.use_fdlibm_for_sin_cos_tan + type: bool +#if defined(XP_WIN) + value: false +#else + value: true +#endif + mirror: always + set_spidermonkey_pref: always + +# Whether to support parsing '//(#@) source(Mapping)?URL=' pragmas. +- name: javascript.options.source_pragmas + type: bool + value: true + mirror: always + +# asm.js +- name: javascript.options.asmjs + type: bool + value: true + mirror: always + +# Whether to throw a TypeError if asm.js code hits validation failure. +- name: javascript.options.throw_on_asmjs_validation_failure + type: bool + value: false + mirror: always + +# Whether to disable the jit within the main process +- name: javascript.options.main_process_disable_jit + type: bool +#ifdef XP_IOS + value: true +#else + value: false +#endif + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "layers." +#--------------------------------------------------------------------------- + +# Whether to disable acceleration for all widgets. +- name: layers.acceleration.disabled + type: bool + value: false + mirror: once + do_not_use_directly: true +# Instead, use gfxConfig::IsEnabled(Feature::HW_COMPOSITING). + +# Whether to force acceleration on, ignoring blacklists. +- name: layers.acceleration.force-enabled + type: bool + value: false + mirror: once + do_not_use_directly: true + +# Whether we allow AMD switchable graphics. +- name: layers.amd-switchable-gfx.enabled + type: bool + value: true + mirror: once + +# Whether to use async panning and zooming. +- name: layers.async-pan-zoom.enabled + type: bool + value: true + mirror: once + do_not_use_directly: true + +- name: layers.d3d11.force-warp + type: bool + value: false + mirror: once + +- name: layers.d3d11.enable-blacklist + type: bool + value: true + mirror: once + +# Enable DEAA antialiasing for transformed layers in the compositor. +- name: layers.deaa.enabled + type: RelaxedAtomicBool +#if defined(MOZ_WIDGET_ANDROID) + value: false +#else + value: true +#endif + mirror: always + +# Force all possible layers to be always active layers. +- name: layers.force-active + type: bool + value: false + mirror: always + +- name: layers.draw-mask-debug + type: RelaxedAtomicBool + value: false + mirror: always + +- name: layers.force-synchronous-resize + type: RelaxedAtomicBool +#ifdef MOZ_WAYLAND + # We want to control it by nsWindow::SynchronouslyRepaintOnResize() on Linux/Wayland. + value: false +#else + value: true +#endif + mirror: always + +- name: layers.gpu-process.allow-software + type: bool +#if defined(XP_WIN) + value: true +#else + value: false +#endif + mirror: once + +- name: layers.gpu-process.enabled + type: bool +#if defined(XP_WIN) || defined(MOZ_WIDGET_ANDROID) + value: true +#elif defined(MOZ_X11) + value: false # we'd like this to be @IS_NIGHTLY_BUILD@, see Bug 1927058 +#else + value: false +#endif + mirror: once + +- name: layers.gpu-process.force-enabled + type: bool + value: false + mirror: once + +- name: layers.gpu-process.ipc_reply_timeout_ms + type: int32_t + value: 10000 + mirror: once + +- name: layers.gpu-process.extend_ipc_reply_timeout_ms + type: int32_t + value: 20000 + mirror: once + +# How many unstable GPU process restarts we allow for a given configuration. +- name: layers.gpu-process.max_restarts + type: RelaxedAtomicInt32 +#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_ANDROID) + value: 6 +#else + value: 1 +#endif + mirror: always + +# How many frames we must render before declaring the GPU process stable, and +# allow restarts without it counting against our maximum restarts. +- name: layers.gpu-process.stable.frame-threshold + type: RelaxedAtomicUint32 + value: 10 + mirror: always + +# How many milliseconds the GPU process must have lived before we accept that +# it is stable, and allow restarts without it counting against our maximum +# restarts. +- name: layers.gpu-process.stable.min-uptime-ms + type: RelaxedAtomicInt32 + value: 4 * 60000 + mirror: always + +# Note: This pref will only be used if it is less than layers.gpu-process.max_restarts. +- name: layers.gpu-process.max_restarts_with_decoder + type: RelaxedAtomicInt32 + value: 0 + mirror: always + +- name: layers.gpu-process.startup_timeout_ms + type: int32_t + value: 5000 + mirror: once + +- name: layers.gpu-process.crash-also-crashes-browser + type: bool + value: false + mirror: always + +# Whether to animate simple opacity and transforms on the compositor. +- name: layers.offmainthreadcomposition.async-animations + type: bool + value: true + mirror: always + +# Whether to log information about off main thread animations to stderr. +- name: layers.offmainthreadcomposition.log-animations + type: bool + value: false + mirror: always + +- name: layers.offmainthreadcomposition.force-disabled + type: bool + value: false + mirror: once + +# Compositor target frame rate. NOTE: If vsync is enabled the compositor +# frame rate will still be capped. +# -1 -> default (match layout.frame_rate or 60 FPS) +# 0 -> full-tilt mode: Recomposite even if not transaction occured. +- name: layers.offmainthreadcomposition.frame-rate + type: RelaxedAtomicInt32 + value: -1 + mirror: always + +#ifdef XP_WIN +- name: layers.prefer-opengl + type: bool + value: false + mirror: once +#endif + +# Copy-on-write canvas. +- name: layers.shared-buffer-provider.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: layers.recycle-allocator-rdd + type: bool + value: true + mirror: once + +- name: layers.iosurfaceimage.recycle-limit + type: RelaxedAtomicUint32 + value: 15 + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "layout." +#--------------------------------------------------------------------------- + +# Debug-only pref to force enable the AccessibleCaret. If you want to +# control AccessibleCaret by mouse, you'll need to set +# "layout.accessiblecaret.hide_carets_for_mouse_input" to false. +- name: layout.accessiblecaret.enabled + type: bool + value: false + mirror: always + +# Enable the accessible caret on platforms/devices +# that we detect have touch support. Note that this pref is an +# additional way to enable the accessible carets, rather than +# overriding the layout.accessiblecaret.enabled pref. +- name: layout.accessiblecaret.enabled_on_touch + type: bool + value: true + mirror: always + +# By default, carets become tilt only when they are overlapping. +- name: layout.accessiblecaret.always_tilt + type: bool + value: false + mirror: always + +# Show caret in cursor mode when long tapping on an empty content. This +# also changes the default update behavior in cursor mode, which is based +# on the emptiness of the content, into something more heuristic. See +# AccessibleCaretManager::UpdateCaretsForCursorMode() for the details. +- name: layout.accessiblecaret.caret_shown_when_long_tapping_on_empty_content + type: bool + value: false + mirror: always + +# 0 = by default, always hide carets for selection changes due to JS calls. +# 1 = update any visible carets for selection changes due to JS calls, +# but don't show carets if carets are hidden. +# 2 = always show carets for selection changes due to JS calls. +- name: layout.accessiblecaret.script_change_update_mode + type: int32_t + value: 0 + mirror: always + +# Allow one caret to be dragged across the other caret without any limitation. +# This matches the built-in convention for all desktop platforms. +- name: layout.accessiblecaret.allow_dragging_across_other_caret + type: bool + value: true + mirror: always + +# Optionally provide haptic feedback on long-press selection events. +- name: layout.accessiblecaret.hapticfeedback + type: bool + value: false + mirror: always + +# Smart phone-number selection on long-press is not enabled by default. +- name: layout.accessiblecaret.extend_selection_for_phone_number + type: bool + value: false + mirror: always + +# Keep the accessible carets hidden when the user is using mouse input (as +# opposed to touch/pen/etc.). +- name: layout.accessiblecaret.hide_carets_for_mouse_input + type: bool + value: true + mirror: always + +# CSS attributes (width, height, margin-left) of the AccessibleCaret in CSS +# pixels. +- name: layout.accessiblecaret.width + type: float + value: 34.0f + mirror: always + +- name: layout.accessiblecaret.height + type: float + value: 36.0f + mirror: always + +- name: layout.accessiblecaret.margin-left + type: float + value: -18.5f + mirror: always + +- name: layout.accessiblecaret.transition-duration + type: float + value: 250.0f + mirror: always + +# Simulate long tap events to select words. Mainly used in manual testing +# with mouse. +- name: layout.accessiblecaret.use_long_tap_injector + type: bool + value: false + mirror: always + +# To support magnify glass, whether we dispatch additional chrome event such as +# dragcaret. +- name: layout.accessiblecaret.magnifier.enabled + type: bool + value: @IS_ANDROID@ + mirror: always + +# One of several prefs affecting the maximum area to pre-render when animating +# a large element on the compositor. +# This pref enables transform (and transform like properties) animations on a +# large element run on the compositor with rendering partial area of the +# element on the main thread instead of rendering the whole area. Once the +# animation tried to composite out of the partial rendered area, the animation +# is rendered again with the latest visible partial area. +- name: layout.animation.prerender.partial + type: RelaxedAtomicBool + value: false + mirror: always + +# One of several prefs affecting the maximum area to pre-render when animating +# a large element on the compositor. +# This value is applied to both x and y axes and a perfect square contructed +# by the greater axis value which will be capped by the absolute limits is used +# for the partial pre-render area. +- name: layout.animation.prerender.viewport-ratio-limit + type: AtomicFloat + value: 1.125f + mirror: always + +# One of several prefs affecting the maximum area to pre-render when animating +# a large element on the compositor. +- name: layout.animation.prerender.absolute-limit-x + type: RelaxedAtomicUint32 + value: 4096 + mirror: always + +# One of several prefs affecting the maximum area to pre-render when animating +# a large element on the compositor. +- name: layout.animation.prerender.absolute-limit-y + type: RelaxedAtomicUint32 + value: 4096 + mirror: always + +# Test-only pref, if this is true, partial pre-rendered transform animations +# get stuck when it reaches to the pre-rendered boundaries and the pre-render +# region is never updated. +- name: layout.animation.prerender.partial.jank + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether to enable CSS Anchor Positioning support. +# https://drafts.csswg.org/css-anchor-position-1/ +- name: layout.css.anchor-positioning.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# Override DPI. A value of -1 means use the maximum of 96 and the system DPI. +# A value of 0 means use the system DPI. A positive value is used as the DPI. +# This sets the physical size of a device pixel and thus controls the +# interpretation of physical units such as "pt". +- name: layout.css.dpi + type: int32_t + value: -1 + mirror: always + +# Whether to always underline links. +- name: layout.css.always_underline_links + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# Whether to respect align-content on blocks. +- name: layout.css.align-content.blocks.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Whether content-box and stroke-box are enabled for transform-box. +- name: layout.css.transform-box-content-stroke.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Whether transition-behavior property is enabled? +- name: layout.css.transition-behavior.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Whether @starting-style is enabled? +- name: layout.css.starting-style-at-rules.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Should we look for counter ancestor scopes first? +- name: layout.css.counter-ancestor-scope.enabled + type: bool + value: true + mirror: always + +# Whether the `-moz-control-character-visibility` property is exposed to +# content. +# +# Only for testing purposes. +- name: layout.css.moz-control-character-visibility.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# Whether the `-moz-user-input` property is exposed to content. +- name: layout.css.moz-user-input.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# This pref controls whether the `prefers-color-scheme` value of iframes images +# reacts to the embedder `color-scheme` in content. +- name: layout.css.iframe-embedder-prefers-color-scheme.content.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Controls the transparency of the initial about:blank document. Generally you +# don't ever want a white flash in dark mode, but due to backwards compat we +# have some extra control over this, for now at least. +# +# See https://github.com/w3c/csswg-drafts/issues/9624 for iframes. +# +# Values: +# 1: content-inaccessible top-level only. +# 2: frames and content-inaccessible top-level only. +# 3: always +# Others: don't treat this document specially. +- name: layout.css.initial-document-transparency + type: RelaxedAtomicInt32 + value: 3 + mirror: always + +# The minimum contrast ratio between the accent color background and white. +# +# We don't use this for text, so we need a contrast of at least AA (for user +# interface components and graphical objects), which per WCAG is 3:1. +# +# However that causes some colors that are realistically fine to get darkened, +# so we lower it a little bit. Eventually we should maybe use something like +# APCA or so perhaps, see: +# +# * https://ruitina.com/apca-accessible-colour-contrast/ +# * https://github.com/w3c/csswg-drafts/issues/7937 +# +# See also: +# +# * https://accent-color.glitch.me/ +# +# For testing this. +- name: layout.css.accent-color.min-contrast-ratio + type: AtomicFloat + value: 2.4 + mirror: always + +# The target contrast ratio between the accent color foreground and background +# colors when darkening. +# +# We aim a bit further than the minimum contrast ratio, which seems to provide +# nice results in practice. +- name: layout.css.accent-color.darkening-target-contrast-ratio + type: AtomicFloat + value: 6.0 + mirror: always + +# Whether the `animation-composition` in css-animations-2 is enabled. +- name: layout.css.animation-composition.enabled + type: bool + value: true + mirror: always + +# Is the codepath for using cached scrollbar styles enabled? +- name: layout.css.cached-scrollbar-styles.enabled + type: bool + value: true + mirror: always + +# Whether computed local-fragment-only image urls serialize using the same +# rules as filter/mask/etc (not resolving the URL for local refs). +# +# See https://github.com/w3c/csswg-drafts/issues/3195 +- name: layout.css.computed-style.dont-resolve-image-local-refs + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Are implicit tracks in computed grid templates serialized? +- name: layout.css.serialize-grid-implicit-tracks + type: RelaxedAtomicBool + value: true + mirror: always + +# Whether the system-ui generic family is enabled. +- name: layout.css.system-ui.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Set the number of device pixels per CSS pixel. A value <= 0 means choose +# automatically based on user settings for the platform (e.g., "UI scale factor" +# on Mac). If browser.display.os-zoom-behavior == 1, then a positive value +# will be multiplied by the text scale factor; otherwise a positive value is +# used as-is. This controls the size of a CSS "px" at 100% full-zoom. +# The size of system fonts is also changed in proportion with the change in +# "px" sizes. Use "ui.textScaleFactor" instead to only change the size of "px". +# This is only used for windows on the screen, not for printing. +- name: layout.css.devPixelsPerPx + type: AtomicFloat + value: -1.0f + mirror: always + +# Is support for CSS backdrop-filter enabled? +- name: layout.css.backdrop-filter.enabled + type: bool + value: true + mirror: always + +# Do we override the blocklist for CSS backdrop-filter? +- name: layout.css.backdrop-filter.force-enabled + type: bool + value: false + mirror: always + +# Is support for rect() enabled? +- name: layout.css.basic-shape-rect.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Is support for shape() enabled? +- name: layout.css.basic-shape-shape.enabled + type: RelaxedAtomicBool + value: @IS_NIGHTLY_BUILD@ + mirror: always + rust: true + +# Is support for xywh() enabled? +- name: layout.css.basic-shape-xywh.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Whether alt text in content is enabled. +- name: layout.css.content.alt-text.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Should stray control characters be rendered visibly? +- name: layout.css.control-characters.visible + type: RelaxedAtomicBool + value: @IS_NOT_RELEASE_OR_BETA@ + mirror: always + rust: true + +# Whether the `contain-intrinsic-size` CSS property is enabled +- name: layout.css.contain-intrinsic-size.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Is support for GeometryUtils.convert*FromNode enabled? +- name: layout.css.convertFromNode.enabled + type: bool + value: @IS_NOT_RELEASE_OR_BETA@ + mirror: always + +- name: layout.css.cross-fade.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# Is support for light-dark() on content enabled? +- name: layout.css.light-dark.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Is support for fit-content() enabled? +- name: layout.css.fit-content-function.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# Whether to use tight bounds for floating ::first-letter (legacy Gecko behavior) +# or loose bounds based on overall font metrics (WebKit/Blink-like behavior)? +# Values mean: +# 1 legacy Gecko behavior (tight bounds) +# 0 loose typographic bounds (similar to webkit/blink) +# -1 auto behavior: use loose bounds if reduced line-height (<1em) or negative +# block-start margin is present; otherwise use tight bounds. +- name: layout.css.floating-first-letter.tight-glyph-bounds + type: int32_t +#ifdef NIGHTLY_BUILD + value: -1 +#else + value: 1 +#endif + mirror: always + +# Is support for the @font-palette-values rule and font-palette property enabled? +- name: layout.css.font-palette.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Is support for variation fonts enabled? +- name: layout.css.font-variations.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Is support for the size-adjust @font-face descriptor enabled? +- name: layout.css.size-adjust.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Is support for the tech() function in the @font-face src descriptor enabled? +- name: layout.css.font-tech.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Is support for font-variant-emoji enabled? +- name: layout.css.font-variant-emoji.enabled + type: RelaxedAtomicBool + value: @IS_NIGHTLY_BUILD@ + mirror: always + rust: true + +# Visibility level of font families available to CSS font-matching: +# 1 - only base system fonts +# 2 - also fonts from optional language packs +# 3 - also user-installed fonts +- name: layout.css.font-visibility + type: int32_t + value: 3 + mirror: always + +# Is support for GeometryUtils.getBoxQuads enabled? +- name: layout.css.getBoxQuads.enabled + type: bool + value: @IS_NOT_RELEASE_OR_BETA@ + mirror: always + +# Is support for (linear|radial|conic)-gradient color interpolation methods enabled? +- name: layout.css.gradient-color-interpolation-method.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Should we propagate baseline alignment information from a parent grid into +# its subgrids? +- name: layout.css.grid-subgrid-baselines.enabled + type: RelaxedAtomicBool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +# Is support for CSS masonry layout enabled? +- name: layout.css.grid-template-masonry-value.enabled + type: RelaxedAtomicBool + value: @IS_NIGHTLY_BUILD@ + mirror: always + rust: true + +# Is support for :has() enabled? +- name: layout.css.has-selector.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Whether the `:has-slotted` pseudo class is enabled +- name: layout.css.has-slotted-selector.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# Is support for CSS initial-letter property enabled? +- name: layout.css.initial-letter.enabled + type: bool + value: false + mirror: always + +# Is eager first-letter processing during intrinsic size computation enabled? +- name: layout.css.intrinsic-size-first-letter.enabled + type: bool + value: true + mirror: always + +# Which model to use for CSS letter-spacing: +# 0 - Gecko legacy model, spacing added to trailing side of letter +# 1 - WebKit/Blink-compatible, spacing always added to right-hand side +# 2 - Symmetrical spacing, half added to each side +- name: layout.css.letter-spacing.model + type: int32_t +#if defined(MOZ_DEV_EDITION) || defined(EARLY_BETA_OR_EARLIER) + value: 2 +#else + value: 0 +#endif + mirror: always + +# Is support for motion-path url enabled? +- name: layout.css.motion-path-url.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Pref to control whether the ::marker property restrictions defined in [1] +# apply. +# +# [1]: https://drafts.csswg.org/css-pseudo-4/#selectordef-marker +- name: layout.css.marker.restricted + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Is -moz-osx-font-smoothing enabled? (Only supported in OSX builds) +- name: layout.css.osx-font-smoothing.enabled + type: bool +#if defined(XP_MACOSX) + value: true +#else + value: false +#endif + mirror: always + +# Is support for CSS overflow-clip-box enabled for non-UA sheets? +- name: layout.css.overflow-clip-box.enabled + type: bool + value: false + mirror: always + +# Is support for CSS overflow: -moz-hidden-unscrollable enabled +- name: layout.css.overflow-moz-hidden-unscrollable.enabled + type: RelaxedAtomicBool + value: @IS_NOT_NIGHTLY_BUILD@ + mirror: always + rust: true + +# Is support for overscroll-behavior enabled? +- name: layout.css.overscroll-behavior.enabled + type: bool + value: true + mirror: always + +# Enables support for the page-orientation property inside of CSS @page rules. +- name: layout.css.page-orientation.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Enables support for different CSS page sizes on each page when printing. +- name: layout.css.allow-mixed-page-sizes + type: RelaxedAtomicBool + value: true + mirror: always + +# Enables support for @margin rules. +- name: layout.css.margin-rules.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# Whether Properties and Values is enabled +- name: layout.css.properties-and-values.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Whether @scope rule is enabled +- name: layout.css.at-scope.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# An override for prefers-color-scheme for content documents. +# 0: Dark +# 1: Light +# 2: Auto (system color scheme unless overridden by browser theme) +- name: layout.css.prefers-color-scheme.content-override + type: RelaxedAtomicInt32 + value: 2 + mirror: always + +# Dictates whether or not the prefers-reduced-transparency media query is enabled. +- name: layout.css.prefers-reduced-transparency.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# Dictates whether or not the inverted-colors media query is enabled. +- name: layout.css.inverted-colors.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# Is support for -moz-prefixed animation properties enabled? +- name: layout.css.prefixes.animations + type: bool + value: true + mirror: always + +# Is support for -moz-border-image enabled? +- name: layout.css.prefixes.border-image + type: bool + value: true + mirror: always + +# Is support for -moz-box-sizing enabled? +- name: layout.css.prefixes.box-sizing + type: bool + value: true + mirror: always + +# Is support for -moz-prefixed font feature properties enabled? +- name: layout.css.prefixes.font-features + type: bool + value: true + mirror: always + +# Is support for -moz-prefixed transform properties enabled? +- name: layout.css.prefixes.transforms + type: bool + value: true + mirror: always + +# Is support for -moz-prefixed transition properties enabled? +- name: layout.css.prefixes.transitions + type: bool + value: false + mirror: always + +# Enable relative color syntax: https://drafts.csswg.org/css-color-5/#relative-colors +- name: layout.css.relative-color-syntax.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Is CSS error reporting enabled? +- name: layout.css.report_errors + type: bool + value: true + mirror: always + +# Are inter-character ruby annotations enabled? +- name: layout.css.ruby.intercharacter.enabled + type: bool + value: false + mirror: always + +- name: layout.css.scroll-behavior.damping-ratio + type: AtomicFloat + value: 1.0f + mirror: always + +# Tuning of the smooth scroll motion used by CSSOM-View scroll-behavior. +# Spring-constant controls the strength of the simulated MSD +# (Mass-Spring-Damper). +- name: layout.css.scroll-behavior.spring-constant + type: AtomicFloat + value: 250.0f + mirror: always + +# Whether the scroll-driven animations generated by CSS is enabled. This +# also include animation-timeline property. +- name: layout.css.scroll-driven-animations.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# When selecting the snap point for CSS scroll snapping, the velocity of the +# scroll frame is clamped to this speed, in CSS pixels / s. +- name: layout.css.scroll-snap.prediction-max-velocity + type: RelaxedAtomicInt32 + value: 2000 + mirror: always + +# When selecting the snap point for CSS scroll snapping, the velocity of the +# scroll frame is integrated over this duration, in seconds. The snap point +# best suited for this position is selected, enabling the user to perform fling +# gestures. +- name: layout.css.scroll-snap.prediction-sensitivity + type: AtomicFloat + value: 0.750f + mirror: always + +# Stylo thread-pool size. +# Negative means auto, 0 disables the thread-pool (main-thread styling), other +# numbers override as specified. +# Note that 1 still creates a thread-pool of one thread! +- name: layout.css.stylo-threads + type: RelaxedAtomicInt32 + value: -1 + mirror: always + rust: true + +# Stylo work unit size. This is the amount of nodes we'll process in a single +# unit of work of the thread-pool. +# +# Larger values will increase style sharing cache hits and general DOM locality +# at the expense of decreased opportunities for parallelism. There are some +# measurements in bug 1385982 comments 11, 12, 13 that investigate some +# slightly different values for the work unit size. +# +# If the size is significantly increased, make sure to also review +# stylo-local-work-queue prefs, since we might end up doing too much work +# sequentially. +# +# A value of 0 disables parallelism altogether. +- name: layout.css.stylo-work-unit-size + type: RelaxedAtomicUint32 + value: 16 + mirror: always + rust: true + +# The minimum amount of work that a thread doing styling will try to keep +# locally before sending work to other threads, in a worker. +- name: layout.css.stylo-local-work-queue.in-worker + type: RelaxedAtomicUint32 + value: 0 + mirror: always + rust: true + +# As above but for the main thread. The main thread can't really steal from +# other threads so it might want a bigger min queue size before giving work to +# other threads. +- name: layout.css.stylo-local-work-queue.in-main-thread + type: RelaxedAtomicUint32 + value: 32 + mirror: always + rust: true + +# Are counters for implemented CSS properties enabled? +- name: layout.css.use-counters.enabled + type: bool + value: true + mirror: always + +# Are counters for unimplemented CSS properties enabled? +- name: layout.css.use-counters-unimplemented.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Should the :visited selector ever match (otherwise :link matches instead)? +- name: layout.css.visited_links_enabled + type: bool + value: true + mirror: always + +# The margin used for detecting relevancy for `content-visibility: auto`. +- name: layout.css.content-visibility-relevant-content-margin + type: float + value: 50 # 50% + mirror: always + +# Whether the `hanging` and `each-line` keywords are supported by `text-indent` +- name: layout.css.text-indent-keywords.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Whether the "modern" uppercase mapping of ß to ẞ (rather than SS) is used. +- name: layout.css.text-transform.uppercase-eszett.enabled + type: bool + value: false + mirror: always + +- name: layout.css.text-wrap-balance.enabled + type: bool + value: true + mirror: always + +# Maximum number of lines to try balancing. +- name: layout.css.text-wrap-balance.limit + type: int32_t + value: 10 + mirror: always + +- name: layout.css.text-wrap-balance-after-clamp.enabled + type: bool + value: true + mirror: always + +- name: layout.css.text-align.justify-only-after-last-tab + type: bool + value: true + mirror: always + +# Support for the css Zoom property. +- name: layout.css.zoom.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# UA styles for h1 in article/aside/nav/section. See bug 1883896. +- name: layout.css.h1-in-section-ua-styles.enabled + type: RelaxedAtomicBool + value: @IS_NOT_NIGHTLY_BUILD@ + mirror: always + +# The maximum width or height of the cursor we should allow when intersecting +# the UI, in CSS pixels. +- name: layout.cursor.block.max-size + type: uint32_t + value: 32 + mirror: always + +- name: layout.cursor.disable-for-popups + type: bool + value: true + mirror: always + +- name: layout.display-list.build-twice + type: RelaxedAtomicBool + value: false + mirror: always + +# Toggle retaining display lists between paints. +- name: layout.display-list.retain + type: RelaxedAtomicBool + value: true + mirror: always + +# Toggle retaining display lists between paints. +- name: layout.display-list.retain.chrome + type: RelaxedAtomicBool + value: true + mirror: always + +- name: layout.display-list.retain.sc + type: RelaxedAtomicBool + value: false + mirror: always + +# Set the maximum number of modified frames allowed before doing a full +# display list rebuild. +- name: layout.display-list.rebuild-frame-limit + type: RelaxedAtomicUint32 + value: 500 + mirror: always + +# Pref to dump the display list to the log. Useful for debugging drawing. +- name: layout.display-list.dump + type: RelaxedAtomicBool + value: false + mirror: always + +# Pref to dump the display list to the log. Useful for debugging drawing. +- name: layout.display-list.dump-content + type: RelaxedAtomicBool + value: false + mirror: always + +# Pref to dump the display list to the log. Useful for debugging drawing. +- name: layout.display-list.dump-parent + type: RelaxedAtomicBool + value: false + mirror: always + +- name: layout.display-list.show-rebuild-area + type: RelaxedAtomicBool + value: false + mirror: always + +- name: layout.display-list.improve-fragmentation + type: RelaxedAtomicBool + value: true + mirror: always + +# Are dynamic reflow roots enabled? +- name: layout.dynamic-reflow-roots.enabled + type: bool + value: @IS_EARLY_BETA_OR_EARLIER@ + mirror: always + +# Enables the mechanism to optimize away flex item's final reflow. +# Warning: Disabling the pref will impact the performance. This is useful only for +# debugging flexbox issues. +- name: layout.flexbox.item-final-reflow-optimization.enabled + type: bool + value: true + mirror: always + +# Enables the custom layout frame with a clear icon. +# Still needs tests and a web-exposed way to remove that icon, see bug 1654288. +- name: layout.forms.input-type-search.enabled + type: bool + value: false + mirror: always + +# Enables the Reveal Password button inside a . +- name: layout.forms.reveal-password-button.enabled + type: bool + value: false + mirror: always + +# If enabled, textareas won't include 'overflow:auto' scrollbars in their +# block-axis size (usually height). +- name: layout.forms.textarea-sizing-excludes-auto-scrollbar.enabled + type: bool + value: true + mirror: always + +# Pref to control browser frame rate, in Hz. A value <= 0 means choose +# automatically based on knowledge of the platform (or 60Hz if no platform- +# specific information is available). +- name: layout.frame_rate + type: RelaxedAtomicInt32 + value: -1 + mirror: always + +# If it has been this many frame periods since a refresh, assume that painting +# is quiescent (will not happen again soon). +- name: layout.idle_period.required_quiescent_frames + type: uint32_t + value: 2 + mirror: always + +# The amount of time (milliseconds) needed between an idle period's +# end and the start of the next tick to avoid jank. +- name: layout.idle_period.time_limit + type: uint32_t + value: 1 + mirror: always + +# The minimum amount of time (milliseconds) required to be remaining +# in the current vsync interval for us to attempt an extra tick, or +# <0 to disable extra ticks entirely. +- name: layout.extra-tick.minimum-ms + type: int32_t + value: 4 + mirror: always + +# Whether to load the broken image icon eagerly. This is mostly needed for +# reftests, since the broken image icon doesn't block the load event and thus +# there's no easy way to guarantee it's loaded. +- name: layout.image.eager_broken_image_icon + type: bool + value: false + mirror: always + +# Enable/disable interruptible reflow, which allows reflows to stop +# before completion (and display the partial results) when user events +# are pending. +- name: layout.interruptible-reflow.enabled + type: bool + value: true + mirror: always + +# On Android, don't synth mouse move events after scrolling, as they cause +# unexpected user-visible behaviour. Can remove this after bug 1633450 is +# satisfactorily resolved. +- name: layout.reflow.synthMouseMove + type: bool + value: @IS_NOT_ANDROID@ + mirror: always + +# This pref determines which side vertical scrollbars should be on. +# 0 = end-side in UI direction +# 1 = end-side in document/content direction +# 2 = right +# 3 = left +- name: layout.scrollbar.side + type: int32_t + value: 0 + mirror: always + +# This pref is to be set by test code only. +- name: layout.scrollbars.always-layerize-track + type: RelaxedAtomicBool + value: false + mirror: always + +- name: layout.scrollbars.click_and_hold_track.continue_to_end + type: bool +# On Linux, click-and-hold on the scrollbar track should continue scrolling +# until the mouse is released. On the other platforms we want to stop +# scrolling as soon as the scrollbar thumb has reached the current mouse +# position. +#ifdef MOZ_WIDGET_GTK + value: true +#else + value: false +#endif + mirror: always + +# Whether anchor is kept selected. +- name: layout.selectanchor + type: bool + value: false + mirror: always + +# Controls caret style and word-delete during text selection. +# 0: Use platform default +# 1: Caret moves and blinks as when there is no selection; word +# delete deselects the selection and then deletes word. +# 2: Caret moves to selection edge and is not visible during selection; +# word delete deletes the selection (Mac and Linux default). +# 3: Caret moves and blinks as when there is no selection; word delete +# deletes the selection. +# Windows default is 1 for word delete behavior, the rest as for 2. +- name: layout.selection.caret_style + type: int32_t + value: 0 + mirror: always + +# If layout.show_previous_page is true then during loading of a new page we +# will draw the previous page if the new page has painting suppressed. +- name: layout.show_previous_page + type: bool + value: true + mirror: always + +# Treat top level pages as always-active for the purpose of refresh driver +# throttling and such. +# +# Intended for testing automation and so forth. +- name: layout.testing.top-level-always-active + type: bool + value: false + mirror: always + +# Pref to stop overlay scrollbars from fading out, for testing purposes. +- name: layout.testing.overlay-scrollbars.always-visible + type: bool + value: false + mirror: always + +# Throttled frame rate, in frames per second. +- name: layout.throttled_frame_rate + type: uint32_t + value: 1 + mirror: always + +# Whether we should throttle in-process iframes in the active tab. +- name: layout.throttle_in_process_iframes + type: bool + value: true + mirror: always + +- name: layout.lower_priority_refresh_driver_during_load + type: bool + value: true + mirror: always + +# If > 0, nsRefreshDriver will keep ticking this amount of milliseconds after +# top level page load. +- name: layout.keep_ticking_after_load_ms + type: uint32_t + value: 1000 + mirror: always + +# Pref to control enabling scroll anchoring. +- name: layout.css.scroll-anchoring.enabled + type: bool + value: true + mirror: always + +# Pref to control whether to suspend also RefreshDriver::Tick when the page +# itself is suspended because of some synchronous operation, like sync XHR. +- name: layout.skip_ticks_while_page_suspended + type: bool + value: true + mirror: always + +# Pref to control how many consecutive scroll-anchoring adjustments (since the +# most recent user scroll or timeout) we'll average, before we consider whether +# to automatically turn off scroll anchoring. When we hit this threshold, the +# actual decision to disable also depends on the +# min-average-adjustment-threshold pref, see below for more details. +# +# Zero disables the heuristic. +- name: layout.css.scroll-anchoring.max-consecutive-adjustments + type: uint32_t + value: 10 + mirror: always + +# Whether to reset counting the consecutive scroll-anchoring adjustments during +# running async scrolling by APZ. +- name: layout.css.scroll-anchoring.reset-heuristic-during-animation + type: bool + value: false + mirror: always + +# The time after which we reset the max-consecutive-adjustments period, in +# milliseconds. +# +# This prevents sporadic back-and-forth scroll anchoring to trigger the +# max-consecutive-adjustments heuristic. +- name: layout.css.scroll-anchoring.max-consecutive-adjustments-timeout-ms + type: uint32_t + value: 500 + mirror: always + +# Pref to control whether we should disable scroll anchoring on a scroller +# where at least max-consecutive-adjustments have happened, and which the +# average adjustment ends up being less than this number, in CSS pixels. +# +# So, for example, given max-consecutive-adjustments=10 and +# min-average-adjustment-treshold=3, we'll block scroll anchoring if there have +# been 10 consecutive adjustments without a user scroll or more, and the +# average offset difference between them amount to less than 3 CSS pixels. +- name: layout.css.scroll-anchoring.min-average-adjustment-threshold + type: uint32_t + value: 2 + mirror: always + +# Pref to control disabling scroll anchoring suppression triggers, see +# +# https://drafts.csswg.org/css-scroll-anchoring/#suppression-triggers +# +# Those triggers should be unnecessary after bug 1561450. +- name: layout.css.scroll-anchoring.suppressions.enabled + type: bool + value: true + mirror: always + +- name: layout.css.scroll-anchoring.highlight + type: bool + value: false + mirror: always + +# Pref to control whether we reselect scroll anchors if sub-optimal +# +# See https://github.com/w3c/csswg-drafts/issues/6787 +- name: layout.css.scroll-anchoring.reselect-if-suboptimal + type: bool + value: true + mirror: always + +# Are shared memory User Agent style sheets enabled? +- name: layout.css.shared-memory-ua-sheets.enabled + type: bool + value: true + mirror: always + +# Is the CSS 'stretch' keyword enabled, for size-valued properties like 'width' +# and 'height'? (Note: this is unrelated to the 'stretch' value for the +# various alignment properties like 'align-self'; this pref has has +# no influence on the 'stretch' keyword for those alignment properties.) +- name: layout.css.stretch-size-keyword.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# Is the '-webkit-fill-available' keyword enabled, as an alias for 'stretch'? +- name: layout.css.webkit-fill-available.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# Is support for -webkit-line-clamp on regular blocks enabled? +- name: layout.css.webkit-line-clamp.block.enabled + type: bool + value: false + mirror: always + +# Does webkit-line-clamp skip painting clamped lines? +# See bug 1934547. +- name: layout.css.webkit-line-clamp.skip-paint + type: bool + value: false + mirror: always + +# Is 'content:none' supported on (non-pseudo) elements? +- name: layout.css.element-content-none.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# Whether we want scrollbar-width: thin to behave as scrollbar-width: auto. +- name: layout.css.scrollbar-width-thin.disabled + type: RelaxedAtomicBool + value: false + mirror: always + +# field-sizing CSS property +- name: layout.css.field-sizing.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether supports() conditions in @import is enabled +- name: layout.css.import-supports.enabled + type: RelaxedAtomicBool + value: true + mirror: always + rust: true + +# Whether :-moz-broken is supported in content. +- name: layout.css.moz-broken.content.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# Whether the modern ::slider-* pseudos are enabled. +- name: layout.css.modern-range-pseudos.enabled + type: RelaxedAtomicBool + value: false + mirror: always + rust: true + +# Is matching video-dynamic-range: high allowed? +- name: layout.css.video-dynamic-range.allows-high + type: RelaxedAtomicBool +#if defined(XP_MACOSX) + value: true +#else + value: false +#endif + mirror: always + +# Whether frame visibility tracking is enabled globally. +- name: layout.framevisibility.enabled + type: bool + value: true + mirror: always + +# The fraction of the scrollport we allow to horizontally scroll by before we +# schedule an update of frame visibility. +- name: layout.framevisibility.amountscrollbeforeupdatehorizontal + type: int32_t + value: 2 + mirror: always + +# The fraction of the scrollport we allow to vertically scroll by before we +# schedule an update of frame visibility. +- name: layout.framevisibility.amountscrollbeforeupdatevertical + type: int32_t + value: 2 + mirror: always + +# The number of scrollports wide to expand when tracking frame visibility. +- name: layout.framevisibility.numscrollportwidths + type: uint32_t +#ifdef ANDROID + value: 1 +#else + value: 0 +#endif + mirror: always + +# The number of scrollports high to expand when tracking frame visibility. +- name: layout.framevisibility.numscrollportheights + type: uint32_t + value: 1 + mirror: always + +# Test only. +- name: layout.dynamic-toolbar-max-height + type: RelaxedAtomicInt32 + value: 0 + mirror: always + +# Whether outlines should include all overflowing descendants, or just the +# border-box of a given element. +# +# Historically we have included descendants but other browsers have not. +- name: layout.outline.include-overflow + type: bool + value: false + mirror: always + +# Enable/disable overflow/underflow events in content +- name: layout.overflow-underflow.content.enabled + type: bool + value: false + mirror: always + +# Enable/disable overflow/underflow events in addon content +- name: layout.overflow-underflow.content.enabled_in_addons + type: bool + value: false + mirror: always + +- name: layout.visibility.min-recompute-interval-ms + type: uint32_t + value: 1000 + mirror: always + +# Controls double click and Alt+Arrow word selection behavior. +- name: layout.word_select.eat_space_to_next_word + type: bool +#ifdef XP_WIN + value: true +#else + value: false +#endif + mirror: always + +- name: layout.word_select.stop_at_punctuation + type: RelaxedAtomicBool + value: true + mirror: always + +# Whether underscore should be treated as a word-breaking character for +# word selection/arrow-key movement purposes. +- name: layout.word_select.stop_at_underscore + type: bool + value: false + mirror: always + +# Whether to draw images in CSS backgrounds if we only have a partial frame. +- name: layout.display_partial_background_images + type: bool + value: true + mirror: always + +# Controls whether nsRefreshDriver::IsInHighRateMode() may ever return true. +- name: layout.expose_high_rate_mode_from_refreshdriver + type: bool + value: true + mirror: always + +# Whether
is forced to be a block, see bug 1856374 +- name: layout.details.force-block-layout + type: bool + value: true + mirror: always + +# Whether table cells can generate scroll boxes. +- name: layout.tables.scrollable-cells + type: bool + value: false + mirror: always + +# Whether to disable layer pixel alignment in scroll related stuff. +- name: layout.scroll.disable-pixel-alignment + type: RelaxedAtomicBool + value: false + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "logging." +#--------------------------------------------------------------------------- + +# If this pref is true, prefs in the logging.config branch will be cleared on +# startup. This prevents unadvertedly creating huge log files that fill the disk +# when forgetting to remove the logging preferences. +- name: logging.config.clear_on_startup + type: bool + value: true + mirror: never + +# Allow setting log modules at runtimes easily with a MOZ_LOG string. +# This preference is empty by default but defined, this makes it easy to use +# especially on mobile by searching for it in about:config. +- name: logging.config.modules + type: String + value: "" + mirror: never + +#--------------------------------------------------------------------------- +# Prefs starting with "mathml." +#--------------------------------------------------------------------------- + +# Whether to disable legacy names "thickmathspace", "mediummathspace", +# "thickmathspace" etc for length attributes. +- name: mathml.mathspace_names.disabled + type: bool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +# Whether to disable support for stretching operators with STIXGeneral fonts. +# macos still has the deprecated STIXGeneral font pre-installed. +- name: mathml.stixgeneral_operator_stretching.disabled + type: bool + value: true + mirror: always + +# Whether to disable fallback for mathvariant=italic/bold/bold-italic via +# styling when lacking proper fonts for Mathematical Alphanumeric Symbols. +# We expect all OSes to have relevant fonts, except Android, see bug 1789083. +- name: mathml.mathvariant_styling_fallback.disabled + type: bool +#if defined(ANDROID) + value: false +#else + value: true +#endif + mirror: always + +# Whether to disable the MathML3 support for the mathvariant attribute. For +# MathML Core, support is restricted to the element and to value "normal". +# Corresponding automatic italicization on single-char element is also +# implemented via text-transform: auto when that flag is enabled. +- name: mathml.legacy_mathvariant_attribute.disabled + type: bool + value: @IS_NIGHTLY_BUILD@ + mirror: always + rust: true + +# Whether to disable forced centering of binary operators (+, =, ...). +- name: mathml.centered_operators.disabled + type: bool + value: true + mirror: always + rust: true + +# Whether to disable extra top/bottom spacing for stretchy operators. +- name: mathml.top_bottom_spacing_for_stretchy_operators.disabled + type: bool + value: true + mirror: always + rust: true + +#--------------------------------------------------------------------------- +# Prefs starting with "media." +#--------------------------------------------------------------------------- + + +# This pref defines what the blocking policy would be used in blocking autoplay. +# 0 : use sticky activation (default) +# https://html.spec.whatwg.org/multipage/interaction.html#sticky-activation +# 1 : use transient activation (the transient activation duration can be +# adjusted by the pref `dom.user_activation.transient.timeout`) +# https://html.spec.whatwg.org/multipage/interaction.html#transient-activation +# 2 : user input depth (allow autoplay when the play is trigged by user input +# which is determined by the user input depth) +- name: media.autoplay.blocking_policy + type: uint32_t + value: 0 + mirror: always + +# Whether to allow autoplay on extension background pages. +- name: media.autoplay.allow-extension-background-pages + type: bool + value: true + mirror: always + +# Block autoplay, asking for permission by default. +# 0=Allowed, 1=Blocked, 5=All Blocked +- name: media.autoplay.default + type: int32_t + value: 1 + mirror: always + +# File-backed MediaCache size. +- name: media.cache_size + type: RelaxedAtomicUint32 + value: 512000 # Measured in KiB + mirror: always + +# Size of file backed MediaCache while on a connection which is cellular (3G, +# etc), and thus assumed to be "expensive". +- name: media.cache_size.cellular + type: RelaxedAtomicUint32 + value: 32768 # Measured in KiB + mirror: always + +# Multiplier to change the sample rate at which input-only streams run, so as +# to similate clock drift. +- name: media.cubeb.input_drift_factor + type: AtomicFloat + mirror: always + value: 1.f + +# Multiplier to change the sample rate at which output-only streams run, so as +# to similate clock drift. +- name: media.cubeb.output_drift_factor + type: AtomicFloat + mirror: always + value: 1.f + +# Whether cubeb is sandboxed (AudioIPC) +- name: media.cubeb.sandbox + type: bool + mirror: always +#if defined(XP_LINUX) || defined(XP_WIN) || defined(XP_MACOSX) + value: true +#else + value: false +#endif + +# Whether or not to pass AUDCLNT_STREAMOPTIONS_RAW when initializing audio +# streams when using WASAPI. +# 0 - don't use RAW streams +# 1 - use RAW streams for input streams only +# 2 - use RAW streams for output streams only +# 3 - use RAW streams for input and output streams +#if defined (XP_WIN) +- name: media.cubeb.wasapi-raw + type: RelaxedAtomicUint32 + mirror: always + value: 0 +#endif // XP_WIN + +# Whether to make the start of cubeb stream slower, and by how many +# milliseconds. +- name: media.cubeb.slow_stream_init_ms + type: RelaxedAtomicUint32 + mirror: always + value: 0 + +# If a resource is known to be smaller than this size (in kilobytes), a +# memory-backed MediaCache may be used; otherwise the (single shared global) +# file-backed MediaCache is used. +- name: media.memory_cache_max_size + type: uint32_t + value: 8192 # Measured in KiB + mirror: always + +# Don't create more memory-backed MediaCaches if their combined size would go +# above this absolute size limit. +- name: media.memory_caches_combined_limit_kb + type: uint32_t + value: 524288 + mirror: always + +# Don't create more memory-backed MediaCaches if their combined size would go +# above this relative size limit (a percentage of physical memory). +- name: media.memory_caches_combined_limit_pc_sysmem + type: uint32_t + value: 5 # A percentage + mirror: always + +# When a network connection is suspended, don't resume it until the amount of +# buffered data falls below this threshold (in seconds). +- name: media.cache_resume_threshold + type: RelaxedAtomicUint32 + value: 30 + mirror: always +- name: media.cache_resume_threshold.cellular + type: RelaxedAtomicUint32 + value: 10 + mirror: always + +# Stop reading ahead when our buffered data is this many seconds ahead of the +# current playback position. This limit can stop us from using arbitrary +# amounts of network bandwidth prefetching huge videos. +- name: media.cache_readahead_limit + type: RelaxedAtomicUint32 + value: 60 + mirror: always +- name: media.cache_readahead_limit.cellular + type: RelaxedAtomicUint32 + value: 30 + mirror: always + +# MediaCapabilities +- name: media.mediacapabilities.drop-threshold + type: RelaxedAtomicInt32 + value: 95 + mirror: always + +- name: media.mediacapabilities.from-database + type: RelaxedAtomicBool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +# AudioSink +- name: media.resampling.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# libcubeb backend implements .get_preferred_channel_layout +- name: media.forcestereo.enabled + type: RelaxedAtomicBool +#if defined(XP_WIN) || defined(XP_DARWIN) || defined(MOZ_PULSEAUDIO) + value: false +#else + value: true +#endif + mirror: always + +# MediaSource + +# Whether to enable MediaSource support. +- name: media.mediasource.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.mediasource.mp4.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.mediasource.webm.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Check if vp9 is enabled by default in mediasource. False on Android. +# If disabled, vp9 will only be enabled under some conditions: +# - h264 HW decoding is not supported +# - mp4 is not enabled +# - Device was deemed fast enough to decode VP9 via the VP9Benchmark utility +# - A VP9 HW decoder is present. +- name: media.mediasource.vp9.enabled + type: RelaxedAtomicBool + value: @IS_NOT_ANDROID@ + mirror: always + +# Whether to enable MediaSource v2 support. +- name: media.mediasource.experimental.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether to enable experimental requestVideoFrameCallback support +- name: media.rvfc.enabled + type: bool + value: true + mirror: always + +# true for talos tests so that VideoSink passes on the most recently decoded +# frame to exercise the compositor even when the frame is out of date because +# the decoder is stressed. +# If this were true for normal playback, then presentation of such late decoded +# video frames would be out of sync with audio, and VideoPlaybackQuality +# metrics would provide no indication of the poor playback. [1] +# For normal playback, this is false, which does not restore A/V sync in this +# situation, but some out-of-date frames are dropped. The dropped frame count +# is reported to content in VideoPlaybackQuality metrics. +# [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1258870#c6 +- name: media.ruin-av-sync.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Encrypted Media Extensions +- name: media.eme.enabled + type: bool +#if defined(XP_LINUX) && !defined(MOZ_WIDGET_ANDROID) + # On Linux EME is visible but disabled by default. This is so that the "Play + # DRM content" checkbox in the Firefox UI is unchecked by default. DRM + # requires downloading and installing proprietary binaries, which users on an + # open source operating systems didn't opt into. The first time a site using + # EME is encountered, the user will be prompted to enable DRM, whereupon the + # EME plugin binaries will be downloaded if permission is granted. + value: false +#else + value: true +#endif + mirror: always + +# Whether we expose the functionality proposed in +# https://w3c.github.io/encrypted-media/#ref-for-dom-mediakeysystemmediacapability-encryptionscheme-2 +# I.e. if true, apps calling navigator.requestMediaKeySystemAccess() can pass +# an optional encryption scheme as part of MediaKeySystemMediaCapability +# objects. If a scheme is present when we check for support, we must ensure we +# support that scheme in order to provide key system access. +- name: media.eme.encrypted-media-encryption-scheme.enabled + type: bool + value: true + mirror: always + +# Do we need explicit approval from the application to allow access to EME? +# If true, Gecko will ask for permission before allowing MediaKeySystemAccess. +# At time of writing this is aimed at GeckoView, and setting this to true +# outside of GeckoView or test environments will likely break EME. +- name: media.eme.require-app-approval + type: bool + value: false + mirror: always + +- name: media.eme.audio.blank + type: RelaxedAtomicBool + value: false + mirror: always + +- name: media.eme.video.blank + type: RelaxedAtomicBool + value: false + mirror: always + +- name: media.eme.chromium-api.video-shmems + type: RelaxedAtomicUint32 + value: 6 + mirror: always + +# Is support for MediaKeys.getStatusForPolicy enabled? +- name: media.eme.hdcp-policy-check.enabled + type: bool + value: true + mirror: always + +- name: media.eme.max-throughput-ms + type: RelaxedAtomicUint32 + value: 500 + mirror: always + +- name: media.clearkey.persistent-license.enabled + type: bool + value: false + mirror: always + +# Are test specific clearkey key systems enabled and exposed? +- name: media.clearkey.test-key-systems.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +- name: media.cloneElementVisually.testing + type: bool + value: false + mirror: always + +# Does the GMPlugin process initialize minimal XPCOM +- name: media.gmp.use-minimal-xpcom + type: RelaxedAtomicBool + value: true + mirror: always + +# Does the GMPlugin process use native event processing +- name: media.gmp.use-native-event-processing + type: RelaxedAtomicBool + value: @IS_NOT_XP_MACOSX@ + mirror: always + +# How long in milliseconds before timing out to destroy en/decoders gracefully +- name: media.gmp.coder-shutdown-timeout-ms + type: RelaxedAtomicUint32 + value: 1000 + mirror: always + +#if defined(XP_LINUX) && defined(MOZ_SANDBOX) + # Whether to allow, on a Linux system that doesn't support the necessary + # sandboxing features, loading Gecko Media Plugins unsandboxed. However, EME + # CDMs will not be loaded without sandboxing even if this pref is changed. +- name: media.gmp.insecure.allow + type: RelaxedAtomicBool + value: false + mirror: always +#endif + +# (When reading the next line, know that preprocessor.py doesn't +# understand parentheses, but && is higher precedence than ||.) +#if defined(XP_WIN) && defined(_ARM64_) || defined(XP_MACOSX) + # These prefs control whether or not we will allow x86/x64 plugins + # to run on Windows ARM or Apple Silicon machines. This requires + # launching the GMP child process executable in x86/x64 mode. We + # expect to allow this for Widevine until an arm64 version of + # Widevine and Clearkey is made available. We don't expect to need + # to allow this for OpenH264. + # + # For Apple Silicon and OSX, it will be for universal builds and + # whether or not it can use the x64 Widevine plugin. + # + # For Windows ARM, it will be for ARM builds and whether or not it + # can use x86 Widevine or Clearkey plugins. + + # May a Widevine GMP x64 process be executed on ARM builds. +- name: media.gmp-widevinecdm.allow-x64-plugin-on-arm64 + type: RelaxedAtomicBool + value: true + mirror: always + + # May an OpenH264 GMP x64 process be executed on ARM builds. +- name: media.gmp-gmpopenh264.allow-x64-plugin-on-arm64 + type: RelaxedAtomicBool + value: false + mirror: always + + # May a Clearkey GMP x64 process be executed on ARM builds. +- name: media.gmp-gmpclearkey.allow-x64-plugin-on-arm64 + type: RelaxedAtomicBool + value: false + mirror: always +#endif + +# Specifies whether the PDMFactory can create a test decoder that just outputs +# blank frames/audio instead of actually decoding. The blank decoder works on +# all platforms. +- name: media.use-blank-decoder + type: RelaxedAtomicBool + value: false + mirror: always + +- name: media.gpu-process-decoder + type: RelaxedAtomicBool +#if defined(XP_WIN) + value: true +#else + value: false +#endif + mirror: always + +- name: media.ffvpx-hw.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# The codecs in the vendored ffmpeg copy are usually prefered to the other +# codecs. This allows changing this policy for testing purposes. +- name: media.prefer-non-ffvpx + type: RelaxedAtomicBool + value: false + mirror: always + +- name: media.rdd-process.enabled + type: RelaxedAtomicBool +#if defined(XP_WIN) + value: true +#elif defined(XP_MACOSX) + value: true +#elif defined(XP_LINUX) && !defined(ANDROID) + value: true +#elif defined(XP_FREEBSD) + value: true +#elif defined(XP_OPENBSD) + value: true +#elif defined(XP_SOLARIS) + value: true +#else + value: false +#endif + mirror: always + +- name: media.rdd-retryonfailure.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.rdd-process.startup_timeout_ms + type: RelaxedAtomicInt32 + value: 5000 + mirror: always + +# Specifies how many times we restart RDD process after crash till we give up. +# After first RDD restart we disable HW acceleration on Linux. +- name: media.rdd-process.max-crashes + type: RelaxedAtomicInt32 + value: 2 + mirror: always + +#ifdef MOZ_FFMPEG +- name: media.rdd-ffmpeg.enabled + type: RelaxedAtomicBool + value: true + mirror: always +#endif + + +- name: media.rdd-ffvpx.enabled + type: RelaxedAtomicBool +#if defined(XP_WIN) + value: true +#elif defined(XP_MACOSX) + value: true +#elif defined(XP_LINUX) && !defined(ANDROID) + value: true +#elif defined(XP_FREEBSD) + value: true +#elif defined(XP_OPENBSD) + value: true +#elif defined(XP_SOLARIS) + value: true +#else + value: false +#endif + mirror: always + +#ifdef MOZ_WMF +- name: media.rdd-wmf.enabled + type: RelaxedAtomicBool + value: true + mirror: always +#endif + +#ifdef MOZ_APPLEMEDIA +- name: media.rdd-applemedia.enabled + type: RelaxedAtomicBool + value: true + mirror: always +#endif + +- name: media.rdd-vorbis.enabled + type: RelaxedAtomicBool +#if defined(XP_WIN) + value: true +#elif defined(XP_MACOSX) + value: true +#elif defined(XP_LINUX) && !defined(ANDROID) + value: true +#elif defined(XP_FREEBSD) + value: true +#elif defined(XP_OPENBSD) + value: true +#elif defined(XP_SOLARIS) + value: true +#else + value: false +#endif + mirror: always + +- name: media.rdd-vpx.enabled + type: RelaxedAtomicBool +#if defined(XP_WIN) + value: true +#elif defined(XP_MACOSX) + value: true +#elif defined(XP_LINUX) && !defined(ANDROID) + value: true +#elif defined(XP_FREEBSD) + value: true +#elif defined(XP_OPENBSD) + value: true +#elif defined(XP_SOLARIS) + value: true +#else + value: false +#endif + mirror: always + +- name: media.rdd-wav.enabled + type: RelaxedAtomicBool +#if defined(XP_WIN) + value: true +#elif defined(XP_MACOSX) + value: true +#elif defined(XP_LINUX) && !defined(ANDROID) + value: true +#elif defined(XP_FREEBSD) + value: true +#elif defined(XP_OPENBSD) + value: true +#elif defined(XP_SOLARIS) + value: true +#else + value: false +#endif + mirror: always + +- name: media.rdd-opus.enabled + type: RelaxedAtomicBool +#if defined(XP_WIN) + value: true +#elif defined(XP_MACOSX) + value: true +#elif defined(XP_LINUX) && !defined(ANDROID) + value: true +#elif defined(XP_FREEBSD) + value: true +#elif defined(XP_OPENBSD) + value: true +#elif defined(XP_SOLARIS) + value: true +#else + value: false +#endif + mirror: always + +- name: media.rdd-webaudio.batch.size + type: RelaxedAtomicInt32 + value: 100 + mirror: always + +# This pref is here to control whether we want to perform audio decoding by +# using the IPC actor within the Utility process rather than the RDD process. +# When it is set to true, then the utility process will take precedence over RDD +# to perform audio decoding. +# TODO: Enabling for Isolated Processes builds on Android +- name: media.utility-process.enabled + type: RelaxedAtomicBool +#if defined(XP_WIN) + value: true +#elif defined(XP_MACOSX) + value: true +#elif defined(XP_LINUX) && !defined(ANDROID) + value: true +#elif defined(ANDROID) && !defined(MOZ_ANDROID_CONTENT_SERVICE_ISOLATED_PROCESS) + value: true +#elif defined(XP_FREEBSD) + value: true +#elif defined(XP_OPENBSD) + value: true +#elif defined(XP_SOLARIS) + value: true +#else + value: false +#endif + mirror: always + +# Specifies how many times we restart Utility process after crash till we give +# up. +- name: media.utility-process.max-crashes + type: RelaxedAtomicInt32 + value: 2 + mirror: always + +#ifdef MOZ_FFMPEG +- name: media.utility-ffmpeg.enabled + type: RelaxedAtomicBool + value: true + mirror: always +#endif + +- name: media.utility-ffvpx.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +#ifdef MOZ_WMF +- name: media.utility-wmf.enabled + type: RelaxedAtomicBool + value: true + mirror: always +#endif + +#ifdef MOZ_APPLEMEDIA +- name: media.utility-applemedia.enabled + type: RelaxedAtomicBool + value: true + mirror: always +#endif + +- name: media.utility-vorbis.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.utility-wav.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.utility-opus.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +#ifdef ANDROID + # Enable the MediaCodec PlatformDecoderModule by default. +- name: media.android-media-codec.enabled + type: RelaxedAtomicBool + value: true + mirror: always + + # Bug 1771196 + # Dont yet enable AndroidDecoderModule on Utility +- name: media.utility-android-media-codec.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +- name: media.android-media-codec.preferred + type: RelaxedAtomicBool + value: true + mirror: always +#endif # ANDROID + +# Now we will completely disable the ability to perform audio decoding outside +# of Utility. +- name: media.allow-audio-non-utility + type: RelaxedAtomicBool + value: false + mirror: always + +#ifdef MOZ_OMX +- name: media.omx.enabled + type: bool + value: false + mirror: always +#endif + +# Allow ffmpeg decoder to decode directly onto shmem buffer +- name: media.ffmpeg.customized-buffer-allocation + type: RelaxedAtomicBool + value: true + mirror: always + +# Disable falling back to software decoders in case of frame drop +- name: media.ffmpeg.disable-software-fallback + type: RelaxedAtomicBool + value: false + mirror: always + +#ifdef MOZ_FFMPEG +- name: media.ffmpeg.enabled + type: RelaxedAtomicBool + #if defined(XP_MACOSX) + value: false + #else + value: true + #endif + mirror: always + +- name: media.libavcodec.allow-obsolete + type: bool + value: false + mirror: always +#endif # MOZ_FFMPEG + +# Allow using ffmpeg encoder +- name: media.ffmpeg.encoder.enabled + type: RelaxedAtomicBool +#if !defined(MOZ_WIDGET_ANDROID) + value: true +#else + value: false +#endif + mirror: always + +# A high quantizer value allows the encoder to use higher compression, but +# resulting in lower quality for parts of the video. Using a lower value +# restricts excessive compression, improving video quality but potentially +# increasing file size. The quantizer's value range is controlled by the min +# and max values below. The lower the value is, the finer the quantizer will be +# Set AVCodecContext's qmin value to ffmpeg encoder +- name: media.ffmpeg.encoder.quantizer-min + type: RelaxedAtomicInt32 + value: 10 # An empirical value for better performance + mirror: always + +# Set AVCodecContext's qmax value to ffmpeg encoder +- name: media.ffmpeg.encoder.quantizer-max + type: RelaxedAtomicInt32 + value: 35 # An empirical value for better quality of the video output + mirror: always + +# Allow using openh264 decoding with ffmpeg +- name: media.ffmpeg.allow-openh264 + type: RelaxedAtomicBool + value: @IS_NOT_NIGHTLY_BUILD@ + mirror: always + +#ifdef MOZ_WIDGET_GTK +# Use VA-API for ffmpeg video playback on Linux +- name: media.ffmpeg.vaapi.enabled + type: bool + value: false + mirror: once + +# Force to copy dmabuf video frames +# Used for debugging/troubleshooting only +# 0 - force disable +# 1 - force enable +# 2 - default +- name: media.ffmpeg.vaapi.force-surface-zero-copy + type: uint32_t + value: 2 + mirror: once +#endif # MOZ_WIDGET_GTK + +# Set to true in marionette tests to disable the sanity test +# which would lead to unnecessary start of the RDD process. +- name: media.sanity-test.disabled + type: RelaxedAtomicBool + value: false + mirror: always + +#ifdef MOZ_WMF + +- name: media.wmf.enabled + type: RelaxedAtomicBool + value: true + mirror: always + + # Whether DD should consider WMF-disabled a WMF failure, useful for testing. +- name: media.decoder-doctor.wmf-disabled-is-failure + type: RelaxedAtomicBool + value: false + mirror: always + +- name: media.wmf.dxva.d3d11.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.wmf.dxva.max-videos + type: RelaxedAtomicUint32 + value: 8 + mirror: always + +- name: media.wmf.use-nv12-format + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.wmf.zero-copy-nv12-textures + type: bool + value: true + mirror: once +# Enable hardware decoded video no copy even when it is blocked. +- name: media.wmf.zero-copy-nv12-textures-force-enabled + type: bool + value: false + mirror: once + +- name: media.wmf.force.allow-p010-format + type: RelaxedAtomicBool + value: false + mirror: always + +- name: media.wmf.use-sync-texture + type: bool + value: true + mirror: once + +- name: media.wmf.low-latency.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.wmf.skip-blacklist + type: RelaxedAtomicBool + value: false + mirror: always + +- name: media.wmf.amd.highres.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.wmf.allow-unsupported-resolutions + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.wmf.vp9.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.wmf.av1.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Using Windows Media Foundation Media Engine for encrypted playback +# 0 : disable, 1 : enable for encrypted and clear, +# 2 : enable for encrypted only, 3 : enable for clear only +- name: media.wmf.media-engine.enabled + type: RelaxedAtomicUint32 + value: 2 + mirror: always + +# Testing purpose, enable media engine on channel decoder as well. +- name: media.wmf.media-engine.channel-decoder.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# The amount of video raw data the engine stream will queue +- name: media.wmf.media-engine.raw-data-threshold.video + type: RelaxedAtomicInt32 + value: 500000 + mirror: always + +# The amount of audio raw data the engine stream will queue +- name: media.wmf.media-engine.raw-data-threshold.audio + type: RelaxedAtomicInt32 + value: 2000000 + mirror: always + +# Specifies how many times we restart MFCDM process after crash till we give up. +- name: media.wmf.media-engine.max-crashes + type: RelaxedAtomicInt32 + value: 2 + mirror: always + +# Bypass the gfx block list check for the media engine playback. +- name: media.wmf.media-engine.bypass-gfx-blocklist + type: RelaxedAtomicBool + value: false + mirror: always + +# [TEST-ONLY] Use Media Foundation Clearkey CDM for EME related testing. +- name: media.eme.wmf.clearkey.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# [TEST-ONLY] use Media Foundation clearkey CDM dll to mock as an external CDM, +# external CDM like Widevine and PlayReady so that we won't be interfered by +# unexpected behaviors caused by the external library. +- name: media.eme.wmf.use-mock-cdm-for-external-cdms + type: RelaxedAtomicBool + value: false + mirror: always + +# Enable PlayReady DRM for EME +- name: media.eme.playready.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Use IsTypeSupportedEx for PlayReady +- name: media.eme.playready.istypesupportedex + type: RelaxedAtomicBool + value: true + mirror: always + +# Enable HEVC support via the windows media foundation +# 0 : disable, 1 : enable for media engine and MFT, +# 2 : enable for media engine only +- name: media.wmf.hevc.enabled + type: RelaxedAtomicUint32 + value: 1 + mirror: always + +# Enable Widevine experiment DRM for EME +- name: media.eme.widevine.experiment.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Enable origin filter for MFCDM support +# 0 : disabled, 1 : enabled allowed list, 2 : enabled blocked list +- name: media.eme.mfcdm.origin-filter.enabled + type: RelaxedAtomicUint32 +#if defined(NIGHTLY_BUILD) + value: 2 +#else + value: 1 +#endif + mirror: always + +#endif # MOZ_WMF + +- name: media.decoder-doctor.testing + type: bool + value: false + mirror: always + +- name: media.hardware-video-decoding.enabled + type: bool + value: true + mirror: once + +- name: media.hardware-video-decoding.force-enabled + type: bool + value: false + mirror: once + +# Whether to check the decoder supports recycling. +- name: media.decoder.recycle.enabled + type: RelaxedAtomicBool + value: @IS_ANDROID@ + mirror: always + +# Should MFR try to skip to the next key frame? +- name: media.decoder.skip-to-next-key-frame.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# The delay time (ms) before releasing an audio wakelock. +- name: media.wakelock.audio.delay-releasing.ms + type: RelaxedAtomicUint32 + value: 10000 + mirror: always + +# When video continues later than the current media time for this period of +# time, then it will trigger skip-to-next-keyframe mechanism. As this aims to +# solve the drop frames issue where video decoding too slow for high +# resolution videos. eg. 4k+. Therefore, the value is is determined by the +# telemetry probe `video_inter_keyframe_max_ms` in the key of `AV,h>2160` which +# shows that 95% video's key frame interval are less than ~5000. We use its +# half value as a threashold to decide whether we should keep decoding in the +# current video position or jump to the next keyframe in order to decode future +# frames in advance. +- name: media.decoder.skip_when_video_too_slow_ms + type: RelaxedAtomicInt32 + value: 2500 + mirror: always + +# True if we want to decode in batches. +- name: media.gmp.decoder.decode_batch + type: RelaxedAtomicBool + value: false + mirror: always + +# True if we allow use of any decoders found in GMP plugins. +- name: media.gmp.decoder.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# True if we want to request the multithreaded GMP decoder. +- name: media.gmp.decoder.multithreaded + type: RelaxedAtomicBool + value: false + mirror: always + +# True if we want to try using the GMP plugin decoders first. +- name: media.gmp.decoder.preferred + type: RelaxedAtomicBool + value: false + mirror: always + +# True if we want to reorder frames from the decoder based on the timestamp. +- name: media.gmp.decoder.reorder_frames + type: RelaxedAtomicBool + value: true + mirror: always + +# True if we allow use of any encoders found in GMP plugins. +- name: media.gmp.encoder.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# True if we want to request the multithreaded GMP encoder. +- name: media.gmp.encoder.multithreaded + type: RelaxedAtomicBool + value: false + mirror: always + +# True if we want to try using the GMP plugin encoders first. +- name: media.gmp.encoder.preferred + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether to suspend decoding of videos in background tabs. +- name: media.suspend-background-video.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Delay, in ms, from time window goes to background to suspending +# video decoders. Defaults to 10 seconds. +- name: media.suspend-background-video.delay-ms + type: RelaxedAtomicUint32 + value: 10000 + mirror: always + +- name: media.dormant-on-pause-timeout-ms + type: RelaxedAtomicInt32 + value: 5000 + mirror: always + +# AudioTrack and VideoTrack support +- name: media.track.enabled + type: bool + value: false + mirror: always + + +# This pref disables the reception of RTCP. It is used for testing. +- name: media.webrtc.net.force_disable_rtcp_reception + type: ReleaseAcquireAtomicBool + value: false + mirror: always + +# This pref disables using PQ crypto for WebRTC DTLS code. +- name: media.webrtc.enable_pq_dtls + type: RelaxedAtomicBool + value: @IS_EARLY_BETA_OR_EARLIER@ + mirror: always + +# This pref controls whether dispatch testing-only events. +- name: media.webvtt.testing.events + type: bool + value: false + mirror: always + +- name: media.webspeech.synth.force_global_queue + type: bool + value: false + mirror: always + +- name: media.webspeech.test.enable + type: bool + value: false + mirror: always + +- name: media.webspeech.test.fake_fsm_events + type: bool + value: false + mirror: always + +- name: media.webspeech.test.fake_recognition_service + type: bool + value: false + mirror: always + +#ifdef MOZ_WEBSPEECH +- name: media.webspeech.recognition.enable + type: bool + value: false + mirror: always +#endif + +- name: media.webspeech.recognition.force_enable + type: bool + value: false + mirror: always + +#ifdef MOZ_WEBSPEECH +- name: media.webspeech.synth.enabled + type: bool + value: true + mirror: always +#endif # MOZ_WEBSPEECH + +- name: media.encoder.webm.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.audio-max-decode-error + type: uint32_t +#if defined(RELEASE_OR_BETA) + value: 3 +#else + # Zero tolerance in pre-release builds to detect any decoder regression. + value: 0 +#endif + mirror: always + +- name: media.video-max-decode-error + type: uint32_t +#if defined(RELEASE_OR_BETA) + value: 2 +#else + # Zero tolerance in pre-release builds to detect any decoder regression. + value: 0 +#endif + mirror: always + +# Are video stats enabled? (Disabling can help prevent fingerprinting.) +- name: media.video_stats.enabled + type: bool + value: true + mirror: always + +# forces the number of dropped frames to 0 +- name: media.video.dropped_frame_stats.enabled + type: bool + value: true + mirror: always + +# Opus +- name: media.opus.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Wave +- name: media.wave.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Ogg +- name: media.ogg.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# WebM +- name: media.webm.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# AV1 +- name: media.av1.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.av1.use-dav1d + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.av1.new-thread-count-strategy + type: RelaxedAtomicBool + value: false + mirror: always + +- name: media.av1.force-thread-count + type: RelaxedAtomicInt32 + value: 0 + mirror: always + +- name: media.flac.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Hls +- name: media.hls.enabled + type: RelaxedAtomicBool +#if defined(ANDROID) + value: @IS_NOT_EARLY_BETA_OR_EARLIER@ +#else + value: false +#endif + mirror: always + +# Max number of HLS players that can be created concurrently. Used only on +# Android and when "media.hls.enabled" is true. +#ifdef ANDROID +- name: media.hls.max-allocations + type: uint32_t + value: 20 + mirror: always +#endif + +- name: media.mp4.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.mp4.sniff_iso_brand + type: RelaxedAtomicBool + value: true + mirror: always + +# Error/warning handling, Decoder Doctor. +# +# Set to true to force demux/decode warnings to be treated as errors. +- name: media.playback.warnings-as-errors + type: RelaxedAtomicBool + value: false + mirror: always + +# Resume video decoding when the cursor is hovering on a background tab to +# reduce the resume latency and improve the user experience. +- name: media.resume-background-video-on-tabhover + type: bool + value: true + mirror: always + +# Media Seamless Looping +- name: media.seamless-looping + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.seamless-looping-video + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.autoplay.block-event.enabled + type: bool + value: false + mirror: always + +- name: media.media-capabilities.screen.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +- name: media.benchmark.vp9.fps + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +- name: media.benchmark.vp9.threshold + type: RelaxedAtomicUint32 + value: 150 + mirror: always + +- name: media.benchmark.vp9.versioncheck + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +- name: media.benchmark.frames + type: RelaxedAtomicUint32 + value: 300 + mirror: always + +- name: media.benchmark.timeout + type: RelaxedAtomicUint32 + value: 1000 + mirror: always + +- name: media.test.video-suspend + type: RelaxedAtomicBool + value: false + mirror: always + +- name: media.test.null.decoder.creation-failure + type: RelaxedAtomicBool + value: false + mirror: always + +# MediaCapture prefs follow + +# Enables navigator.mediaDevices and getUserMedia() support. See also +# media.peerconnection.enabled +- name: media.navigator.enabled + type: bool + value: true + mirror: always + +# This pref turns off window-focus checks on the navigator.mediaDevices methods, +# for partner testing frameworks. +# Prefer "focusmanager.testmode", which is already set by default for +# web-platform tests. +- name: media.devices.unfocused.enabled + type: bool + value: false + mirror: always + +# This pref turns off [SecureContext] on the navigator.mediaDevices object, for +# more compatible legacy behavior. +- name: media.devices.insecure.enabled + type: bool + value: false + mirror: always + +# If the above pref is also enabled, this pref enabled getUserMedia() support +# in http, bypassing the instant NotAllowedError you get otherwise. +- name: media.getusermedia.insecure.enabled + type: bool + value: false + mirror: always + +# Enable tab sharing +- name: media.getusermedia.browser.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# The getDisplayMedia method is always SecureContext regardless of the above two +# prefs. But it is not implemented on android, and can be turned off elsewhere. +- name: media.getdisplaymedia.enabled + type: bool + value: @IS_NOT_ANDROID@ + mirror: always + +# The getDisplayMedia prompt uses getDisplayMedia under the hood to show previews. +# This can be turned off if, e.g. on systems with known issues like X11, or if +# previews are not desired. +- name: media.getdisplaymedia.previews.enabled + type: bool + value: @IS_NOT_ANDROID@ + mirror: always + +#if defined(MOZ_WEBRTC) && defined(XP_MACOSX) +# Use the libwebrtc ScreenCaptureKit desktop capture backend on Mac by default. +# When disabled, or on a host where not supported (< macOS 14), the older +# CoreGraphics backend is used instead. +- name: media.getdisplaymedia.screencapturekit.enabled + type: bool + value: true + mirror: once + +# Use SCContentSharingPicker for source picking when the libwebrtc +# ScreenCaptureKit desktop capture backend is used. When this is true and the +# backend supports SCContentSharingPicker, this takes precendence over the +# enumeration pref below. +- name: media.getdisplaymedia.screencapturekit.picker.enabled + type: bool + value: true + mirror: once + +# Use the libwebrtc ScreenCaptureKit desktop capture backend on Mac for screen +# enumeration when enabled. +# When this is false and the backend is used (see above), the older CoreGraphics +# backend is used to enumerate CGDirectDisplayIDs, which the ScreenCaptureKit +# backend understand as well. +- name: media.getdisplaymedia.screencapturekit.enumeration.enabled + type: bool + value: false + mirror: once +#endif + +# Turn off any cameras (but not mics) while in the background. This is desirable +# on mobile. +- name: media.getusermedia.camera.background.mute.enabled + type: bool + value: @IS_ANDROID@ + mirror: always + +# Use the libwebrtc AVFoundation camera backend on Mac by default. When +# disabled, an older forked capture module is used. +- name: media.getusermedia.camera.macavf.enabled + type: bool + value: true + mirror: once + +# Tell the audio backend to prefer a stream adapted for voice when processing is +# enabled through constraints (possibly defaults). Whether it has any effect +# depends on the backend. +- name: media.getusermedia.microphone.prefer_voice_stream_with_processing.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# Tell the audio backend to create a voice stream for later re-use before asking +# the user for microphone permissions, if approving those permissions would +# result in a voice stream when created later on. +- name: media.getusermedia.microphone.voice_stream_priming.enabled + type: RelaxedAtomicBool + value: @IS_XP_MACOSX@ + mirror: always + +# This pref turns on legacy (non-spec) exposure of camera and microphone +# information from enumerateDevices and devicechange ahead of successful +# getUserMedia calls. Should only be turned on to resolve web compat issues, +# since doing so reveals more user fingerprinting information to trackers. +# +# In this mode, camera and microphone device labels are exposed if the site has a +# persisted permission to either kind, as well as while actively capturing either +# kind (temporary and tab-specific grace-period permissions do not count). +- name: media.devices.enumerate.legacy.enabled + type: bool + value: false + mirror: always + +# Turns on legacy (non-spec) exposure of camera and microphone information +# from enumerateDevices and devicechange ahead of successful getUserMedia +# calls only for certain domains (ignored if above pref is true). +- name: media.devices.enumerate.legacy.allowlist + type: String + value: "slack.com,*.slack.com" + mirror: never + +# WebRTC prefs follow + +# Enables auto refresh of peerconnection stats by default +- name: media.aboutwebrtc.auto_refresh.peerconnection_section + type: bool + value: @IS_NOT_NIGHTLY_BUILD@ + mirror: always + +# Enables auto refresh of the transport connection log by default +- name: media.aboutwebrtc.auto_refresh.connection_log_section + type: bool + value: false + mirror: always + +# Enables auto refresh of user config by default +- name: media.aboutwebrtc.auto_refresh.user_modified_config_section + type: bool + value: true + mirror: always + +# Enables auto refresh of media context by default +- name: media.aboutwebrtc.auto_refresh.media_ctx_section + type: bool + value: false + mirror: always + +# Enables RTCPeerConnection support. Note that, when true, this pref enables +# navigator.mediaDevices and getUserMedia() support as well. +# See also media.navigator.enabled +- name: media.peerconnection.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.peerconnection.scripttransform.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +#ifdef MOZ_WEBRTC + # Use MediaDataDecoder API for VP8/VP9 in WebRTC. This includes hardware + # acceleration for decoding. +- name: media.navigator.mediadatadecoder_vpx_enabled + type: RelaxedAtomicBool +#if defined(NIGHTLY_BUILD) || defined(MOZ_WIDGET_GTK) + value: true +#else + value: false +#endif + mirror: always + + # Use MediaDataDecoder API for H264 in WebRTC. This includes hardware + # acceleration for decoding. +- name: media.navigator.mediadatadecoder_h264_enabled + type: RelaxedAtomicBool + #if defined(_ARM64_) && defined(XP_WIN) + value: false + #else + value: true + #endif + mirror: always + +#if defined(MOZ_WIDGET_GTK) + # Use hardware acceleration for VP8 decoding on Linux. +- name: media.navigator.mediadatadecoder_vp8_hardware_enabled + type: RelaxedAtomicBool + value: false + mirror: always +#endif + + # Interval in milliseconds at which to gather WebRTC stats for use in about:webrtc. +- name: media.aboutwebrtc.hist.poll_interval_ms + type: RelaxedAtomicUint32 + value: 250 + mirror: always + + # History time depth in seconds to keep for webrtc:stats for use in about:webrtc. +- name: media.aboutwebrtc.hist.storage_window_s + type: RelaxedAtomicUint32 + value: 60 + mirror: always + + # Time in minutes to retain peer connection stats after closing. +- name: media.aboutwebrtc.hist.prune_after_m + type: RelaxedAtomicUint32 + value: 60 * 24 * 2 + mirror: always + + # Max number of closed PC stats histories to retain +- name: media.aboutwebrtc.hist.closed_stats_to_retain + type: RelaxedAtomicUint32 + value: 8 + mirror: always + + # Gather PeerConnection stats history for display in about:webrtc. If + # disabled history will only gather when about:webrtc is open. Additionally, + # if disabled and when about:webrtc is not in the foreground history data + # will become sparse. +- name: media.aboutwebrtc.hist.enabled + type: RelaxedAtomicBool +#if defined(MOZ_WIDGET_ANDROID) + value: false +#else + value: @IS_NIGHTLY_BUILD@ +#endif + mirror: always + +#endif # MOZ_WEBRTC + +# HTMLMediaElement.allowedToPlay should be exposed to web content when +# block autoplay rides the trains to release. Until then, Nightly only. +- name: media.allowed-to-play.enabled + type: bool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +# Is support for MediaDevices.ondevicechange enabled? +- name: media.ondevicechange.enabled + type: bool + value: true + mirror: always + +# Is support for HTMLMediaElement.seekToNextFrame enabled? +- name: media.seekToNextFrame.enabled + type: bool + value: false + mirror: always + +# Is the Audio Output Devices API enabled? +- name: media.setsinkid.enabled + type: bool +#if defined(MOZ_WIDGET_ANDROID) + value: false # bug 1473346 +#else + value: true +#endif + mirror: always + +# Turn on this pref can enable test-only events for media element. +- name: media.testing-only-events + type: bool + value: false + mirror: always + +- name: media.useAudioChannelService.testing + type: bool + value: false + mirror: always + +- name: media.audioFocus.management + type: bool +#if defined(MOZ_WIDGET_ANDROID) + value: true +#else + value: false +#endif + mirror: always + +- name: media.hardwaremediakeys.enabled + type: bool + value: true + mirror: always + +# If this pref is on, then `media.mediacontrol.stopcontrol.timer.ms` would take +# effect and determine the timing to stop controlling media. +- name: media.mediacontrol.stopcontrol.timer + type: bool + value: true + mirror: always + +# If media is being paused after a certain period, then we would think that +# media doesn't need to be controlled anymore. Therefore, that media would stop +# listening to the media control key events. The value of this pref is how long +# media would stop listening to the event after it's paused. The default value +# is set to 24 hrs (24*60*60*1000) +- name: media.mediacontrol.stopcontrol.timer.ms + type: RelaxedAtomicUint32 + value: 86400000 + mirror: always + +# If this pref is on, we would stop controlling media after it reaches to the +# end. +- name: media.mediacontrol.stopcontrol.aftermediaends + type: bool + value: true + mirror: always + +# We would only use media control to control media which duration is longer +# than this value. +- name: media.mediacontrol.eligible.media.duration.s + type: AtomicFloat + value: 3.0f + mirror: always + +# Encoder creation strategy for WebRTC +# 0: prefer builtin WebRTC encoder (including OpenH264 via GMP) +# 1: prefer PlatformEncoderModule +- name: media.webrtc.encoder_creation_strategy + type: RelaxedAtomicUint32 +#ifdef ANDROID + value: 1 +#else + value: 0 +#endif + mirror: always + +#if defined(XP_MACOSX) +- name: media.webrtc.capture.allow-iosurface + type: RelaxedAtomicBool + value: true + mirror: always +#endif + +#if defined(XP_WIN) +- name: media.webrtc.capture.allow-directx + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.webrtc.capture.screen.allow-wgc + type: RelaxedAtomicBool + value: false + mirror: always + +- name: media.webrtc.capture.window.allow-wgc + type: RelaxedAtomicBool + value: false + mirror: always + +- name: media.webrtc.capture.wgc.allow-zero-hertz + type: RelaxedAtomicBool + value: false + mirror: always +#endif + +#if defined(MOZ_WIDGET_GTK) +- name: media.webrtc.capture.allow-pipewire + type: RelaxedAtomicBool + value: true + mirror: always + +- name: media.webrtc.camera.allow-pipewire + type: bool + value: false + mirror: once +#endif + +- name: media.block-autoplay-until-in-foreground + type: bool +#if !defined(MOZ_WIDGET_ANDROID) + value: true +#else + value: false +#endif + mirror: always + +- name: media.webrtc.hw.h264.enabled + type: bool +#if defined(MOZ_WIDGET_ANDROID) + value: true +#else + value: false +#endif + mirror: always + +- name: media.webrtc.codec.video.av1.enabled + type: RelaxedAtomicBool +#if defined(MOZ_AV1) + value: @IS_NIGHTLY_BUILD@ +#else + value: false +#endif + mirror: always + +# If true, then AV1 will be used as the preferred codec for WebRTC video. +# After the AV1 codec is enabled by default, this pref will be renamed. +- name: media.webrtc.codec.video.av1.experimental_preferred + type: bool + value: false + mirror: always + +- name: media.webrtc.simulcast.vp9.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +- name: media.webrtc.tls_tunnel_for_all_proxy + type: bool + value: true + mirror: always + +- name: media.webrtc.disallow_HTTPS_upgrade_for_TURN + type: bool + value: true + mirror: always + + # If true, then we require explicit approval from the embedding app (ex. Fenix) + # on GeckoView to know if we can allow audible, inaudible media or both kinds + # of media to autoplay. +- name: media.geckoview.autoplay.request + type: bool + value: false + mirror: always + + # This is used in testing only, in order to skip the prompting process. This + # pref works only when enabling the pref `media.geckoview.autoplay.request`. + # 0=prompt as normal, 1=allow all, 2=deny all, 3=allow audible request, + # 4=deny audible request, 5=allow inaudible request, 6=deny inaudible request. + # 7=leave all requests pending. +- name: media.geckoview.autoplay.request.testing + type: uint32_t + value: 0 + mirror: always + +- name: media.mediacontrol.testingevents.enabled + type: bool + value: false + mirror: always + +#if defined(XP_MACOSX) +- name: media.macos.screenrecording.oscheck.enabled + type: bool + value: true + mirror: always +#endif + +# When the playback rate of an HTMLMediaElement is greater than this value, or +# lower than the inverse of this value, the audio is muted. +- name: media.audio.playbackrate.muting_threshold + type: uint32_t + value: 8 + mirror: always + +# The interval of time in milliseconds between attempts to reopen any +# previously unavailable audio device. +- name: media.audio.device.retry.ms + type: RelaxedAtomicInt32 + value: 1000 + mirror: always + +# Time-stretch algorithm single processing sequence length in milliseconds. +# This determines to how long sequences the original sound is chopped in the +# time-stretch algorithm. +- name: media.audio.playbackrate.soundtouch_sequence_ms + type: RelaxedAtomicInt32 + value: 10 + mirror: always + +# Time-stretch algorithm seeking window length in milliseconds for algorithm +# that finds the best possible overlapping location. This determines from how +# wide window the algorithm may look for an optimal joining location when mixing +# the sound sequences back together. +- name: media.audio.playbackrate.soundtouch_seekwindow_ms + type: RelaxedAtomicInt32 + value: 15 + mirror: always + +# Time-stretch algorithm overlap length in milliseconds. When the chopped sound +# sequences are mixed back together, to form a continuous sound stream, this +# parameter defines over how long period the two consecutive sequences are let +# to overlap each other. +- name: media.audio.playbackrate.soundtouch_overlap_ms + type: RelaxedAtomicInt32 + value: 8 + mirror: always + +# The duration, in milliseconds, of decoded audio to keep around in the +# AudioSink ring-buffer. New decoding operations are started when this limit is +# reached. The total size of the ring-buffer is slightly bigger than this. +- name: media.audio.audiosink.threshold_ms + type: AtomicFloat +#if defined(XP_MACOSX) && defined(MOZ_AARCH64) + value: 1000.0 +#else + value: 200.0 +#endif + mirror: always + +- name: media.video-wakelock + type: RelaxedAtomicBool + value: true + mirror: always + +# On Mac, enables using the ` Media Plugin Helper` executable as the +# GMP child process instead of the plugin-container executable. +#if defined(XP_MACOSX) +- name: media.plugin_helper_process.enabled + type: RelaxedAtomicBool + value: true + mirror: always +#endif + +# When this is true, the protection mask that Firefox replies to Widevine API +# QueryOutputProtectionStatus is `kProtectionHDCP` when no potential capturing. +- name: media.widevine.hdcp-protection-mask + type: RelaxedAtomicBool + value: true + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "memory." +#--------------------------------------------------------------------------- + +- name: memory.phc.enabled + type: bool + value: true + mirror: always + +- name: memory.phc.min_ram_mb + type: uint32_t + value: 8000 + mirror: always + +- name: memory.phc.avg_delay.first + type: uint32_t + value: 65536 + mirror: always + +- name: memory.phc.avg_delay.normal + type: uint32_t + value: 16384 + mirror: always + +- name: memory.phc.avg_delay.page_reuse + type: uint32_t + value: 262144 + mirror: always + +- name: memory.phc.avg_delay.content.first + type: uint32_t + value: 16384 + mirror: always + +- name: memory.phc.avg_delay.content.normal + type: uint32_t + value: 4096 + mirror: always + +- name: memory.phc.avg_delay.content.page_reuse + type: uint32_t + value: 262144 + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "middlemouse." +#--------------------------------------------------------------------------- + +# If set and browser.tabs.opentabfor.middleclick is not set, middle clicking on +# a link opens the link in a new window. +- name: middlemouse.openNewWindow + type: bool +#if defined(ANDROID) || !defined(XP_MACOSX) && defined(XP_UNIX) + value: true +#else + value: false +#endif + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "midi." +#--------------------------------------------------------------------------- + +- name: midi.testing + type: RelaxedAtomicBool + value: false + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "mousewheel." +#--------------------------------------------------------------------------- + +# This affects how line scrolls from wheel events will be accelerated. +# Factor to be multiplied for constant acceleration. +- name: mousewheel.acceleration.factor + type: RelaxedAtomicInt32 + value: 10 + mirror: always + +# This affects how line scrolls from wheel events will be accelerated. +# Number of mousewheel clicks when acceleration starts. +# Acceleration can be turned off if pref is set to -1. +- name: mousewheel.acceleration.start + type: RelaxedAtomicInt32 + value: -1 + mirror: always + +# Auto-dir is a feature which treats any single-wheel scroll as a scroll in the +# only one scrollable direction if the target has only one scrollable +# direction. For example, if the user scrolls a vertical wheel inside a target +# which is horizontally scrollable but vertical unscrollable, then the vertical +# scroll is converted to a horizontal scroll for that target. +# Note that auto-dir only takes effect for |mousewheel.*.action|s and +# |mousewheel.*.action.override_x|s whose values are 1. +- name: mousewheel.autodir.enabled + type: bool + value: false + mirror: always + +# When a wheel scroll is converted due to auto-dir, which side the converted +# scroll goes towards is decided by one thing called "honoured target". If the +# content of the honoured target horizontally starts from right to left, then +# an upward scroll maps to a rightward scroll and a downward scroll maps to a +# leftward scroll; otherwise, an upward scroll maps to a leftward scroll and a +# downward scroll maps to a rightward scroll. +# If this pref is set to false, then consider the scrolling target as the +# honoured target. +# If set to true, then consider the root element in the document where the +# scrolling target is as the honoured target. But note that there's one +# exception: for targets in an HTML document, the real root element(I.e. the +# element) is typically not considered as a root element, but the +# element is typically considered as a root element. If there is no +# element, then consider the element instead. +- name: mousewheel.autodir.honourroot + type: bool + value: false + mirror: always + +- name: mousewheel.system_scroll_override.enabled + type: RelaxedAtomicBool +#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) + value: true +#else + value: false +#endif + mirror: always + +# Prefs for overriding the system mouse wheel scrolling speed on +# content of the web pages. When +# "mousewheel.system_scroll_override.enabled" is true and the +# system scrolling speed isn't customized by the user, the content scrolling +# speed is multiplied by the following factors. The value will be used as +# 1/100. E.g., 200 means 2.00. +# NOTE: Even if "mousewheel.system_scroll_override.enabled" is +# true, when Gecko detects the user customized the system scrolling speed +# settings, the override isn't executed. +- name: mousewheel.system_scroll_override.horizontal.factor + type: RelaxedAtomicInt32 + value: 200 + mirror: always +- name: mousewheel.system_scroll_override.vertical.factor + type: RelaxedAtomicInt32 + value: 200 + mirror: always + +# Mouse wheel scroll transaction is held even if the mouse cursor is moved. +- name: mousewheel.transaction.ignoremovedelay + type: RelaxedAtomicInt32 + value: 100 + mirror: always + +# Mouse wheel scroll transaction period of time (in milliseconds). +- name: mousewheel.transaction.timeout + type: RelaxedAtomicInt32 + value: 1500 + mirror: always + +# Mouse wheel scroll position is determined by GetMessagePos rather than +# LPARAM msg value +- name: mousewheel.ignore_cursor_position_in_lparam + type: RelaxedAtomicBool + value: false + mirror: always + +# If line-height is lower than this value (in device pixels), 1 line scroll +# scrolls this height. +- name: mousewheel.min_line_scroll_amount + type: int32_t + value: 5 + mirror: always + +# Timeout period (in milliseconds) when the mouse wheel event is no longer +# handled as the same series. +- name: mousewheel.scroll_series_timeout + type: RelaxedAtomicInt32 + value: 80 + mirror: always + +#--------------------------------------------------------------------------- +# Prefs starting with "mozilla." +#--------------------------------------------------------------------------- + +- name: mozilla.widget.raise-on-setfocus + type: bool + value: true + mirror: once + +#--------------------------------------------------------------------------- +# Prefs starting with "network." +#--------------------------------------------------------------------------- + +# Force less-secure NTLMv1 when needed (NTLMv2 is the default). +- name: network.auth.force-generic-ntlm-v1 + type: RelaxedAtomicBool + value: false + mirror: always + +# Sub-resources HTTP-authentication: +# 0 - don't allow sub-resources to open HTTP authentication credentials +# dialogs +# 1 - allow sub-resources to open HTTP authentication credentials dialogs, +# but don't allow it for cross-origin sub-resources +# 2 - allow the cross-origin authentication as well. +- name: network.auth.subresource-http-auth-allow + type: uint32_t + value: 2 + mirror: always + +# Sub-resources HTTP-authentication for cross-origin images: +# - true: It is allowed to present http auth. dialog for cross-origin images. +# - false: It is not allowed. +# If network.auth.subresource-http-auth-allow has values 0 or 1 this pref does +# not have any effect. +- name: network.auth.subresource-img-cross-origin-http-auth-allow + type: bool + value: false + mirror: always + +# Resources that are triggered by some non-web-content: +# - true: They are allow to present http auth. dialog +# - false: They are not allow to present http auth. dialog. +- name: network.auth.non-web-content-triggered-resources-http-auth-allow + type: bool + value: false + mirror: always + +# Whether to show anti-spoof confirmation prompts when navigating to a url +# with userinfo +- name: network.auth.confirmAuth.enabled + type: bool + value: false + mirror: always + +# Whether to display auth prompts if X-Frame-Options header will block loading +# page +- name: network.auth.supress_auth_prompt_for_XFO_failures + type: bool + value: true + mirror: always + +# whether to redirect the channel for auth redirects. See Bug 1820807 +- name: network.auth.use_redirect_for_retries + type: RelaxedAtomicBool + value: @IS_EARLY_BETA_OR_EARLIER@ + mirror: always + +# When true, authentication challenges will be sorted even if +# an authentication is already in progress. This may cause issues sometimes. +- name: network.auth.sort_challenge_in_progress + type: RelaxedAtomicBool + value: false + mirror: always + +# See the full list of values in nsICookieService.idl. +- name: network.cookie.cookieBehavior + type: RelaxedAtomicInt32 + value: 0 # accept all cookies + mirror: always + +# Maximum client-side cookie life-time cap. Measured in seconds, set to 0 to +# disable. +- name: network.cookie.maxageCap + type: uint32_t + value: 34560000 + mirror: always + +# The cookieBehavior to be used in Private Browsing mode. +- name: network.cookie.cookieBehavior.pbmode + type: RelaxedAtomicInt32 + value: 0 # accept all cookies + mirror: always + +# Changes cookieBehavior=5 to block third-party cookies by default +- name: network.cookie.cookieBehavior.optInPartitioning + type: bool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +# Changes cookieBehavior=5 to block third-party cookies in the private browsing +# mode. +- name: network.cookie.cookieBehavior.optInPartitioning.pbmode + type: bool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +# Whether to block third-party tracker cookie and storage access when +# cookieBehavior=5. +- name: network.cookie.cookieBehavior.trackerCookieBlocking + type: bool + value: @IS_NOT_NIGHTLY_BUILD@ + mirror: always + +# Whether to support CHIPS(Cookies Having Independent Partitioned State). +- name: network.cookie.CHIPS.enabled + type: RelaxedAtomicBool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +# Updated to match the target count when we migrate the unpartitioned CHIPS +# cookies to their first-party partition. +- name: network.cookie.CHIPS.lastMigrateDatabase + type: RelaxedAtomicUint32 + value: 0 + mirror: always + +# Used to increase the number of times we want to have migrated the database. +# This lets us remotely perform a database migration with Nimbus. +- name: network.cookie.CHIPS.migrateDatabaseTarget + type: RelaxedAtomicUint32 + value: 1 + mirror: always + +# Stale threshold for cookies in seconds. +- name: network.cookie.staleThreshold + type: uint32_t + value: 60 + mirror: always + +# Enable CHIPS partition byte limit enforcement +# This pref will only be consulted if CHIPS itself is enabled +- name: network.cookie.chips.partitionLimitEnabled + type: bool + value: true + mirror: always + +# CHIPS partition limit DryRun mode disables purging/rejection +# but still checks for capacity overflow and reports telemetry +- name: network.cookie.chips.partitionLimitDryRun + type: bool + value: @IS_NOT_NIGHTLY_BUILD@ + mirror: always + +# The actual CHIPS parition limit in bytes +- name: network.cookie.chips.partitionLimitByteCapacity + type: RelaxedAtomicInt32 + value: 10240 # 10KiB + mirror: always + +- name: network.cookie.sameSite.laxByDefault + type: RelaxedAtomicBool + value: false + mirror: always + +- name: network.cookie.sameSite.laxByDefaultWarningsForBeta + type: RelaxedAtomicBool + value: false + mirror: always + +# lax-by-default 2 minutes tollerance for unsafe methods. The value is in seconds. +- name: network.cookie.sameSite.laxPlusPOST.timeout + type: uint32_t + value: 120 + mirror: always + +# For lax-by-default cookies ignore cross-site redirects when the final +# redirect is same-site again. +# https://github.com/httpwg/http-extensions/issues/2104 +- name: network.cookie.sameSite.laxByDefault.allowBoomerangRedirect + type: bool + value: true + mirror: always + +- name: network.cookie.sameSite.noneRequiresSecure + type: bool + value: true + mirror: always + +- name: network.cookie.sameSite.schemeful + type: bool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +- name: network.cookie.sameSite.crossSiteIframeSetCheck + type: bool + value: true + mirror: always + +# If we should not store "persistent" cookies at all, i.e., make the +# "persistent" storage be like "private" storage. This value is only read when +# instantiating persistent storage for the cookie service, which usually only +# happens when the cookie service singleton is created. +- name: network.cookie.noPersistentStorage + type: bool + value: false + mirror: always + +# If true then any cookies containing unicode will be rejected +- name: network.cookie.blockUnicode + type: RelaxedAtomicBool + value: false + mirror: always + +# If true cookies loaded from the sqlite DB that have a creation or +# last accessed time that is in the future will be fixed and the +# timestamps will be set to the current time. +- name: network.cookie.fixup_on_db_load + type: RelaxedAtomicBool + value: true + mirror: always + +# If true content types of multipart/x-mixed-replace cannot set a cookie +- name: network.cookie.prevent_set_cookie_from_multipart + type: RelaxedAtomicBool + value: true + mirror: always + +# Use sever time (Date header) to adjust the expire cookie attribute +- name: network.cookie.useServerTime + type: RelaxedAtomicBool + value: true + mirror: always + +# If we should attempt to race the cache and network. +- name: network.http.rcwn.enabled + type: bool + value: true + mirror: always + +- name: network.http.rcwn.cache_queue_normal_threshold + type: uint32_t + value: 8 + mirror: always + +- name: network.http.rcwn.cache_queue_priority_threshold + type: uint32_t + value: 2 + mirror: always + +# We might attempt to race the cache with the network only if a resource +# is smaller than this size. +- name: network.http.rcwn.small_resource_size_kb + type: uint32_t + value: 256 + mirror: always + +- name: network.http.rcwn.min_wait_before_racing_ms + type: uint32_t + value: 0 + mirror: always + +- name: network.http.rcwn.max_wait_before_racing_ms + type: uint32_t + value: 500 + mirror: always + + # Whether to send the Referer header in response to a meta refresh, or + # in response to a Refresh header. +- name: network.http.referer.sendFromRefresh + type: bool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +# false=real referer, true=spoof referer (use target URI as referer). +- name: network.http.referer.spoofSource + type: bool + value: false + mirror: always + +# Check whether we need to hide referrer when leaving a .onion domain. +# false=allow onion referer, true=hide onion referer (use empty referer). +- name: network.http.referer.hideOnionSource + type: bool + value: true + mirror: always + +# Include an origin header on non-GET and non-HEAD requests regardless of CORS. +# 0=never send, 1=send when same-origin only, 2=always send. +- name: network.http.sendOriginHeader + type: uint32_t + value: 2 + mirror: always + +# Include an idempotency-key header for POST requests +- name: network.http.idempotencyKey.enabled + type: RelaxedAtomicBool + value: @IS_NIGHTLY_BUILD@ + mirror: always + +# Whether to respect the redirected-tainted origin flag +# https://fetch.spec.whatwg.org/#concept-request-tainted-origin +- name: network.http.origin.redirectTainted + type: bool + value: true + mirror: always + +# If true, cross origin fetch (or XHR) requests would be keyed +# with a different cache key. +- name: network.fetch.cache_partition_cross_origin + type: RelaxedAtomicBool + value: true + mirror: always + +# If true, when browser code itself makes network requests, default to +# omitting credentials. +- name: network.fetch.systemDefaultsToOmittingCredentials + type: RelaxedAtomicBool + value: true + mirror: always + +# Prefs allowing granular control of referers. +# 0=don't send any, 1=send only on clicks, 2=send on image requests as well +- name: network.http.sendRefererHeader + type: uint32_t + value: 2 + mirror: always + do_not_use_directly: true + +# Whether to add urgency and incremental to request headers +- name: network.http.priority_header.enabled + type: RelaxedAtomicBool + value: true + mirror: always + +# The maximum allowed length for a referrer header - 4096 default. +# 0 means no limit. +- name: network.http.referer.referrerLengthLimit + type: uint32_t + value: 4096 + mirror: always + +# 0=always send, 1=send iff base domains match, 2=send iff hosts match. +- name: network.http.referer.XOriginPolicy + type: uint32_t + value: 0 + mirror: always + do_not_use_directly: true + +# 0=full URI, 1=scheme+host+port+path, 2=scheme+host+port. +- name: network.http.referer.trimmingPolicy + type: uint32_t + value: 0 + mirror: always + do_not_use_directly: true + +# 0=full URI, 1=scheme+host+port+path, 2=scheme+host+port. +- name: network.http.referer.XOriginTrimmingPolicy + type: uint32_t + value: 0 + mirror: always + do_not_use_directly: true + +# Set the default Referrer Policy; to be used unless overriden by the site. +# 0=no-referrer, 1=same-origin, 2=strict-origin-when-cross-origin, +# 3=no-referrer-when-downgrade. +- name: network.http.referer.defaultPolicy + type: uint32_t + value: 2 + mirror: always + +# Set the default Referrer Policy applied to third-party trackers when the +# default cookie policy is set to reject third-party trackers, to be used +# unless overriden by the site. +# 0=no-referrer, 1=same-origin, 2=strict-origin-when-cross-origin, +# 3=no-referrer-when-downgrade. +# Trim referrers from trackers to origins by default. +- name: network.http.referer.defaultPolicy.trackers + type: uint32_t + value: 2 + mirror: always + +# Set the Private Browsing Default Referrer Policy, to be used +# unless overriden by the site. +# 0=no-referrer, 1=same-origin, 2=strict-origin-when-cross-origin, +# 3=no-referrer-when-downgrade. +- name: network.http.referer.defaultPolicy.pbmode + type: uint32_t + value: 2 + mirror: always + +# Set to ignore referrer policies which is less restricted than the default for +# cross-site requests, including 'unsafe-url', 'no-referrer-when-downgrade' and +# 'origin-when-cross-origin'. +- name: network.http.referer.disallowCrossSiteRelaxingDefault + type: bool + value: true + mirror: always + +# Whether we ignore less restricted referrer policies for top navigations. +- name: network.http.referer.disallowCrossSiteRelaxingDefault.top_navigation + type: bool + value: false + mirror: always + + +# Set to ignore referrer policies which is less restricted than the default for +# cross-site requests in the private browsing mode, including 'unsafe-url', +# 'no-referrer-when-downgrade' and 'origin-when-cross-origin'. +- name: network.http.referer.disallowCrossSiteRelaxingDefault.pbmode + type: bool + value: true + mirror: always + +# Whether we ignore less restricted referrer policies for top navigations in the +# private browsing mode. +- name: network.http.referer.disallowCrossSiteRelaxingDefault.pbmode.top_navigation + type: bool + value: true + mirror: always + +# Set the Private Browsing Default Referrer Policy applied to third-party +# trackers when the default cookie policy is set to reject third-party +# trackers, to be used unless overriden by the site. +# 0=no-referrer, 1=same-origin, 2=strict-origin-when-cross-origin, +# 3=no-referrer-when-downgrade. +# No need to change this pref for trimming referrers from trackers since in +# private windows we already trim all referrers to origin only. +- name: network.http.referer.defaultPolicy.trackers.pbmode + type: uint32_t + value: 2 + mirror: always + +# Whether certain http header values should be censored out in logs. +# Specifically filters out "authorization" and "proxy-authorization". +- name: network.http.sanitize-headers-in-logs + type: RelaxedAtomicBool + value: true + mirror: always + +# Whether network error logging is enabled. +- name: network.http.network_error_logging.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether or not we use Windows for SSO to Microsoft sites. +- name: network.http.windows-sso.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether windows-sso is enabled for the default (0) container. +# To enable SSO for additional containers, add a new pref like +# `network.http.windows-sso.container-enabled.${containerId}` = true +- name: network.http.windows-sso.container-enabled.0 + type: bool + value: true + mirror: never + +# Whether or not we use MS Entra SSO to network.microsoft-sso-authority-list sites. +- name: network.http.microsoft-entra-sso.enabled + type: RelaxedAtomicBool + value: false + mirror: always + +# Whether microsoft-entra-sso is enabled for the default (0) container. +# To enable SSO for additional containers, add a new pref like +# `network.http.microsoft-entra-sso.container-enabled.${containerId}` = true +- name: network.http.microsoft-entra-sso.container-enabled.0 + type: bool + value: true + mirror: never + +# To specify the list of trusted Microsoft Single Sign-On (SSO) authority URLs +# This is needed for macOS unlike Windows where we send every URL to SSO +- name: network.microsoft-sso-authority-list + type: String + value: >- + login.microsoft.com, + login.microsoftonline.com, + sts.windows.net, + login.partner.microsoftonline.cn, + login.chinacloudapi.cn, + login.microsoftonline.us, + login-us.microsoftonline.com + mirror: never + +# The factor by which to increase the keepalive timeout when the +# NS_HTTP_LARGE_KEEPALIVE flag is used for a connection +- name: network.http.largeKeepaliveFactor + type: RelaxedAtomicUint32 +#if defined(ANDROID) + value: 10 +#else + value: 20 +#endif + mirror: always + +# Max size, in bytes, for received HTTP response header. +- name: network.http.max_response_header_size + type: RelaxedAtomicUint32 + value: 393216 + mirror: always + +# Treat all Unicode labels as confusable/unsafe so that they show up +# as Punycode in the UI. +- name: network.IDN_show_punycode + type: RelaxedAtomicBool + value: false + mirror: always + +# If set to true, IOService.offline depends on IOService.connectivity. +- name: network.offline-mirrors-connectivity + type: RelaxedAtomicBool + value: false + mirror: always + +# If set to true, disallow localhost connections when offline. +- name: network.disable-localhost-when-offline + type: RelaxedAtomicBool + value: false + mirror: always + +# Enables the predictive service. +- name: network.predictor.enabled + type: bool + value: true + mirror: always + +# Disable requests to 0.0.0.0 +# See Bug 1889130 +- name: network.socket.ip_addr_any.disabled + type: RelaxedAtomicBool + value: @IS_EARLY_BETA_OR_EARLIER@ + mirror: always + +# Set true to allow resolving proxy for localhost +- name: network.proxy.allow_hijacking_localhost + type: RelaxedAtomicBool + value: false + mirror: always + +# This pref will still treat localhost URLs as secure even when hijacked +# during testing. This is necessary for automated testing to check that we +# actually treat localhost as a secure origin. +- name: network.proxy.testing_localhost_is_secure_when_hijacked + type: RelaxedAtomicBool + value: false + mirror: always + +# Allow CookieJarSettings to be unblocked for channels without a document. +# This is for testing only. +- name: network.cookieJarSettings.unblocked_for_testing + type: bool + value: false + mirror: always + +- name: network.predictor.enable-hover-on-ssl + type: bool + value: false + mirror: always + +- name: network.predictor.enable-prefetch + type: bool + value: @IS_EARLY_BETA_OR_EARLIER@ + mirror: always + +- name: network.predictor.page-degradation.day + type: int32_t + value: 0 + mirror: always +- name: network.predictor.page-degradation.week + type: int32_t + value: 5 + mirror: always +- name: network.predictor.page-degradation.month + type: int32_t + value: 10 + mirror: always +- name: network.predictor.page-degradation.year + type: int32_t + value: 25 + mirror: always +- name: network.predictor.page-degradation.max + type: int32_t + value: 50 + mirror: always + +- name: network.predictor.subresource-degradation.day + type: int32_t + value: 1 + mirror: always +- name: network.predictor.subresource-degradation.week + type: int32_t + value: 10 + mirror: always +- name: network.predictor.subresource-degradation.month + type: int32_t + value: 25 + mirror: always +- name: network.predictor.subresource-degradation.year + type: int32_t + value: 50 + mirror: always +- name: network.predictor.subresource-degradation.max + type: int32_t + value: 100 + mirror: always + +- name: network.predictor.prefetch-rolling-load-count + type: int32_t + value: 10 + mirror: always + +- name: network.predictor.prefetch-min-confidence + type: int32_t + value: 100 + mirror: always +- name: network.predictor.preconnect-min-confidence + type: int32_t + value: 90 + mirror: always +- name: network.predictor.preresolve-min-confidence + type: int32_t + value: 60 + mirror: always + +- name: network.predictor.prefetch-force-valid-for + type: int32_t + value: 10 + mirror: always + +- name: network.predictor.max-resources-per-entry + type: int32_t + value: 100 + mirror: always + +# This is selected in concert with max-resources-per-entry to keep memory +# usage low-ish. The default of the combo of the two is ~50k. +- name: network.predictor.max-uri-length + type: uint32_t + value: 500 + mirror: always + +# A testing flag. +- name: network.predictor.doing-tests + type: bool + value: false + mirror: always + +# Indicates whether the `fetchpriority` attribute for elements which support it +# (e.g. `