Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  StaticPrefList.yaml   Sprache: unbekannt

 
Spracherkennung für: .yaml vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

# 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: <pref-name>                                 # mandatory
#     type: <cpp-type>                                  # mandatory
#     value: <default-value>                            # mandatory
#     mirror: <never | once | always>                   # mandatory
#     do_not_use_directly: <true | false>               # optional
#     include: <header-file>                            # optional
#     rust: <true | false>                              # optional
#     set_spidermonkey_pref: <false | startup | always> # 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<bool, Relaxed>`.
#
# - `value` is the default value. Its type should be appropriate for
#   <cpp-type>, 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. `<cmath>`.
#
# - `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.
#
# - `fuzzing_safe` indicates whether the SpiderMonkey pref is safe to toggle
#   while fuzzing. Defaults to `true`. When set to `false`, the JS shell ignores
#   attempts to change the pref while running with --fuzzing-safe.
#   This option is only valid for prefs with `set_spidermonkey_pref`.
#
# 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

#ifdef XP_IOS
#define IS_IOS true
#define IS_NOT_IOS false
#else
#define IS_IOS false
#define IS_NOT_IOS true
#endif

#if defined(ANDROID) || defined(XP_IOS)
#define IS_MOBILE true
#define IS_NOT_MOBILE false
#else
#define IS_MOBILE false
#define IS_NOT_MOBILE 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 13, 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: true
  mirror: always

# Whether to enable automatic details relationships for
# anchor positioned content.
- name: accessibility.anchorPositionedAsDetails.enabled
  type: bool
  value: false
  mirror: always

- name: accessibility.ariaNotify.enabled
  type: bool
  value: true
  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

#ifdef MOZ_ENABLE_SKIA_PDF
- name: accessibility.tagged_pdf_output.enabled
  type: bool
  value: false
  mirror: always
#endif

# Whether to enable support for the UI Automation API on Windows. Values:
# * 0: Never.
# * 1: Always.
# * 2: Enable unless incompatible accessibility clients are detected.
- name: accessibility.uia.enable
  type: uint32_t
  value: 2
  mirror: always
  do_not_use_directly: true

#ifdef XP_WIN
# 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
#endif

#---------------------------------------------------------------------------
# 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

# 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

#ifdef XP_MACOSX
- name: apz.mac.enable_double_tap_zoom_touchpad_gesture
  type: RelaxedAtomicBool
  value: true
  mirror: always
#endif

- 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

#ifdef ANDROID
- 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
#endif

- name: apz.autoscroll.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: apz.autoscroll.scroll_wheel_cooldown
  type: RelaxedAtomicInt32
  value: 500
  mirror: always

- name: apz.axis_lock.breakout_angle
  type: AtomicFloat
  value: float(M_PI / 8.0)    # 22.5 degrees
  mirror: always
  include: <cmath>

- 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: <cmath>

- name: apz.axis_lock.lock_angle
  type: AtomicFloat
  value: float(M_PI / 6.0)    # 30 degrees
  mirror: always
  include: <cmath>

# 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) && !defined(NIGHTLY_BUILD)
  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

# Fast-path notify APZ on non-passive APZ-aware listener registration,
# without waiting for the next paint.
- name: apz.fastpath_apz_aware_listener.enabled
  type: RelaxedAtomicBool
  value: true
  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_MOBILE@
  mirror: once

- name: apz.keyboard.passive-listeners
  type: RelaxedAtomicBool
  value: @IS_NOT_MOBILE@
  mirror: always

- name: apz.keyboard.focus-optimization
  type: bool
  value: false
  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.mousemove_hittest_optimization.enabled
  type: RelaxedAtomicBool
  value: true
  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

#ifdef XP_WIN
- name: apz.windows.force_disable_direct_manipulation
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: apz.windows.check_for_pan_gesture_conversion
  type: RelaxedAtomicBool
  value: true
  mirror: always
#endif

- 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

# Whether to async scroll CSS anchor pos.
- name: apz.async_scroll_css_anchor_pos
  type: bool
  value: true
  mirror: once

#---------------------------------------------------------------------------
# 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 Linktext.
- name: browser.anchor_color.dark
  type: String
  value: "#00CADB"
  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

# Whether to encrypt HTTP disk cache data at rest with an in-memory key. The
# decrypted cache content only ever lives in memory. Off by default; takes
# effect on restart. Read via CacheCrypto::IsEnabled(), which caches the value
# on first use so it is stable for the session.
- name: browser.cache.disk.encryption.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Base64 of the 32-byte AES-256 key used for disk cache encryption. Empty means
# "generate one on first use and store it here". This is a development scaffold;
# the key will move to the OS keystore later.
- name: browser.cache.disk.encryption.key
  type: String
  value: ""
  mirror: never

# Minimum number of unwritten changes before the disk cache index is written
# back to disk. Lowering it (e.g. to 1) forces the index to be persisted
# eagerly; intended for tests.
- name: browser.cache.disk.index.min_unwritten_changes
  type: RelaxedAtomicUint32
  value: 300
  mirror: always

# Minimum delay in milliseconds between two disk cache index writes. Lowering it
# (e.g. to 0) forces the index to be persisted eagerly; intended for tests.
- name: browser.cache.disk.index.min_dump_interval_ms
  type: RelaxedAtomicUint32
  value: 20000
  mirror: always

# Delay in milliseconds after startup before the disk cache index build/update
# process is started. Lowering it (e.g. to 0) makes the index reach the ready
# state sooner; intended for tests.
- name: browser.cache.disk.index.update_start_delay_ms
  type: RelaxedAtomicUint32
  value: 50000
  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: 1024   # 1 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

# On Windows, whether to bring the foreground window to the front when printing
# to avoid a DLP agent stealing focus and cancelling the print (bug 1980225)
- name: browser.contentanalysis.print_set_foreground_window
  type: bool
  value: true
  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

# What content analysis should return if the agent takes too long to respond
# to a request. (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.timeout_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
# A non-positive value indicates a timeout of 25ms, which is used for testing.
- name: browser.contentanalysis.agent_timeout
  type: int32_t
  value: 300
  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

# Max number of concurrent connections to the DLP agent.  For stability
# reasons, values exceeding 256 will be ignored.
- name: browser.contentanalysis.max_connections
  type: uint32_t
  value: 32
  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 only analyze plain text contents of the clipboard?
# If this is false, all formats on the clipboard will be analyzed.
# Note that regardless of this setting, files on the clipboard
# will be analyzed.
- name: browser.contentanalysis.interception_point.clipboard.plain_text_only
  type: bool
  value: true
  mirror: always

# Should Firefox use content analysis for download operations?
# Note that this has no effect unless browser.contentanalysis.enabled
# is true.
# This defaults to false so as to not break existing content analysis
# configurations.
- name: browser.contentanalysis.interception_point.download.enabled
  type: bool
  value: false
  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 only analyze plain text contents for drag and drop
# operations?
# If this is false, all formats that are part of the drag and drop
# operation will be analyzed.
# Note that regardless of this setting, files that are dragged and dropped
# will be analyzed.
- name: browser.contentanalysis.interception_point.drag_and_drop.plain_text_only
  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

# If true, TrackingDBService read methods broadcast a flush request before
# querying, so live ContentBlockingLogs for long-lived top-level documents
# write their pending events to the database first. Has no effect unless
# browser.contentblocking.database.enabled is also true.
- name: browser.contentblocking.database.flushOnQuery.enabled
  type: bool
  value: true
  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

# Whether memorytesting is enabled when crash reporter client is launched
- name: browser.crashReporter.memtest
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Space-separated list of prioritized memory test kinds
- name: browser.crashReporter.memtestKinds
  type: DataMutexString
  value: ""
  mirror: always

# Control whether we enable the feature of crash reports on demand at all
- name: browser.crashReports.onDemand
  type: bool
  value: true
  mirror: always

# Should we prompt the user to send targeted crash report requested by devs?
- name: browser.crashReports.requestedNeverShowAgain
  type: bool
  value: false
  mirror: always

# Do not show crash pull prompt before this unix epoch time to avoid spamming user
- name: browser.crashReports.dontShowBefore
  type: uint32_t
  value: 0
  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

# 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.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 1790641
- name: browser.download.enableDeletePrivate
  type: bool
  value: true
  mirror: always

- name: browser.download.deletePrivate
  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_MOBILE@
  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

# If false, show internal error page for HTTP responses with error
# codes (4xx, 5xx) and "Content-Length": 0 instead of blank page
# See https://bugzilla.mozilla.org/show_bug.cgi?id=1325876#c32 for why this
# is disabled on Android.
- name: browser.http.blank_page_with_error_response.enabled
  type: bool
#if !defined(ANDROID)
  value: false
#else
  value: true
#endif
  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

# Disable state restoration, allowing the kiosk desktop environment to manage state and position.
- name: browser.restoreWindowState.disabled
  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

# Whether (-moz-native-theme) evaluates to true by default.
- name: browser.theme.native-theme
  type: RelaxedAtomicBool
#ifdef MOZ_WIDGET_GTK
  value: true
#else
  value: false
#endif
  mirror: always
  rust: true

# Communicates the preferred content theme color to platform (for e.g.,
# prefers-color-scheme).
#
# dark (0), light (1), or system (2)
#
# Default to "system", 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

# Global Cache
- name: browser.safebrowsing.globalCache.enabled
  type: bool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

# SafeBrowsing Real-Time Lookup
- name: browser.safebrowsing.realTime.enabled
  type: bool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

# SafeBrowsing Real-Time Request Simulation
- name: browser.safebrowsing.realTime.simulation.enabled
  type: bool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

# Hit probability for the simulation, expressed as parts per million.
1000000 = 100%, 1 = 0.0001%, 0 = never hit.
# Lower values = more simulated requests over time.
- name: browser.safebrowsing.realTime.simulation.hitProbability
  type: RelaxedAtomicUint32
  value: 5
  mirror: always

# TTL for cached full hashes in the simulation cache (seconds)
# Default: 5 minutes (300 seconds)
- name: browser.safebrowsing.realTime.simulation.cacheTTLSec
  type: RelaxedAtomicUint32
  value: 300
  mirror: always

# Whether to enable the negative cache for the simulation.
# When enabled, full hashes that don't trigger a simulated hit are cached
# to skip sending real-time requests for subsequent lookups.
- name: browser.safebrowsing.realTime.simulation.negativeCacheEnabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# TTL for negative cache entries in the simulation cache (seconds).
- name: browser.safebrowsing.realTime.simulation.negativeCacheTTLSec
  type: RelaxedAtomicUint32
  value: 300
  mirror: always

# Number of noise entries to include in simulated requests.
# These are random hash prefixes added to mask the true URL being checked.
- name: browser.safebrowsing.realTime.simulation.noiseEntryCount
  type: RelaxedAtomicUint32
  value: 4
  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

# Whether to only classify top-level channels for safe browsing.
- name: browser.safebrowsing.only_top_level
  type: bool
  value: true
  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

# Whether to show an about:blank window as early as possible for quick startup feedback.
# Held to nightly on Linux due to bug 1450626.
# Disabled on Mac because the bouncing dock icon already provides feedback.
- name: browser.startup.blankWindow
  type: bool
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) && defined(NIGHTLY_BUILD)
  value: true
#else
  value: false
#endif
  mirror: always

# Whether to attempt to use the skeleton UI when starting up.
- name: browser.startup.preXulSkeletonUI
  type: bool
  value: false
  mirror: always

#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

# Whether to restore windows to the virtual desktop (aka workspace)
# they were on when they were closed.
- name: browser.sessionstore.restore_windows_to_virtual_desktop
  type: RelaxedAtomicBool
  value: true
  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, 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 Visitedtext.
- 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

# Whether we block opening pickers from hidden extension pages in WebExtensions.
# This includes background pages and devtools pages, but not background tabs.
- name: browser.disable_pickers_in_hidden_extension_pages
  type: RelaxedAtomicBool
  value: @IS_NIGHTLY_BUILD@
  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

# Allow clipboard data to be copied to the clipboard history/cloud
# (used for sensitive data from about:logins and Private Browsing)
# On GTK this controls the usage of the x-kde-passwordManagerHint MIME.
- name: clipboard.copyPrivateDataToClipboardCloudOrHistory
  type: bool
  value: false
  mirror: always

#ifdef XP_WIN
  # Whether to put a file promise onto the clipboard when copying images on Windows
-   name: clipboard.imageAsFile.enabled
    type: bool
    value: false
    mirror: always

  # On Windows, whether to add PNG before BMP (CF_DIB) in the list of supported
  # formats when copying an image to the clipboard.
-   name: clipboard.copy_image.as_png
    type: RelaxedAtomicBool
    value: true
    mirror: always

  # On Windows, whether we encode an image as PNG (instead of the previous
  # default of BMP) when an application to which we are copying an image
  # requests that it be provided as a temporary file (CF_HDROP).
-   name: clipboard.copy_image_file.as_png
    type: RelaxedAtomicBool
    value: true
    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

# If true, we'll use the triggering principal rather than the loading principal
# when doing CORS checks.  Doing so is generally not correct, but we shipped
# with this behavior for a long time, so we're leaving it preffable in case
# it's needed for testing or if we discover some edge case that requires it.
#
# TODO(dholbert): Remove this pref after the 'false' default-value has
# successfully shipped for a release or two.
- name: content.cors.use_triggering_principal
  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."
#---------------------------------------------------------------------------

# 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.
- name: docshell.shistory.bfcache.ship_allow_beforeunload_listeners
  type: bool
  value: true
  mirror: always

- name: docshell.shistory.sameDocumentNavigationOverridesLoadType
  type: bool
  value: @IS_NOT_NIGHTLY_BUILD@
  mirror: always

- name: docshell.shistory.sameDocumentNavigationOverridesLoadType.forceDisable
  type: String
  value: ""
  mirror: never

#---------------------------------------------------------------------------
# Prefs starting with "dom."
#---------------------------------------------------------------------------

# Allow cut/copy
- name: dom.allow_cut_copy
  type: bool
  value: true
  mirror: always

# Audio Session API: navigator.audioSession surface
https://w3c.github.io/audio-session/
- name: dom.audio_session.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Audio Session API: enables the state changes for Audio Session.
- name: dom.audio_session.state_enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Checks if offscreen animation throttling is enabled.
- name: dom.animations.offscreen-throttling
  type: bool
  value: true
  mirror: always

# Should CommitStyles use the end-point inclusive timing?
- name: dom.animations.commit-styles-endpoint-inclusive
  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

# 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 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

# Similar to caretPositionFromPoint, but non-standard.
- name: dom.caretRangeFromPoint.enabled
  type: bool
  value: true
  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: RelaxedAtomicUint32
  value: 5
  mirror: always

# 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: true
  mirror: always

https://github.com/whatwg/html/pull/10737
- name: dom.dialog.light-dismiss.enabled
  type: bool
  value: true
  mirror: always

# 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 (zstd) (CompressionStream/DecompressionStream)
# Whether or not "zstd" is a supported format for these streams.
- name: dom.compression_streams.zstd.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Enable cookie-store API
- name: dom.cookieStore.enabled
  type: RelaxedAtomicBool
  value: true
  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: false
  mirror: always

- name: dom.document.edit_command.insertBrOnReturn.enabled
  type: bool
  value: false
  mirror: always

# Legacy behavior: include named properties in [[OwnPropertyKeys]] for the
# Window named properties object (see bug 2011056).
- name: dom.window.named_properties_object.legacy_own_property_keys
  type: bool
  value: false
  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

# Whether to enable EditContext API
https://w3c.github.io/edit-context/#dom-editcontext
- name: dom.editcontext.enabled
  type: bool
  value: false
  mirror: always

# HTMLDialogElement.prototype.requestClose
# See https://html.spec.whatwg.org/#dom-dialog-requestclose
- name: dom.element.dialog.request_close.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 the commandfor "toggle" and "open" details commands are enabled
- name: dom.element.commandfor.on_details.enabled
  type: bool
  value: false
  mirror: always

# Eanbles the popover=hint attribute
- name: dom.element.popoverhint.enabled
  type: bool
  value: true
  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

- name: dom.performance.largest_contentful_paint.coarsened_rendertime_enabled
  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: true
  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

# Make EventStateManager restore the last "mouseover" target when it's
# reconnected immediately.  The behavior is similar to Safari and old Chrome.
- name: dom.event.mouse.boundary.restore_last_over_target_from_temporary_removal
  type: bool
  value: false
  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 pointer boundary events should be dispatched after the element is
# changed by a layout change or something without pointer move.
- name: dom.event.pointer.boundary.dispatch_when_layout_change
  type: bool
  value: true
  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 pointerrawupdate event is enabled or disabled.
- name: dom.event.pointer.rawupdate.enabled
  type: bool
  value: true
  mirror: always

# Whether pointerrawupdate's movementX and movementY are set to non-zero values.
- name: dom.event.pointer.rawupdate.movement.enabled
  type: bool
  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 .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

# 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

# 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 execCommand("paste") to web content.
- name: dom.execCommand.paste.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: 2048
  mirror: always

# The maximum number of pending fetch keepalive requests per origin
- name: dom.fetchKeepalive.request_limit_per_origin
  type: RelaxedAtomicUint32
  value: 256
  mirror: always

# Whether to validate that a fetch request's principal is compatible with the
# remote type of the process it originates from.
- name: dom.fetch.validatePrincipalForRemoteType
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether to allow the TYPE_INTERNAL_FORCE_ALLOWED_DTD content policy type on
# fetch requests received from a content process. Only consumers such as
# Thunderbird that still rely on DTD loads should enable this.
- name: dom.fetch.allow_force_allowed_dtd
  type: RelaxedAtomicBool
#if defined(MOZ_THUNDERBIRD)
  value: true
#else
  value: false
#endif
  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

# Whether the Document PictureInPicture API is enabled
https://wicg.github.io/document-picture-in-picture/#api
- name: dom.documentpip.enabled
  type: RelaxedAtomicBool
#ifdef ANDROID
# Always disable on android (unsupported) so that webpages aren't
# confused by the webidl bindings being exposed
  value: false
#else
  value: true
#endif
  mirror: always
  rust: true

# 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: true
  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

# This pref controls whether <input type=search> clears its value on Esc
# keydown.
- name: dom.forms.search.esc
  type: bool
  value: true
  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

# This pref enables the keyboardLock option for requestFullscreen.
- name: dom.fullscreen.keyboard_lock.enabled
  type: bool
#ifdef ANDROID
# Fullscreen Keyboard Lock is not functional on Android, so disable the feature
# until there is handling for it.
  value: false
#else
  value: true
#endif
  mirror: always

# The interval in milliseconds the Escape key needs to be held in order to
# trigger exiting fullscreen.
- name: dom.fullscreen.keyboard_lock.long_press_interval
  type: uint32_t
  value: 1500
  mirror: always

# The interval in milliseconds the warning will be trigger while holding Escape
# key.
- name: dom.fullscreen.keyboard_lock.long_press_warning_interval
  type: uint32_t
  value: 500
  mirror: always

# The interval in milliseconds between Escape key events where the
# third key event will trigger a warning about how to exit full screen,
# when the fullscreen keyboard lock is enabled.
- name: dom.fullscreen.keyboard_lock.triple_click_warn_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

# Whether to require system permission for geolocation access.
# See also `geo.prompt.open_system_prefs` for opening the system preferences dialog.
- name: dom.geolocation.require_system_permission.enabled
  type: bool
#ifdef XP_WIN
  value: true
#else
  value: false
#endif
  mirror: always

# <img loading=lazy sizes=auto>
https://html.spec.whatwg.org/multipage/embedded-content.html#allows-auto-sizes
- name: dom.image.sizes_auto.enabled
  type: bool
  value: true
  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.lazy-loading.margin.top
  type: float
  value: 600
  mirror: always

- name: dom.lazy-loading.margin.top.percentage
  type: bool
  value: false
  mirror: always

- name: dom.lazy-loading.margin.bottom
  type: float
  value: 600
  mirror: always

- name: dom.lazy-loading.margin.bottom.percentage
  type: bool
  value: false
  mirror: always

- name: dom.lazy-loading.margin.left
  type: float
  value: 600
  mirror: always

- name: dom.lazy-loading.margin.left.percentage
  type: bool
  value: false
  mirror: always

- name: dom.lazy-loading.margin.right
  type: float
  value: 600
  mirror: always

- name: dom.lazy-loading.margin.right.percentage
  type: bool
  value: false
  mirror: always

# Whether we use scrollMargin or rootMargin
- name: dom.lazy-loading.margin.is-scroll
  type: bool
  value: true
  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 system IndexedDB access from a content process is allowed.
- name: dom.indexedDB.testing.allowContentSystem
  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

# Whether dispatch a redundant `input` event before `compositionend`.
# Its `.isComposing` is `true`, but it might be useful to store the latest
# composition string before `compositionend` event listeners (although,
# `.data` of `compositionend` event contains the value.
- name: dom.input_events.dispatch_before_compositionend
  type: bool
  value: true
  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

- name: dom.intersection_observer.scroll_margin.enabled
  type: bool
  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 XP_WIN
# Whether or not to restrict the HANDLE types which are allowed to be transferred over IPC.
- name: dom.ipc.handle_type_restrictions.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always
#endif

#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: true
#endif
  mirror: once
#endif

#if defined(XP_WIN)
-   name: dom.ipc.alwaysUseParentBinary
    type: RelaxedAtomicBool
    value: false
    mirror: always
#endif

#if defined(XP_DARWIN)
# Whether or not to use the mach-based IPC backend on macOS/iOS.
# Only read once at startup by IOThreadParent's constructor.
- name: dom.ipc.backend.mach
  type: bool
  value: @IS_IOS@
  mirror: never
#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

# Process preallocation cache
# Only used in fission; in e10s we use 1 always
- name: dom.ipc.processPrelaunch.fission.number
  type: uint32_t
#ifdef ANDROID
  # Bug 1999950: Prelaunch 1 process on Android due to a performance regression.
  value: 1
#else
  value: 3
#endif
  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

# This controls whether JS IPC messages are sent from child to parent using
# the typeable JSIPCValue encoding, or simply sent using structured cloning.
# This being true is necessary to type check messages.
- name: dom.jsipc.send_typed
  type: bool
  value: true
  mirror: always

# Support for input type=month, type=week. By default, disabled.
- name: dom.forms.datetime.others
  type: bool
  value: @IS_ANDROID@
  mirror: always

#ifndef ANDROID
- name: dom.forms.html_color_picker.enabled
  type: bool
  value: @IS_NIGHTLY_BUILD@
  mirror: always
#endif

- name: dom.forms.colorspace.enabled
  type: bool
  value: true
  mirror: always

- name: dom.forms.alpha.enabled
  type: bool
#ifndef ANDROID
  value: @IS_NIGHTLY_BUILD@
#else
  value: false
#endif
  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

# Whether to enable showPicker() support for datalist.
- name: dom.input.showPicker_datalist.enabled
  type: bool
  value: true
  mirror: always

# Does mousewheel-scrolling over a focused <input type="number"> or
# <input type="range"> 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_DARWIN)
  value: false
#else
  value: true
#endif
  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

# If this is set to true, location.ancestorOrigins feature defined
# by the spec https://html.spec.whatwg.org/#concept-location-ancestor-origins-list
# is enabled
- name: dom.location.ancestorOrigins.enabled
  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

# Whether the muted content attribute acts as a live fallback for the muted
# state. Gated to Nightly while other engines have not shipped this behavior.
- name: dom.media.muted-state.enabled
  type: bool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

# Media element pseudo-classes
- name: dom.media.pseudo-classes.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# 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

# WebCodecs API - H265
- name: dom.media.webcodecs.h265.enabled
  type: RelaxedAtomicBool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

# WebCodecs API - Batch encoding size
- name: dom.media.webcodecs.batch-encoding-size
  type: RelaxedAtomicUint32
#if defined(XP_WIN)
  value: 4294967295 # max value of uint32_t
#else
  # Bug 1984936: Batch encoding is not optimized on non-Windows platforms yet.
  value: 1
#endif
  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: RelaxedAtomicInt32
  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: RelaxedAtomicInt32
  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

# ModelContext API
- name: dom.modelcontext.enabled
  type: bool
  value: false
  mirror: always

- name: dom.modelcontext.testing.enabled
  type: bool
  value: false
  mirror: always

# Enable mutiple import maps.
- name: dom.multiple_import_maps.enabled
  type: bool
  value: false
  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: 1000
  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 <object> and <embed> 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: true
  mirror: always
  do_not_use_directly: true

# Strict mode for navigation API.
# Known issues can be guarded using this pref
# to avoid crashing users while investigating the issue.
- name: dom.navigation.api.strict.enabled
  type: bool
  value: false
  mirror: always

# 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 the codebase attribute in an <object> is used as the base URI.
- name: dom.object_embed.codebase.enabled
  type: bool
  value: false
  mirror: always

# Whether the type attribute in an <object> is used as a hint for the Content-Type
# of the loading document.
- name: dom.object_embed.type_hint.enabled
  type: bool
  value: false
  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

# Enable the Picture-in-Picture API
- name: dom.media-pip.enabled
  type: RelaxedAtomicBool
#ifdef ANDROID
# Not yet supported on Android (Fenix), so keep it disabled to avoid
# webpages successfully feature-detecting an API that fails on use.
  value: false
#else
  value: true
#endif
  mirror: always
  rust: true

# User pref to control whether Private Attribution
# information should be collected / submitted.
- name: dom.private-attribution.submission.enabled
  type: bool
  value: false
  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

# Whether the interactionId will be computed and returned by performance observer*
- name: dom.performance.event_timing.enable_interactionid
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether to opt out of system permission check for navigator.permissions.query on testing.
# This is because we cannot control the system permission state on CI.
- name: dom.permissions.testing.enabled
  type: RelaxedAtomicBool
  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

#if !defined(ANDROID)
# Whether to use the platform API to "lock" the native pointer for pointer lock.
- name: dom.pointer-lock.native-lock.enabled
  type: bool
  value: true
  mirror: always
#endif

# Whether the |unadjustedMovement| dictionary member of PointerLockOptions
# is honored. When true, requestPointerLock({unadjustedMovement: true})
# asks the widget to deliver raw, unaccelerated mouse delta in mouse events
# while the lock is active.
- name: dom.pointer-lock.unadjusted-movement.enabled
  type: bool
  value: true
  mirror: always

# Whether the parent process should reset pointer when pointer lock is
# requested.
- name: dom.pointer-lock.reset-to-center-from-parent.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

#ifdef NIGHTLY_BUILD
# When true, Promise::MaybeResolve routes through JS::SafeResolve, which
# implements the thenable-curtailment proposal's MaybeDeferredPromiseResolve.
# In brief: when resolving with a thenable would synchronously run user code,
# the steps that do so are deferred to a microtask, but the promise can no
# longer be resolved by anyone else.
#
# This is experimental. For more details see
# - https://github.com/whatwg/webidl/issues/1584
# - https://github.com/tc39/proposal-thenable-curtailment
- name: dom.promise.experimental_safe_resolve
  type: RelaxedAtomicBool
  value: false
  mirror: always
#endif  // NIGHTLY_BUILD

# 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 try to load origin information from the secondary cache?
#
# When enabled, quota information may be initialized from metadata files
# instead of scanning origin directories, if the cached data is considered
# valid.
#
# For the L2 quota info cache to work effectively, the following pref must also
# be enabled:
#   dom.quotaManager.originInitialization.updateOriginMetadata
#
# That pref ensures that cached metadata is written back to disk after full
# origin initialization. Without it, usable cached info may become outdated or
# missing, and this pref alone will have limited effect.
#
# Expected behavior for various combinations of the two prefs:
#
#   update: false, load: false
#     -> No L2 cache write or read. Full scan is always used.
#
#   update: true, load: false
#     -> Metadata is updated, but not used. Sets up infrastructure without
#        activating the performance optimization.
#
#   update: false, load: true
#     -> Cache read is enabled, but metadata files are not continuously
#        updated, reducing cache effectiveness. Useful only for incremental
#        rollout and testing purposes.
#
#   update: true, load: true
#     -> Full L2 quota info cache functionality is active. Metadata is
#        maintained and used for optimized quota initialization.
#
# See bug 1953860 for background and additional details.
- name: dom.quotaManager.loadQuotaFromSecondaryCache
  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

# Controls the time offset (in seconds) applied when initializing the access
# time for a newly created origin in temporary storage. When set to a positive
# value, the stored access time is artificially adjusted by subtracting the
# specified number of seconds from the current time. This can be used to
# simulate older origins for testing eviction and recency-based cleanup
# behavior.
#
# If the offset value is too large and would cause integer underflow, the
# current time is used as it would have been used normally.
#
# A value of 0 disables this behavior (default).
#
# This setting is for testing only and must not be enabled in production.
- name: dom.quotaManager.temporaryStorage.initialOriginAccessTimeOffsetSec
  type: RelaxedAtomicUint32
  value: 0
  mirror: always

# Controls whether the quota manager updates the last access time for origins
# in temporary storage. When enabled, the access time is updated only when an
# origin is accessed by a quota client for the first time during a session or
# when the last quota client stops accessing the origin. This allows eviction
# based on the LRU policy. When disabled, the access time is stored only once
# when the corresponding origin directory is created for the first time.
#
# This pref must remain set to true in production, setting it to false is
# intended for testing only.
- name: dom.quotaManager.temporaryStorage.updateOriginAccessTime
  type: RelaxedAtomicBool
  value: true
  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.
#
# Note: If dom.quotaManager.temporaryStorage.incrementalOriginInitialization
# is set to true, this preference will be overridden, and the individual
# setting will no longer take effect, regardless of its value.
- name: dom.quotaManager.temporaryStorage.lazyOriginInitialization
  type: RelaxedAtomicBool
  value: false
  mirror: always
  do_not_use_directly: true

# 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.
#
# Note: If dom.quotaManager.temporaryStorage.incrementalOriginInitialization
# is set to true, this preference will be overridden, and the individual
# setting will no longer take effect, regardless of its value.
- name: dom.quotaManager.temporaryStorage.triggerOriginInitializationInBackground
  type: RelaxedAtomicBool
  value: false
  mirror: always
  do_not_use_directly: true

# Should we enable incremental initialization of origins? (also known as
# asynchronous temporary storage initialization)
# When enabled, this preference acts as an override for the following
# preferences:
# - dom.quotaManager.temporaryStorage.lazyOriginInitialization
# - dom.quotaManager.temporaryStorage.triggerOriginInitializationInBackground
#
# Enabling this preference ensures that:
1. Origins for temporary storage are not initialized during temporary storage
#    initialization but are instead initialized incrementally, either lazily or
#    in the background, depending on which occurs first.
2. Background initialization of temporary origins is triggered after the
#    temporary storage initialization. The process is carried out in steps,
#    with each step being responsible for initializing a group of origins.
#
# See also the documentation for those two preferences for more details on
# their individual behaviors.
#
# This feature is currently in development and experimental, not recommended
# for normal use yet.
- name: dom.quotaManager.temporaryStorage.incrementalOriginInitialization
  type: RelaxedAtomicBool
  value: false
  mirror: always
  do_not_use_directly: true

# Should we clear non-persisted origins with zero usage during final steps of
# temporary storage initialization?
# When enabled, the QuotaManager will automatically clear non-persisted
# origins that have zero quota-charged usage during final steps of temporary
# storage initialization. Recently used origins (within the last week) are
# excluded, and clearing is performed in batches to avoid large I/O spikes
# when many origins need to be removed. This removes directories and files
# belonging to origins that do not store any real data but still consume
# resources through bookkeeping structures on disk. The feature helps reduce
# storage bloat and improve initialization performance, especially on
# long-lived profiles with a large number of unused origins.
- name: dom.quotaManager.temporaryStorage.clearNonPersistedZeroUsageOrigins
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Controls the maximum number of origins cleared in a single batch during
# final steps of temporary storage initialization. The value defaults to 50 on
# Android and 150 on other platforms. Smaller values can be useful for testing
# and experimentation to exercise multi-batch clearing behavior without
# requiring hundreds of origins. Larger values may reduce the number of
# batches but can increase I/O spikes.
#
# Currently this pref is only applied when clearing non-persisted zero-usage
# origins, but it is intended to serve as a general batch limit for other
# clearing strategies that may be introduced in the future (for example, to
# remove very old origins).
- name: dom.quotaManager.temporaryStorage.maxOriginsToClearDuringCleanup
  type: RelaxedAtomicUint32
#if defined(MOZ_WIDGET_ANDROID)
  value: 50
#else
  value: 150
#endif
  mirror: always

# When enabled, ClearRequestBase::DeleteFiles would use cached temporary origins
# to clear origin directories rather than scanning the whole storage directory.
- name: dom.quotaManager.temporaryStorage.clearTemporaryOriginsUsingOriginCache
  type: RelaxedAtomicBool
  value: true
  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 group initialization for testing purposes.
- name: dom.quotaManager.groupInitialization.pauseOnIOThreadMs
  type: RelaxedAtomicUint32
  value: 0
  mirror: always

# Should we update the origin metadata file after full origin initialization?
# When enabled, the origin metadata file will be updated after origin
# initialization to ensure it reflects the most recent state.
# This feature is essential for the functionality of the L2 quota info cache.
# The preference may be later removed after a successful full rollout of the
# L2 cache to all users on all platforms in the release channel.
- name: dom.quotaManager.originInitialization.updateOriginMetadata
  type: RelaxedAtomicBool
  value: true
  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

# Whether Scoped Custom Element Registries are enabled
- name: dom.scoped-custom-element-registries.enabled
  type: bool
  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: true
  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: @IS_NIGHTLY_BUILD@
  mirror: always

- name: dom.reporting.header.enabled
  type: RelaxedAtomicBool
  value: true
  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: RelaxedAtomicUint32
  value: 3
  mirror: always

# How many reports should be stored in the report queue before being delivered.
- name: dom.reporting.delivering.maxReports
  type: RelaxedAtomicUint32
  value: 100
  mirror: always

# Enable Screen Orientation lock
- name: dom.screenorientation.allow-lock
  type: bool
  value: true
  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.  Cached after 4 reloads.
#   *  1 : (performance) The bytecode would be saved in order to minimize the
#          page-load time.  Cached after 2 reloads.
#
# 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: true
  mirror: always

# For testing purposes only: Cache stencil across navigation
- name: dom.script_loader.experimental.navigation_cache
  type: bool
  value: false
  mirror: always

# The delay until saving the script disk cache in microseconds.
- name: dom.script_loader.disk_cache_delay_ms
  type: uint32_t
  value: 10000
  mirror: always

# Set to false to avoid clearing the navigation cache, to get the deterministic
# result during the automated testing.
- name: dom.script_loader.experimental.navigation_cache.check_memory_pressure
  type: bool
  value: true
  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

# 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


# Serialize < as < and > as > in attribute values for getHTML, innerHTML etc.
- name: dom.security.html_serialization_escape_lt_gt
  type: RelaxedAtomicBool
  value: true
  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: true
  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: 2200
  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: true
  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, HTTPS-First will upgrade local addresses
- name: dom.security.https_first_for_local_addresses
  type: RelaxedAtomicBool
  value: false
  mirror: always

# If true, HTTPS-First will upgrade unknown suffixes
- name: dom.security.https_first_for_unknown_suffixes
  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: true
  mirror: always

# Disabled until the HTML parser produces PI nodes (bug 2044714)
- name: dom.security.sanitizer.processing-instructions
  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 `digital` credentials being exposed
- name: dom.security.credentialmanagement.digital.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 `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

# Restrict top-level navigations from cross-origin frames.
- name: dom.security.framebusting_intervention.enabled
  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.select.customizable_select.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always
  rust: true

- 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.serviceworkers.loadingCachedScriptOnWorkerThread.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

- 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

# Enable ServiceWorkers in Private Browsing Mode (PBM).  This requires
# dom.cache.privateBrowsing.enabled to be enabled as well.  Registrations are
# not persisted to disk; installed scripts are stored in Cache API storage which
# is encrypted in PBM.
- name: dom.serviceWorkers.privateBrowsing.enabled
  type: RelaxedAtomicBool
  value: true
  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.urlpattern.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: dom.workers.pFetch.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: dom.workers.throttling.enabled
  type: bool
  value: @IS_EARLY_BETA_OR_EARLIER@
  mirror: once

- 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

# Whether to exclude third-party trackers from Storage Access API auto grants.
- name: dom.storage_access.auto_grants.exclude_third_party_trackers
  type: bool
  value: true
  mirror: always

# Storage-access API.
- name: dom.storage_access.enabled
  type: bool
  value: true
  mirror: always

# Enable Storage-Access-Headers
- name: dom.storage_access.headers.enabled
  type: bool
  value: true
  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

# 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.headingoffset.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always
  rust: true

- name: dom.text_fragments.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

- name: dom.text_fragments.create_text_fragment.timeout_seconds
  type: uint32_t
  value: 5
  mirror: always

- name: dom.text_fragments.create_text_fragment.exact_match_max_length
  type: uint32_t
  value: 200
  mirror: always

- 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.
# A URI list in dom.timeout.defer_during_load.force-disable can override this
# and disable this optimization for a site.
- name: dom.timeout.defer_during_load
  type: bool
  value: false
  mirror: always

# Sites we shouldn't defer timeouts and intervals while loading a page.
# comma-separated list, see IsURIInPrefList() for format details
- name: dom.timeout.defer_during_load.force-disable
  type: String
  value: >-
    *.usps.com,
    *.nvidia.com,
    *.fedex.com,
    *.msci.com,
    *.the-saleroom.com,
    *.si.com,
    *.heinnie.com,
    *.hyattinclusivecollection.com
  mirror: never

# 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

# TCPSocket API
- name: dom.tcpsocket_in_child.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# UDPSocket API
- name: dom.udpsocket.enabled
  type: RelaxedAtomicBool
  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: true
  mirror: always
  rust: true

- name: dom.viewTransitions.cross-document.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

# Whether view transitions remain active indefinitely. Useful for debugging.
- name: dom.viewTransitions.remain-active
  type: bool
  value: false
  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

  # Control consuming WM_POINTER for touch pointers instead of WM_TOUCH
-   name: dom.w3c_pointer_events.dispatch_by_pointer_messages.touch
    type: bool
    value: false
    mirror: always

  # Control whether to fire WidgetTouchEvent from pen pointers for APZ to handle scrolling.
-   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
  value: 128
  mirror: always

# W3C pointer events draft.
- name: dom.w3c_pointer_events.implicit_capture
  type: bool
  value: true
  mirror: always

# `click` event target is defined as overridden by pointer capture target in
# Pointer Events.  Set this to true if we should conform to it.  Otherwise,
# consider the target from the pointer position, set this to false.
- name: dom.w3c_pointer_events.dispatch_click_on_pointer_capturing_element
  type: bool
  value: true
  mirror: always

# If `click` event is caused by a tap, the target should not be the target of
# the preceding `pointerup`.  This is compatible with Chrome 136.
- name: dom.w3c_pointer_events.dispatch_click_on_pointer_capturing_element.except_touch
  type: bool
  value: true
  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: true
  mirror: always

# If true, when user selects a range, `Selection` will split the range to
# exclude unselectable content from the range.
- name: dom.selection.exclude_non_selectable_nodes
  type: bool
  value: false
  mirror: always

# Mimic Chrome's window.getSelection().toString() behaviour
- name: dom.selection.mimic_chrome_tostring.enabled
  type: bool
  value: true
  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: true
  mirror: always

- name: dom.shadowdom.referenceTarget.enabled
  type: bool
  value: false
  mirror: always

- name: dom.shadowdom.shadowRootSlotAssignment.enabled
  type: RelaxedAtomicBool
  value: true
  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 the constructed flag error check disabled during adoptedStyleSheets setter?
https://github.com/w3c/csswg-drafts/issues/10013
- name: dom.webcomponents.lift-adoptedstylesheets-restriction.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Is support for the WebGPU API enabled?
#
# When this condition changes, be sure to update the `run-if` / `skip-if`
# conditions in `dom/webgpu/tests/mochitest/*.toml` accordingly.
#
# preprocessor.py doesn't understand parentheses, but && is higher precedence
# than ||, meaning this pref defaults to true on any Windows architecture, or
# on aarch64 (Apple Silicon) MacOS.
- name: dom.webgpu.enabled
  type: RelaxedAtomicBool
#if defined(XP_WIN) || defined(XP_MACOSX) && defined(MOZ_AARCH64)
  value: true
#else
  value: @IS_EARLY_BETA_OR_EARLIER@
#endif
  mirror: always

# Is WebGPU allowed to run in the parent process? This should be false if
# on a platform that supports the GPU process, else true.
- name: dom.webgpu.allow-in-parent
  type: bool
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(ANDROID)
  value: false
#else
  value: true
#endif
  mirror: once

# Is support for the Web GPU API enabled on service workers?
- name: dom.webgpu.service-workers.enabled
  type: RelaxedAtomicBool
#if defined(XP_WIN) || defined(XP_MACOSX) && defined(MOZ_AARCH64)
  value: true
#else
  value: @IS_EARLY_BETA_OR_EARLIER@
#endif
  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) || defined(XP_LINUX) && !defined(ANDROID)
  value: true
#else
  value: false
#endif
  mirror: always

# Whether WebGPU's GPUExternalTexture API is enabled.
- name: dom.webgpu.external-texture.enabled
  type: bool
#if defined(XP_WIN) || defined(XP_MACOSX)
  value: true
#else
  value: false
#endif
  mirror: once

# 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

# Domains for which WebGPU is disabled.
#
# If `nsIGlobalObject::GetBaseURI` returns a base URI in this list,
# then `GPU::requestAdapter` always rejects.
#
# This is a comma-separated list of domains to block. An entry of the
# form `*.DOMAIN` blocks all subdomains of `DOMAIN`. It is interpreted
# by `nsContentUtils::IsURIInList`.
#
# Bugs for the current default contents:
#
# easyeda.com: 1980392
- name: dom.webgpu.blocked-domains
  type: DataMutexString
  value: "easyeda.com,*.easyeda.com"
  mirror: always

# Is support for HTMLInputElement.webkitEntries enabled?
- name: dom.webkitBlink.filesystem.enabled
  type: bool
  value: true
  mirror: always

# Whether the WebMIDI API is enabled
- name: dom.webmidi.enabled
  type: bool
  value: @IS_NOT_MOBILE@
  mirror: always

# midi permission is addon-gated
- name: dom.webmidi.gated
  type: bool
  value: true
  mirror: always

# Whether the WebSerial API is enabled
- name: dom.webserial.enabled
  type: RelaxedAtomicBool
  value: @IS_NOT_MOBILE@
  mirror: always

# Whether the WebSerial API is addon-gated
- name: dom.webserial.gated
  type: RelaxedAtomicBool
  value: true
  mirror: always

# whether to use the TestSerialPlatformService
- name: dom.webserial.testing.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: dom.webnotifications.allowcrossoriginiframe
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: dom.webnotifications.forbid_nested_first_party.enabled
  type: RelaxedAtomicBool
  value: true
  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) || defined(XP_LINUX)
  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

- name: dom.webnotifications.actions.enabled
  type: RelaxedAtomicBool
  value: true
  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

# Allow notificationclick to open window only during the limited timeframe.
- name: dom.webnotifications.disable_open_click_delay
  type: RelaxedAtomicUint32
#if defined(ANDROID)
  # Allow service workers to open windows for a longer period after a notification
  # click on mobile. This is to account for some devices being quite slow (bug 1409761)
  value: 5000
#else
  value: 1000
#endif
  mirror: always

# Forcing all notification requests do storage cleanup.
- name: dom.webnotifications.testing.force_storage_cleanup.enabled
  type: bool
  value: false
  mirror: always

# Block notifications and revoke permission for sites on Safe Browsing lists.
- name: dom.webnotifications.block_if_on_safebrowsing
  type: RelaxedAtomicBool
  value: true
  mirror: always

- 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 or not the `Origin-Agent-Cluster` HTTP header is enabled.
- name: dom.origin_agent_cluster.enabled
  type: bool
  value: true
  mirror: always

# Whether or not agent clusters are origin-keyed by default, blocking the use of
# `document.domain`.
- name: dom.origin_agent_cluster.default
  type: bool
  value: false
  mirror: always

# Whether to make the document name getter follow the spec.
- name: dom.document.name_getter_follow_spec.enabled
  type: bool
  value: true
  mirror: always

# Whether to block the shadowing of known document properties.
- name: dom.document.name_getter_prevent_shadowing.enabled
  type: bool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

# Whether to enable about:blank async-load workaround for ckeditor.
- name: dom.about-blank-ckeditor-hack.enabled
  type: bool
  value: true
  mirror: always

# Per-domain blocklist for the previous hack.
- name: dom.about-blank-ckeditor-hack.disabled-domains
  type: String
  value: ""
  mirror: never

# Whether to enable about:blank async-load workaround for GWT's RichTextArea.
- name: dom.about-blank-gwt-hack.enabled
  type: bool
  value: true
  mirror: always

# Whether to enable about:blank async-load workaround for Polarion's version of
# the GWT's RichTextArea.
- name: dom.about-blank-polarion-gwt-hack.enabled
  type: bool
  value: true
  mirror: always

# Per-domain blocklist for the GWT hack.
- name: dom.about-blank-gwt-hack.disabled-domains
  type: String
  value: ""
  mirror: never

# Whether to enable about:blank async-load workaround for ZE.
- name: dom.about-blank-ze-hack.enabled
  type: bool
  value: true
  mirror: always

# Per-domain blocklist for the previous hack.
- name: dom.about-blank-ze-hack.disabled-domains
  type: String
  value: ""
  mirror: never

# Whether to include common ancestor when serializing HTML data for clipboard copy.
- name: dom.serializer.includeCommonAncestor.enabled
  type: bool
  value: false
  mirror: always

# Whether to enable XSLT.
- name: dom.xslt.enabled
  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`, "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

# 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

- name: extensions.web_accessible_workers.deprecated_behavior
  type: bool
  value: false
  mirror: always

# Whether the InstallTrigger global should be enabled (kept for compatibility,
# as it is still used in the wild as an improper UA detection method)
- name: extensions.InstallTrigger.enabled
  type: bool
  value: true
  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

# executeScript in moz-extension documents was deprecated in bug 2011234.
# When true, allows executeScript to run in moz-extension documents as before.
# TODO bug 2039393: Remove this pref.
- name: extensions.webextensions.allow_executeScript_in_moz_extension
  type: bool
  value: false
  mirror: always

# Whether file:-access requires another opt-in besides host permissions.
# When false, file access is granted together with the "<all_urls>" permission
# ("Access your data for all websites"). When true, access to file:-schemes
# requires an additional opt-in by the user, on top of the host permission.
- name: extensions.webextensions.fileSchemeAccess.requireOptIn
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Prior to bug 2013389 and bug 2017797, calling structuredClone within a
# content script would clone most objects within the content script's realm,
# however a subset of DOM objects would be cloned into the underlying content
# window's realm. When enabled, this pref preserves this legacy behaviour for
# compatibility with existing content scripts.
- name: extensions.webextensions.legacyStructuredCloneBehavior
  type: bool
  value: true
  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: true
  mirror: never

# 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`.
# On Android, this is currently overridden: for Fenix - via nimbus.fml.yml,
# and for other Andoid Components consumers value 2 is hardcoded
# in the default settings in mozilla.components.concept.engine.Settings
- 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

# 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 012, 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

#ifdef XP_WIN
# Use Windows Runtime Geolocator for location service.
- name: geo.provider.use_winrt
  type: bool
  value: true
  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."
#---------------------------------------------------------------------------

- 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

- name: gfx.canvas.accelerated.allow-in-parent
  type: bool
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(ANDROID)
  value: false
#else
  value: true
#endif
  mirror: once

# 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-data-shmems
  type: RelaxedAtomicUint32
  value: 400
  mirror: always

- name: gfx.canvas.accelerated.max-export-surfaces
  type: RelaxedAtomicUint32
  value: 100
  mirror: always

- name: gfx.canvas.accelerated.max-export-surface-memory
  type: RelaxedAtomicUint32
  value: 512 * 1024 * 1024
  mirror: always

- name: gfx.canvas.accelerated.max-snapshot-pbo-memory
  type: RelaxedAtomicUint32
  value: 64 * 1024 * 1024
  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

- name: gfx.canvas.max-size
  type: RelaxedAtomicInt32
  value: 0xffff
  mirror: always

- name: gfx.canvas.max-area
  type: RelaxedAtomicUint32
  value: 0x3fffffff
  mirror: always

# Whether OffscreenCanvas can use remote canvas
- name: gfx.canvas.remote.allow-offscreen
  type: RelaxedAtomicBool
  value: true
  mirror: always

# 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

#ifdef XP_WIN
- name: gfx.canvas.remote.use-draw-image-fast-path-d3d
  type: RelaxedAtomicBool
  value: true
  mirror: always
#endif

- 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.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

# Enable reporting video-dynamic-range: high media capability when document is
# on an HDR-enabled desktop, this tells websites to serve HDR video and allows
# video overlaysk to use HDR transfer functions.  In future this will also
# enable rendering web content in HDR.
- name: gfx.color_management.hdr
  type: RelaxedAtomicBool
#if defined(XP_MACOSX) || defined(XP_WIN)
  value: true
#else
  value: false
#endif
  mirror: always

# Enable HDR features even if displays are not HDR capable, useful for testing
# purposes.
- name: gfx.color_management.hdr.force_enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Use a shader as a fallback if the regular video processor does not support a
# format combination (e.g. YUV BT.2100 HLG to RGB BT.2100 PQ), this may use more
# energy than using the regular video processor
- name: gfx.color_management.hdr.yuv_to_rgb_video_shader.fallback
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Use a shader to convert YUV video to RGB video in all cases, this uses more
# power than using VideoProcessorBlt but does make it look identical across
# drivers.
- name: gfx.color_management.hdr.yuv_to_rgb_video_shader.always
  type: RelaxedAtomicBool
  value: true
  mirror: always

#ifdef XP_MACOSX
# Whether GL contexts can be migrated to a different GPU (to match the one the
# OS is using for composition).
- name: gfx.compositor.gpu-migration
  type: RelaxedAtomicBool
  value: true
  mirror: always
#endif

#ifdef XP_DARWIN
- name: gfx.core-animation.tint-opaque
  type: RelaxedAtomicBool
  value: false
  mirror: always

  # 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) && defined(XP_MACOSX)
    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 (00)
  # 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

#ifdef XP_WIN
- 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
#endif

# Rate by which the frame rate is divided. I.e. at a number higher than 1 we
# will only refresh every <x> 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.
#   0 - no validation
#   1 - validate (logging errors to console) but drop table without rejecting
#       font resource if errors are found
#   2 (or other) - validate, and reject font if errors are found
- name: gfx.downloadable_fonts.otl_validation
  type: RelaxedAtomicUint32
#if defined(RELEASE_OR_BETA)
  value: 0
#else
  value: 1
#endif
  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

#if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_ANDROID)
  # -1 = disabled (no preblend, original behavior)
  #  0 = sRGB transfer
  # >0 = value/100.0 exponent
-   name: gfx.font_rendering.freetype.gamma
    type: RelaxedAtomicInt32
#ifdef MOZ_WIDGET_ANDROID
    value: 140
#else
    # TODO(1910291): switch to gamma=0, enhanced_contrast=100 to fix subpixel bleed (major distros)
    value: -1
#endif
    mirror: always

  # value/100.0, only used when gamma >= 0
-   name: gfx.font_rendering.freetype.enhanced_contrast
    type: RelaxedAtomicInt32
#ifdef MOZ_WIDGET_ANDROID
    value: 0
#else
    value: 0
#endif
    mirror: always
#endif

#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)65535
  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

# Enable dithering in DrawTargetSkia
- name: gfx.skia.dithering
  type: bool
  value: false
  mirror: once

# 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

#ifdef XP_MACOSX
- name: gfx.use-iosurface-textures
  type: bool
  value: false
  mirror: once
#endif

#ifdef XP_WIN
- name: gfx.use-mutex-on-present
  type: bool
  value: false
  mirror: once
#endif

#ifdef MOZ_WIDGET_ANDROID
# Use SurfaceTextures as preferred backend for TextureClient/Host.
- name: gfx.use-surfacetexture-textures
  type: bool
  value: false
  mirror: once
#endif

- 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

# 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
#ifdef MOZ_WEBRENDER_DEBUGGER
  value: true
#else
  value: false
#endif
  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

- name: gfx.webrender.debug.dl.dump-spatial-tree
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: gfx.webrender.debug.highlight-backdrop-filters
  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

# When true, missing stacking context snapshots will crash the GPU or Parent
# process.
- name: gfx.webrender.debug.missing-snapshot-panic
  type: RelaxedAtomicBool
  value: false
  mirror: always

# When true, missing stacking context snapshots will render as an opaque
# pink image.
- name: gfx.webrender.debug.missing-snapshot-pink
  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_DARWIN)
  value: true
#else
  value: false
#endif
  mirror: once

- name: gfx.webrender.layer-compositor
  type: RelaxedAtomicBool
#if defined(XP_WIN)
  value: true
#else
  value: false
#endif
  mirror: always

#ifdef XP_WIN
- name: gfx.webrender.layer-compositor-force-composition-surface
  type: bool
  value: false
  mirror: once

- name: gfx.webrender.layer-compositor-use-dcomp-texture
  type: bool
  value: false
  mirror: once
#endif

- name: gfx.webrender.dcomp-texture-overlay-win
  type: bool
  value: false
  mirror: once

- 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

# 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
-   name: gfx.webrender.swap-chain-allow-tearing
    type: bool
    value: false
    mirror: once
#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
#if defined(XP_WIN)
  value: 512
#else
  value: 1024
#endif
  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

#ifdef XP_WIN
# 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.d3d11.upload-mode
  type: RelaxedAtomicInt32
  value: 4
  mirror: always
#endif

#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GTK)
- name: gfx.webrender.software.opengl
  type: bool
#if defined(MOZ_WIDGET_ANDROID)
  value: true
#else
  value: false
#endif
  mirror: once
#endif

# 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)
  value: true
#else
  value: false
#endif
  mirror: once

# Disable wait of GPU execution completion
- name: gfx.webrender.wait-gpu-finished.disabled
  type: bool
  value: false
  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 overlays for HDR content
- name: gfx.webrender.overlay-hdr
  type: bool
  value: true
  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

# Enable dithering in hardware WebRender
- name: gfx.webrender.dithering
  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)
#---------------------------------------------------------------------------

#ifdef XP_MACOSX
- name: gl.allow-high-power
  type: RelaxedAtomicBool
  value: true
  mirror: always
#endif

#ifdef XP_WIN
- name: gl.ignore-dx-interop2-blacklist
  type: RelaxedAtomicBool
  value: false
  mirror: always
#endif

- 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 compressed size of images we cache that
# are unused.
- name: image.cache.size
  type: int32_t
  value: 20*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 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 <img> 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

# If true, then the HTMLImageElement naturalWidth and naturalHeight APIs will
# fall back to the default concrete object size (300x150) for images that lack
# a natural width and/or height.
- name: image.natural-size-fallback.enabled
  type: RelaxedAtomicBool
  value: true
  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

# 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: bool
  value: true
  mirror: once

# 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: bool
  value: false
  mirror: once

#ifdef MOZ_JXL
# Whether we attempt to decode JXL images or not.
- name: image.jxl.enabled
  type: RelaxedAtomicBool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

#endif

#---------------------------------------------------------------------------
# Prefs starting with "intl."
#---------------------------------------------------------------------------

# The number of ticks before notifying IME of a position change caused by scrolling.
#
# If this is set to 1, IMEContentObserver notifies the position change at the next vsync
# update. In this case, the IME UI is updated quickly and appears smooth. However, this
# can make scrolling slower when the editing host contains a large number of nodes.
# If this is set to 0, IMEContentObserver won't notify IME of position change caused by
# scrolling.
#
# On the other hand, larger values delay IME UI updates during/after scrolling. Although
# Gecko can skip some layout computations in this case, the delayed IME UI updates may
# still make scrolling feel sluggish.
- name: intl.ime.content_observer.notifications.position_change.ticks_after_scrolling
  type: uint32_t
  value: 10
  mirror: always

#ifdef XP_WIN
  # 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

  # 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 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 WeChat Input Method is active TIP.
-  name: intl.tsf.hack.we_chat_input_method.do_not_return_no_layout_error
   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: false
    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
#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

#---------------------------------------------------------------------------
# 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

# Select which OMT baseline compilation strategy to use:
#    0:  None.  Disables OMT baseline compilation entirely.
#
#    1:  On-demand only.  Only perform OMT baseline compilation
#        when needed during execution.
#
#    2:  Eager compilation only.  This will perform OMT baseline
#        compilation eagerly when JitHints and bytecode is available.
#
#    3:  Eager and on-demand.  Perform eager compilation when
#        JitHints and bytecode is available whenever possible,
#        and also perform on-demand OMT baseline compilation.
#
#    4:  Aggressive eager compilation.  This is aggressively
#        compiling all functions eagerly when bytecode is available,
#        regardless of JitHints.  Not recommended for normal use.
#
- name: javascript.options.baselinejit.offthread_compilation_strategy
  type: uint32_t
  value: 2
  mirror: always  # LoadStartupJSPrefs

# 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: 140
  mirror: always
  do_not_use_directly: true

# Whether object fuses are used to optimize constant properties on the global
# object and its lexical environment object.
- name: javascript.options.objectfuse_for_global
  type: bool
  value: true
  mirror: always
  set_spidermonkey_pref: startup

# Whether object fuses are used to optimize constant properties on builtin JS
# constructors and prototypes.
- name: javascript.options.objectfuse_for_js_builtin_ctors_protos
  type: bool
  value: true
  mirror: always
  set_spidermonkey_pref: startup

# Whether object fuses are used to optimize constant properties on all JS
# objects that are used as prototypes.
- name: javascript.options.objectfuse_for_all_protos
  type: bool
  value: true
  mirror: always
  set_spidermonkey_pref: startup

- name: javascript.options.compact_on_user_inactive
  type: bool
  value: true
  mirror: always

# Determines which register allocator will be used by the Ion backend for JS and
# Wasm code. Possible values:
#
#  0: default register allocator (currently always the Backtracking allocator)
#  1: always use the Backtracking allocator
#  2: always use the Simple allocator
#  other values: same as 0
- name: javascript.options.ion.regalloc
  type: uint32_t
  value: 0
  mirror: always
  set_spidermonkey_pref: startup

# 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

# No-op pref for testing fuzzing-safe handling of the SpiderMonkey pref system.
- name: javascript.options.tests.fuzzing-unsafe-pref
  type: bool
  value: false
  mirror: always
  set_spidermonkey_pref: always
  fuzzing_safe: false

# 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: 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

  # Experimental support for Atomics.pause in JavaScript.
- name: javascript.options.experimental.atomics_pause
  type: bool
  value: true
  mirror: always
  set_spidermonkey_pref: startup

  # Experimental support for Error.isError in JavaScript.
- name: javascript.options.experimental.error_iserror
  type: bool
  value: true
  mirror: always
  set_spidermonkey_pref: always

# Support for Atomics.waitAsync in JavaScript.
- name: javascript.options.atomics_wait_async
  type: bool
  value: true
  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: true
  mirror: always
  set_spidermonkey_pref: startup

  # Experimental support for Iterator Sequencing in JavaScript.
- name: javascript.options.experimental.iterator_sequencing
  type: bool
  value: true
  mirror: always
  set_spidermonkey_pref: startup

  # Experimental support for Joint Iteration in JavaScript.
- name: javascript.options.experimental.joint_iteration
  type: bool
  value: true
  mirror: always
  set_spidermonkey_pref: startup

# Experimental support for Legacy RegExp in JavaScript.
- name: javascript.options.experimental.legacy_regexp
  type: bool
  value: @IS_NIGHTLY_BUILD@
  mirror: always
  set_spidermonkey_pref: always

  # Experimental support for import text in JavaScript.
- name: javascript.options.experimental.import_text
  type: bool
  value: true
  mirror: always
  set_spidermonkey_pref: always

  # Experimental support for Intl Locale Info in JavaScript.
- name: javascript.options.experimental.intl_locale_info
  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 Iterator.range in JavaScript.
-   name: javascript.options.experimental.iterator_range
    type: bool
    value: false
    mirror: always
    set_spidermonkey_pref: startup

  # Experimental support for immutable ArrayBuffers in JavaScript.
-   name: javascript.options.experimental.arraybuffer_immutable
    type: bool
    value: false
    mirror: always
    set_spidermonkey_pref: startup

  # Experimental support for import bytes in JavaScript.
- name: javascript.options.experimental.import_bytes
  type: bool
  value: false
  mirror: always
  set_spidermonkey_pref: startup

  # Experimental support for Promise.allKeyed in JavaScript.
- name: javascript.options.experimental.promise_allkeyed
  type: bool
  value: false
  mirror: always
  set_spidermonkey_pref: startup

  # Experimental support for Iterator Chunking in JavaScript.
- name: javascript.options.experimental.iterator_chunking
  type: bool
  value: false
  mirror: always
  set_spidermonkey_pref: startup

 # Experimental support for Iterator.join in JavaScript.
- name: javascript.options.experimental.iterator_join
  type: bool
  value: false
  mirror: always
  set_spidermonkey_pref: startup

  # Experimental support for Iterator Includes in JavaScript.
- name: javascript.options.experimental.iterator_includes
  type: bool
  value: false
  mirror: always
  set_spidermonkey_pref: startup

  # Experimental support for WASM/EcmaScript module integration in JavaScript.
- name: javascript.options.experimental.wasm_esm_integration
  type: RelaxedAtomicBool
  value: false
  mirror: always
  set_spidermonkey_pref: always
#endif  // NIGHTLY_BUILD

  # Capture stack traces for OOM
- name: javascript.options.experimental.capture_oom_stack_trace
  type: bool
  value: true
  mirror: always
  set_spidermonkey_pref: startup

# Whether to Baseline-compile self-hosted functions the first time they are
# used and cache the result.
- name: javascript.options.experimental.self_hosted_cache
  type: bool
  value: false
  mirror: always
  set_spidermonkey_pref: always

  # Experimental support for Temporal in JavaScript.
- name: javascript.options.experimental.temporal
  type: bool
  value: true
  mirror: always
  set_spidermonkey_pref: startup

#ifdef ENABLE_EXPLICIT_RESOURCE_MANAGEMENT
  # Experimental support for Explicit Resource Management in JavaScript.
-   name: javascript.options.experimental.explicit_resource_management
    type: bool
    value: true
    mirror: always
    set_spidermonkey_pref: always
#endif  // ENABLE_EXPLICIT_RESOURCE_MANAGEMENT

  # Experimental support for source phase imports in JavaScript.
- name: javascript.options.experimental.source_phase_imports
  type: RelaxedAtomicBool
  value: true
  mirror: always
  set_spidermonkey_pref: always

  # Enable support for <module source> module used in test262
- name: javascript.options.experimental.source_phase_imports.test262_module_source
  type: bool
  value: false
  mirror: always
  set_spidermonkey_pref: startup

- name: javascript.options.experimental.error_capture_stack_trace
  type: bool
  value: true
  mirror: always
  set_spidermonkey_pref: always

- name: javascript.options.experimental.error_stack_trace_limit
  type: bool
  value: true
  mirror: always
  set_spidermonkey_pref: startup

- 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_trace_api
  type: bool
  value: false
  mirror: always
  set_spidermonkey_pref: always

# Whether we should try to report extra information about a trap in
# wasm linear memory.
- name: javascript.options.wasm_memory_debugging
  type: bool
  value: false
  mirror: always
  set_spidermonkey_pref: always

- name: javascript.options.wasm_exception_force_stack_trace
  type: bool
  value: false
  mirror: always
  set_spidermonkey_pref: 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: true
#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_memory_control
    type: bool
    value: false
    mirror: always
    set_spidermonkey_pref: always
    fuzzing_safe: false

-   name: javascript.options.wasm_branch_hinting
    type: bool
#if defined(ENABLE_WASM_BRANCH_HINTING)
    value: true
#else
    value: false
#endif
    mirror: always
    set_spidermonkey_pref: always

-   name: javascript.options.wasm_custom_page_sizes
    type: bool
    value: false
    mirror: always
    set_spidermonkey_pref: startup
    fuzzing_safe: false

-   name: javascript.options.wasm_compact_imports
    type: bool
    value: false
    mirror: always
    set_spidermonkey_pref: always

- name: javascript.options.wasm_components
  type: bool
  value: false
  mirror: always
  set_spidermonkey_pref: always
  fuzzing_safe: false

#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_stack_switching
    type: bool
    value: false
    mirror: always
    set_spidermonkey_pref: always

# Read once per ContStackAllocator at first allocation; changes at runtime
# do not take effect for an already-initialized allocator.
- name: javascript.options.wasm_cont_stack_size
  type: uint32_t
#if defined(HAVE_64BIT_BUILD)
  value: 1 * 1024 * 1024
#else
  value: 512 * 1024
#endif
  mirror: always
  set_spidermonkey_pref: always

# Read once per ContStackAllocator at first allocation; changes at runtime
# do not take effect for an already-initialized allocator.
- name: javascript.options.wasm_cont_stack_arena_capacity
  type: uint32_t
  value: 8
  mirror: always
  set_spidermonkey_pref: always

-   name: javascript.options.wasm_js_promise_integration
    type: bool
    value: true
    mirror: always
    set_spidermonkey_pref: always

-   name: javascript.options.wasm_test_serialization
    type: bool
    value: false
    mirror: always
    set_spidermonkey_pref: always
    fuzzing_safe: false

# 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: true
    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 wasm loop unrolling and peeling in wasm-via-Ion.  This enables
# both unrolling and peeling.
- name: javascript.options.wasm_unroll_loops
  type: bool
  value: true
  mirror: always
  set_spidermonkey_pref: always

# The number of times a loop is unrolled, not counting the peeled iteration.
# Minimum is 2 -- otherwise we're not unrolling at all.  From testing with
# JetStream3 (wasm tests), it's hard to get consistently better performance
# than simply by unrolling by 3, regardless of loop size.
- name: javascript.options.wasm_unroll_factor
  type: uint32_t
  value: 3
  mirror: always
  set_spidermonkey_pref: always

# Support for the Wide Arithmetic proposal (i64.add/sub128, i64.mul_wide_s/u)
- name: javascript.options.wasm_wide_arithmetic
  type: bool
  value: @IS_NIGHTLY_BUILD@
  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_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

# Testing pref to force the ScriptPreloader to remain active even after
# browser-delayed-startup-finished. Only takes effect when running in automation.
# This allows tests to exercise the cache after startup has completed.
- name: javascript.options.force_preloader_active
  type: bool
  value: false
  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

# Attempt to dispatch multiple microtasks without doing a full
# setup and teardown between each task.
- name: javascript.options.batch_microtask_execution
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether to treat "ducktyped" error objects like `{message: "<message>", fileName: "foo", lineNumber: 1}`
# as real Error objects during exception handling.
- name: javascript.options.ducktyped_errors
  type: bool
  value: false
  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: false
  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 show a warning if asm.js is used.
- name: javascript.options.warn_asmjs_deprecation
  type: bool
  value: true
  mirror: always
  set_spidermonkey_pref: 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

#ifdef XP_WIN
- name: layers.d3d11.force-warp
  type: bool
  value: false
  mirror: once

- name: layers.d3d11.enable-blacklist
  type: bool
  value: true
  mirror: once
#endif

# 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

# If true, allow the parent process as a fallback for compositing due to an
# unstable GPU process, otherwise simply crash the parent process.
- name: layers.gpu-process.allow-fallback-to-parent
  type: bool
  value: @IS_NOT_XP_WIN@
  mirror: once

- name: layers.gpu-process.enabled
  type: bool
#if defined(XP_WIN) || defined(MOZ_WIDGET_ANDROID) || defined(XP_MACOSX)
  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

# If true, when the process is in the background, we refuse to launch the GPU
# process and instead fail with a temporary error that we can recover from when
# we enter the foreground and the GPU process launches.
- name: layers.gpu-process.launch-in-background
  type: bool
  value: @IS_NOT_ANDROID@
  mirror: always

# On Mac, enables using the `<Brand> GPU Helper` executable as the
# GPU child process instead of the plugin-container executable. This does
# not control if a GPU process is used. It controls which executable the GPU
# process runs in on macOS when it is enabled.
#if defined(XP_MACOSX)
-   name: layers.gpu-process-executable.enabled
    type: RelaxedAtomicBool
    value: true
    mirror: always
#endif

- 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 additional attempts to launch the GPU process we try if we fail
# during process launch, before any configuration is attempted.
- name: layers.gpu-process.max_launch_attempts
  type: RelaxedAtomicInt32
  value: 2
  mirror: always

# How many unstable GPU process restarts we allow for a given configuration.
- name: layers.gpu-process.max_restarts
  type: RelaxedAtomicInt32
  value: 6
  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: 30000
  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: 10000
  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

#ifdef XP_DARWIN
- name: layers.iosurfaceimage.recycle-limit
  type: RelaxedAtomicUint32
  value: 15
  mirror: always
#endif

#---------------------------------------------------------------------------
# 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 tree-counting functions (sibling-index(), sibling-count()).
https://drafts.csswg.org/css-values-5/#tree-counting
- name: layout.css.tree-counting-functions.enabled
  type: RelaxedAtomicBool
  value: @IS_NIGHTLY_BUILD@
  mirror: always
  rust: true

# Whether to enable CSS Anchor Positioning support.
https://drafts.csswg.org/css-anchor-position-1/
- name: layout.css.anchor-positioning.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# Whether to enable position-try-order
- name: layout.css.anchor-positioning.position-try-order.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# Whether to enable appearance: base for authors.
- name: layout.css.appearance-base.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always
  rust: true

# Whether to enable generalized CSS Attr Support. If this pref is set to false
# we treat attr as a regular function with support only for the `content` css
# property. If it is set to true, attr is parsed as a subtitution function.
https://drafts.csswg.org/css-values-5/#attr-notation
- name: layout.css.attr.enabled
  type: RelaxedAtomicBool
  value: @IS_NIGHTLY_BUILD@
  mirror: always
  rust: true

# Whether to enable CSS @custom-media
https://drafts.csswg.org/mediaqueries-5/
# TODO(emilio): Needs more tests before enabling.
- name: layout.css.custom-media.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always
  rust: true

# Whether to enable CSS Module Scripts support.
https://html.spec.whatwg.org/#creating-a-css-module-script
- name: layout.css.module-scripts.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# 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 @starting-style is enabled?
- name: layout.css.starting-style-at-rules.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# Whether style() container queries are enabled
- name: layout.css.style-queries.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

# Expiration deadline for the stylesheet cache.
- name: layout.css.stylesheet-cache.timeout_ms
  type: uint32_t
  value: 15000
  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-appearance` property is exposed to content.
- name: layout.css.moz-appearance.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# Whether the `-moz-appearance` property is exposed to CSSStyleProperties.
- name: layout.css.moz-appearance.webidl.enabled
  type: RelaxedAtomicBool
  value: false
  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

# Is the codepath for using cached scrollbar styles enabled?
- name: layout.css.cached-scrollbar-styles.enabled
  type: bool
  value: true
  mirror: always

# 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 background-clip: border-area enabled?
#
# NOTE(emilio): Before enabling on content, we need to add support for dotted /
# dashed / double borders to the codepath, see bug 2046372.
- name: layout.css.background-clip.border-area.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always
  rust: true

# 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 shape() enabled?
- name: layout.css.basic-shape-shape.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# Is support for CSS Borders 4 corner-shape enabled?
- name: layout.css.corner-shape.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always
  rust: true

# Is multiple color items upported for color-mix()?
- name: layout.css.color-mix-multi-color.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# Is support for the contrast-color() function enabled?
- name: layout.css.contrast-color.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

# Is support for GeometryUtils.convert*FromNode enabled?
- name: layout.css.convertFromNode.enabled
  type: bool
  value: false
  mirror: always

# Is support for closest/farthest-corner enabled in ellipse()?
- name: layout.css.ellipse-corners.enabled
  type: RelaxedAtomicBool
  value: @IS_NIGHTLY_BUILD@
  mirror: always
  rust: true

- name: layout.css.cross-fade.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always
  rust: true

# Is support for light-dark() on images in content enabled?
- name: layout.css.light-dark.images.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 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: true
  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: RelaxedAtomicInt32
  value: 3
  mirror: always

# Select a method for mapping colors into sRGB gamut:
#   0 = Clip (default),
#   1 = CSS binary search
#   2 = Raytrace
- name: layout.css.gamut-mapping.method
  type: RelaxedAtomicUint32
  value: 0
  mirror: always

# Is support for GeometryUtils.getBoxQuads enabled?
- name: layout.css.getBoxQuads.enabled
  type: bool
  value: false
  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
#if defined(NIGHTLY_BUILD) || defined(MOZ_THUNDERBIRD)
  value: true
#else
  value: false
#endif
  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

# 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: -moz-hidden-unscrollable enabled
- name: layout.css.overflow-moz-hidden-unscrollable.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always
  rust: true

# 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: true
  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: true
  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

# Enable revert-rule: https://drafts.csswg.org/css-cascade-5/#revert-rule-keyword
- name: layout.css.revert-rule.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

# Em-height scaling percentage used for ruby positioning:
0 means use legacy behavior (based on line-box height);
100 to use ascent/descent normalized to a total of 1em;
# larger values will scale the em height accordingly.
# The used value (if non-zero) is clamped to [100200] to
# avoid sending annotations hugely far away from the base.
- name: layout.css.ruby.normalize-metrics-factor
  type: uint32_t
  value: 100
  mirror: always

- name: layout.css.scroll-snap.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-snap.spring-constant
  type: AtomicFloat
  value: 250.0f
  mirror: always

# If enabled, CSSOM-View scroll-behavior uses the same physics as
# scroll animations for user input (mousewheel or keyboard), rather
# than the snappier-feeling scroll snap physics.
- name: layout.css.scroll-behavior.same-physics-as-user-input
  type: bool
  value: false
  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: @IS_NIGHTLY_BUILD@
  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

# Whether container scroll-state queries are enabled.
- name: layout.css.scroll-state.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always
  rust: true

# 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 111213 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 "modern" uppercase mapping of ß to ẞ (rather than SS) is used.
- name: layout.css.text-transform.uppercase-eszett.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Is support for CSS text-autospace property enabled?
https://drafts.csswg.org/css-text-4/#text-autospace-property
- name: layout.css.text-autospace.enabled
  type: bool
  value: true
  mirror: always

# Is support for CSS text-box property enabled?
https://drafts.csswg.org/css-inline-3/#text-box-shorthand
- name: layout.css.text-box.enabled
  type: bool
  value: false
  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

- name: layout.css.text-decoration-inset.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

- name: layout.css.link-parameters.enabled
  type: bool
  value: @IS_NIGHTLY_BUILD@
  mirror: always
  rust: true

# Support for the css Zoom property.
- name: layout.css.zoom.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# CSS for android picture-in-picture. See bug 1940052.
- name: layout.css.android-pip.enabled
  type: RelaxedAtomicBool
  value: true
  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 <input type=search> 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 <input type=password>.
- 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

# Whether synthesize eMouseMove for dispatching mouse boundary events after
# a layout change or a scroll.
- name: layout.reflow.synthMouseMove
  type: bool
  value: true
  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

# This will automatically enable inline spellchecking (if it is available) for
# editable elements in HTML.
0 = spellcheck nothing
1 = check multi-line controls [default]
2 = check multi/single line controls
- name: layout.spellcheckDefault
  type: int32_t
  value: 1
  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

# Whether we always hide the scrollbars, to avoid them affecting the visual
# metrics of some performance tests.
- name: layout.testing.scrollbars.always-hidden
  type: RelaxedAtomicBool
  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 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'?
# NOTE: This pref being 'true' is sufficient to enable this keyword in the
# 'width' and 'height' properties (and their logical aliases).  To enable
# the keyword for other properties, see the "all-size-properties" variant
# below.
- name: layout.css.webkit-fill-available.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# This pref is an additional gate on whether the '-webkit-fill-available'
# keyword is enabled for other size-valued CSS properties (beyond 'width' and
# 'height'). In such properties, -webkit-fill-available will not be accepted
# unless this pref *and* layout.css.webkit-fill-available.enabled are both
# set to 'true'.
- name: layout.css.webkit-fill-available.all-size-properties.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

# Whether we refer ::-webkit-scrollbar's width/height properties to disable
# overlay scrollbars.
- name: layout.css.fake-webkit-scrollbar.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# Per-domain blocklist for ::-webkit-scrollbar pseudo element
- name: layout.css.fake-webkit-scrollbar.disabled-domains
  type: DataMutexString
  value: "discord.com,shitposter.world"
  mirror: always
  rust: true

# Is support for the ::details-content pseudo-element enabled?
- name: layout.css.details-content.enabled
  type: RelaxedAtomicBool
  value: true
  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: true
  mirror: always

# 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 support for CSS Typed Object Model API enabled?
#
# Note that this feature is experimental and under active development.
# Enabling this pref will only expose some interfaces that are already
# implemented and is intended solely to enable WPT coverage during
# incremental development.
- name: layout.css.typed-om.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always
  rust: true

# 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

# Determines how we snap css outline-offset:
#   0: No snapping (historical behavior)
#   1: Always snap as border-width (proposed behavior in
#      https://github.com/w3c/csswg-drafts/issues/12906)
#   2: The above, but only on chrome code, for now.
- name: layout.css.outline-offset.snapping
  type: RelaxedAtomicInt32
#ifdef NIGHTLY_BUILD
  value: 1
#else
  value: 2
#endif
  mirror: always
  rust: true

- 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

# Controls whether nsRefreshDriver::IsInHighRateMode() may ever return true.
- name: layout.expose_high_rate_mode_from_refreshdriver
  type: bool
  value: true
  mirror: always

# Whether <details> is forced to be a block, see bug 1856374
# The legacy behavior is 'true', i.e. forcing it to be a block.
# The modern behavior is 'false', i.e. not forcing it to be a block.
- name: layout.details.force-block-layout
  type: bool
  value: false
  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 layout stuff.
- name: layout.disable-pixel-alignment
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Whether scrollIntoView scrolls to `position: fixed` frames visually.
- name: layout.scroll_fixed_content_into_view_visually
  type: bool
#if defined(ANDROID)
  value: true
#else
  value: false
#endif
  mirror: always

# Enable the spec-compliant behavior to consider the first and last inline
# fragments when computing the inline containing block's rectangle for
# absolutely positioned frames per
https://drafts.csswg.org/css-position-3/#absolute-cb
- name: layout.abspos.fragment-aware-inline-cb.enabled
  type: bool
  value: true
  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

#---------------------------------------------------------------------------
# Prefs starting with "mathml."
#---------------------------------------------------------------------------

# Enable scale transform for stretchy MathML operators. See bug 414277.
- name: mathml.scale_stretchy_operators.enabled
  type: bool
  value: true
  mirror: always

# Whether to disable legacy names "thickmathspace", "mediummathspace",
# "thickmathspace" etc for length attributes.
- name: mathml.mathspace_names.disabled
  type: bool
  value: @IS_EARLY_BETA_OR_EARLIER@
  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 remove the accent property from the operator dictionary.
- name: mathml.operator_dictionary_accent.disabled
  type: bool
  value: false
  mirror: always

# Whether to disable the MathML3 support for the mathvariant attribute. For
# MathML Core, support is restricted to the <mi> element and to value "normal".
# Corresponding automatic italicization on single-char <mi> element is also
# implemented via text-transform: auto when that flag is enabled.
- name: mathml.legacy_mathvariant_attribute.disabled
  type: bool
  value: @IS_EARLY_BETA_OR_EARLIER@
  mirror: always
  rust: true

# Whether to enable font-family: math in mathml instead of using the
# internal language x-math.
- name: mathml.font_family_math.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# Whether to disable legacy adjustment of default lspace/rspace when the
# scriptlevel (aka math-depth) is positive.
- name: mathml.adjust_default_lspace_rspace_for_positive_scriptlevel.disabled
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# Whether to use lspace/rspace values for the spacing around an embellished
# operator inside MathML elements that use the same layout algorithm as the mrow
# element, or that generate an anonymous <mrow> box (mrow, math, mstyle, msqrt,
# mphantom, ...).
- name: mathml.lspace_rspace_for_child_spacing_during_mrow_layout.enabled
  type: RelaxedAtomicBool
  value: @IS_NIGHTLY_BUILD@
  mirror: always
  rust: true

# Whether to disable legacy support for the href attribute on MathML elements
# other than the <a> tag.
- name: mathml.href_link_on_non_anchor_element.disabled
  type: RelaxedAtomicBool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

#---------------------------------------------------------------------------
# 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

# Enable WebRTC type support in Media Capabilities API.
- name: media.mediacapabilities.webrtc.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Comma-separated hostnames (with optional `*.` wildcard prefix). Hosts in
# this list get WebRTC Media Capabilities support even when the global pref
# above is false.
- name: media.mediacapabilities.webrtc.enabled.allowlist
  type: DataMutexString
  value: ""
  mirror: always

# When true (or when the page host is in legacy.allowlist), Media Capabilities
# skips the colorGamut, transferFunction, and scalabilityMode validation paths
# that would otherwise reject "inapplicable member" or "color space mismatch".
- name: media.mediacapabilities.legacy.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Comma-separated hostnames (with optional `*.` wildcard prefix). Hosts in
# this list are treated as legacy mode regardless of the global pref above.
- name: media.mediacapabilities.legacy.allowlist
  type: DataMutexString
  value: ""
  mirror: always

# Controls smooth attribute for WebRTC EncodeInfo
0 = heuristic-based, 1 = always true, 2 = always false
- name: media.mediacapabilities.webrtc-encode-smooth-override
  type: RelaxedAtomicUint32
  value: 0
  mirror: always

# Whether to expose media metadata to system media controls
# in private browsing mode
- name: media.privatebrowsing.metadata.enabled
  type: RelaxedAtomicBool
  value: false
  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

# 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_MOBILE@
  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.
# [1https://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

# Prefer the platform hardware decoder over the GMP built-in software decoder
# for Widevine-encrypted video. Falls back to GMP if the platform decoder
# fails to be created.
- name: media.eme.video.prefer-platform-decoder
  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

# Enable per-origin provisioning for MediaDrm on Android
- name: media.eme.mediadrm.origin-id.enabled
  type: bool
  value: @IS_ANDROID@
  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

#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

# Specifies whether the PEMFactory can create PEMs for remote audio encoding
# in the RDD or utility processes.
- name: media.use-remote-encoder.audio
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Specifies whether the PEMFactory can create PEMs for remote video encoding
# in the RDD or GPU process.
- name: media.use-remote-encoder.video
  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.gpu-process-encoder
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: media.ffvpx-hw.enabled
  type: RelaxedAtomicBool
#if defined(MOZ_WIDGET_GTK)
  value: true
#elif defined(XP_WIN)
  value: @IS_NIGHTLY_BUILD@
#else
  value: false
#endif
  mirror: always

# Provide minimal HW support for codecs that are otherwise unavailable on
# Android, e.g. H264 and HEVC.
#if defined(ANDROID)
- name: media.ffvpx-hw.minimal
  type: RelaxedAtomicBool
  value: false
  mirror: always
#endif

# 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.
- 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(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 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: @IS_IOS@
    mirror: always

#ifdef MOZ_OMX
-   name: media.omx.enabled
    type: bool
    value: false
    mirror: always
#endif

# 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

# Set the FFmpeg encoder's cpu-used option, only for the AV1 encoder in quality
# mode currently. While values from 6 to 9 are generally used for real-time
# encoding in libaom, we opt to prioritize speed over quality in this case.
-   name: media.ffmpeg.encoder.cpu-used
    type: RelaxedAtomicInt32
    value: 7
    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
# 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

# Change to true when shipping HDR video on Windows
https://bugzilla.mozilla.org/show_bug.cgi?id=2012848
-   name: media.wmf.force.allow-p010-format
    type: RelaxedAtomicBool
    value: @IS_EARLY_BETA_OR_EARLIER@
    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

-   name: media.wmf.encoder.realtime.wait-for-output
    type: RelaxedAtomicBool
    value: @IS_NIGHTLY_BUILD@
    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

# 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,
3 : enabled allowed by default via Remote Settings
4 : enabled blocked by default via Remote Settings
-   name: media.eme.mfcdm.origin-filter.enabled
    type: RelaxedAtomicUint32
#ifdef NIGHTLY_BUILD
    value: 3
#else
    value: 4
#endif
    mirror: always

#endif  # MOZ_WMF

- name: media.hevc.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

- 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

- name: media.hardware-video-decoding-vulkan.enabled
  type: bool
  value: false
  mirror: once

# Whether to map Vulkan decoder output directly to DRM PRIME (zero-copy).
- name: media.hardware-video-decoding-vulkan.direct-export.enabled
  type: bool
  value: false
  mirror: once

- name: media.hardware-video-encoding.enabled
  type: bool
  value: true
  mirror: once

- name: media.hardware-video-encoding.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 enables the HTMLMediaElement API captureStream.
- name: media.captureStream.enabled
  type: RelaxedAtomicBool
  value: true
  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_hybrid_kex
  type: RelaxedAtomicBool
  value: true
  mirror: always

# This pref enabled sending ssl_grp_kem_mlkem768x25519 Key Share for WebRTC DTLS code.
# When modifying this pref, please update the test_peerConnection_glean.html tests as well.
- name: media.webrtc.send_mlkem_keyshare
  type: RelaxedAtomicBool
  value: true
  mirror: always

# This pref controls whether dispatch testing-only events.
- name: media.webvtt.testing.events
  type: bool
  value: false
  mirror: always

#ifdef MOZ_WEBSPEECH
- 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

-   name: media.webspeech.recognition.enable
    type: bool
    value: false
    mirror: always

-   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

# The target number of decoded video frames to maintain in
# MediaDecoderStateMachine's mVideoQueue for hardware video decoding. Hardware
# decoding is fast, so a small queue size is used to lower frame latency.
- name: media.video-queue.hw-accel-size
  type: RelaxedAtomicInt32
  value: 3
  mirror: always

# The target number of decoded video frames to maintain in
# MediaDecoderStateMachine's mVideoQueue for software video decoding. Software
# decoding is slower, so a larger queue is used to lower chances of
# dropping late frames.
- name: media.video-queue.default-size
  type: RelaxedAtomicInt32
  value: 10
  mirror: always

# The maximum number of queued frames to send to the compositor.
- name: media.video-queue.send-to-compositor-size
  type: RelaxedAtomicInt32
#ifdef ANDROID
# On Android, it needs to be throttled because SurfaceTexture contains only one
# (the most recent) image data. See bug 1299068.
  value: 1
#else
# Send all of them.
  value: 9999
#endif
  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

# Matroska
- name: media.mkv.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
  value: @IS_ANDROID@
  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

# Expose the deprecated method navigator.mozGetUserMedia().
- name: media.navigator.mozgetusermedia.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: @IS_NIGHTLY_BUILD@
  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_MOBILE@
  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

# When true enables capability enumeration and capture of a fake video capture
# backend. Platform independent. Note, does not come into effect when the pref
# `media.navigator.streams.fake` or the `fake` constraint is true.
- name: media.getusermedia.camera.fake.force
  type: RelaxedAtomicBool
  value: false
  mirror: always

# When true, the fake video capture backend reports a single device with no
# capabilities, while still capturing from VideoCaptureFake. Has no effect
# unless `media.getusermedia.camera.fake.force` is also true.
- name: media.getusermedia.camera.fake.no_capabilities
  type: RelaxedAtomicBool
  value: false
  mirror: always

# 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,riverside.fm,*.riverside.fm,riverside.com,*.riverside.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.video.use_rtx
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: media.peerconnection.video.use_rtx.blocklist
  type: String
  value: "doxy.me,*.doxy.me"
  mirror: never

- name: media.peerconnection.video.vp9_enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: media.peerconnection.video.vp9_preferred
  type: RelaxedAtomicBool
  value: false
  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 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

# When true, AudioContext yields to audio-focus competition by suspending
# itself on the Stop media-control key.
- name: media.audioFocus.webaudio.enabled
  type: bool
  value: false
  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.navigator.audio.use_fec
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: media.navigator.audio.use_transport_cc
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: media.navigator.video.max_fs
  type: RelaxedAtomicUint32
  value: 12288 # Enough for 2048x1536
  mirror: always

- name: media.navigator.video.max_fr
  type: RelaxedAtomicUint32
  value: 60
  mirror: always

- name: media.navigator.video.disable_h264_baseline
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: media.navigator.video.h264.level
  type: RelaxedAtomicUint32
  value: 31 # minimum suggested for WebRTC spec: 0x42E0[1f] - level 3.1
  mirror: always

- name: media.navigator.video.h264.max_br
  type: RelaxedAtomicUint32
  value: 0
  mirror: always

- name: media.navigator.video.h264.max_mbps
  type: RelaxedAtomicUint32
  value: 0
  mirror: always

- name: media.navigator.video.red_ulpfec_enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: media.navigator.video.use_tmmbr
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: media.navigator.video.use_remb
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: media.navigator.video.use_transport_cc
  type: RelaxedAtomicBool
  value: true
  mirror: always


- name: media.webrtc.hw.h264.enabled
  type: RelaxedAtomicBool
#if defined(MOZ_WIDGET_ANDROID)
  value: true
#else
  value: false
#endif
  mirror: always

- name: media.webrtc.codec.video.av1.enabled
  type: RelaxedAtomicBool
  value: true
  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: RelaxedAtomicBool
  value: false
  mirror: always

- name: media.webrtc.simulcast.av1.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: media.webrtc.simulcast.h264.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: media.webrtc.simulcast.vp9.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: media.peerconnection.video.use_dd
  type: RelaxedAtomicBool
  value: true
  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, 8=asynchronous allow all
- 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 `<Brand> 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

# The maximum desired size of PHC, This includes allocations and excludes
# metadata. PHC allocations are "oversized" to the system page size.
- name: memory.phc.size_kb
  type: uint32_t
#ifdef EARLY_BETA_OR_EARLIER
  value: 16 * 1024
#else
# Before Bug 1867191 PHC used aproximately 1.1MB since it was set to a round
# number of 256 pages.  To keep the size the same we now specify this
# strange total size, but will follow-up with a more sensible maximum in
# the future.
  value: 1024 + 128
#endif
  mirror: always

# Tell mozjemalloc and the TaskController to use lazy purge.
- name: memory.lazypurge.enable
  type: bool
  value: true
  mirror: always

# If lazy purge is enabled, the maximum delay we wait for idle time in MS.
- name: memory.lazypurge.maximum_delay
  type: uint32_t
  value: 5000
  mirror: always

# If lazy purge is enabled, the minimum idle budget we wait for in MS.
# This is higher than GC (5ms) and CC (2ms) so that purge defers to
# GC/CC for idle time, preserving the dirty page reuse window.
- name: memory.lazypurge.minimum_idle_budget
  type: uint32_t
  value: 10
  mirror: always

# If lazy purge is enabled, the minimum time we wait with purge after some
# memory was reused (tracked per arena).
- name: memory.lazypurge.reuse_grace_period
  type: uint32_t
  value: 500
  mirror: always

# This timeout (ms) needs to be long enough to allow for the
# possibility of DMD reports and/or running on a low-end phone.
- name: memory.reporter.timeout
  type: uint32_t
  value: 180000
  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
# <html> element) is typically not considered as a root element, but the <body>
# element is typically considered as a root element. If there is no <body>
# element, then consider the <html> 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

# Whether to allow scroll amount larger than a page on a single mouse wheel event.
- name: mousewheel.allow_scrolling_more_than_one_page
  type: RelaxedAtomicBool
  value: false
  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 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

# When true, the hashing of the certificate will be done with the hashing
# algorithm specified in the cert instead of SHA256.
- name: network.auth.sspi_detect_hash
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Chunk size for BackgroundFileSaver async copy operations. Should be a power
# of 2 for optimal performance.
- name: network.backgroundfilesaver.async_copy_chunk_size
  type: RelaxedAtomicUint32
  value: 1048576  # 1MB (1024 * 1024)
  mirror: always

# Default buffer size for buffered stream operations. The actual value used will
# be floored to the nearest power of two.
- name: network.buffer.default_size
  type: RelaxedAtomicUint32
  value: 65536
  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: RelaxedAtomicUint32
  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: false
  mirror: always

# Changes cookieBehavior=5 to block third-party cookies in the private browsing
# mode.
- name: network.cookie.cookieBehavior.optInPartitioning.pbmode
  type: bool
  value: false
  mirror: always

# Whether to support CHIPS(Cookies Having Independent Partitioned State).
- name: network.cookie.CHIPS.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether TCP cookies also appear when unpartitioned cookies are queried
# at the same time.
- name: network.cookie.CHIPS.affectsTCP
  type: RelaxedAtomicBool
  value: false
  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: 2
  mirror: always

# The validation epoch last completed for the cookie database. Compared against
# network.cookie.validation.epoch to decide whether to re-run validation.
- name: network.cookie.validation.lastEpoch
  type: RelaxedAtomicUint32
  value: 0
  mirror: always

# The current validation epoch. Bump this value whenever the cookie validation
# logic changes to trigger a new scan on next startup.
- name: network.cookie.validation.epoch
  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: false
  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

# When true, Firefox will reject nameless cookies that contain `=` in value.
- name: network.cookie.block_nameless_with_equal_char
  type: RelaxedAtomicBool
  value: true
  mirror: always

# When true, cookies without '=' are parsed as valueless (name="foo", value="")
# instead of nameless (name="", value="foo"), aligning with Safari's behavior.
- name: network.cookie.valueless_cookie
  type: RelaxedAtomicBool
  value: true
  mirror: always

# A Enable a workaround for XPCShell tests to avoid setting the cookies via
# HttpChannelParent actor
- name: network.cookie.skip_browsing_context_check_in_parent_for_testing
  type: bool
  value: false
  mirror: always

# The string to return to the server as the 'workstation' that the user is
# using. Bug 1046421 notes that the previous default of the system hostname
# could be used for user fingerprinting.
# However, in some network environments where allowedWorkstations is in use to
# provide a level of host-based access control, it must be set to a string that
# is listed in allowedWorkstations for the user's account in their AD Domain.
- name: network.generic-ntlm-auth.workstation
  type: DataMutexString
  value: "WORKSTATION"
  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: true
  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: false
  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

# Bug 1965430: Use TriggeringPrincipal instead of LoadingPrincipal to
# determine the request origin when computing redirect-taint. This fixes
# top-level navigational POST redirects (e.g., form submissions) where
# LoadingPrincipal is null. Set to false to revert to the old behavior.
- name: network.http.origin.useTriggeringPrincipal
  type: RelaxedAtomicBool
  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

# Whether to fallback to old mime-type parser when CMimeType::Parse fails
- name: network.http.fallback_to_net_parse_ct
  type: RelaxedAtomicBool
  value: true
  mirror: always

# 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

# Whether or not we give more priority to active tab.
- name: network.http.active_tab_priority
  type: RelaxedAtomicBool
#if defined(ANDROID)
  value: false
#else
  value: true
#endif
  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

# If set to true, Firefox will use the file extension of a URL
# to sniff its content type. When false, nsUnknownDecoder will
# use the file extension only for file URLs
- name: network.sniff.use_extension
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Disable requests to 0.0.0.0
# See Bug 1889130
- name: network.socket.ip_addr_any.disabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# When MOZ_DISABLE_NONLOCAL_CONNECTIONS is set, allow these non-local domains
# which are required for testing.
- name: network.socket.allowed_nonlocal_domains
  type: DataMutexString
  value: ""
  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: true
  mirror: always

# The timeout used when calling DhcpRequestParams. The call may sometimes hang
# after resuming from suspend.
- name: network.proxy.dhcp_wpad_timeout_sec
  type: AtomicFloat
  value: 5.0
  mirror: always

# When true, we only allow one outstanding GetPacFromDHCP runnable
- name: network.proxy.dhcp_wpad_only_one_outstanding
  type: RelaxedAtomicBool
  value: true
  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

# Indicates whether the `fetchpriority` attribute for elements which support it
# (e.g. `<script>`) is enabled.
- name: network.fetchpriority.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# When true, the channel's urgency will be adjusted based on the
# channel's nsISupportsPriority.
- name: network.fetchpriority.adjust_urgency
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Adjustments to apply to the internal priority of <link rel=preload as=script
# fetchpriority=low/high/auto> and equivalent Link header with respect to the
# case when network.fetchpriority is disabled.
# - When the flag is disabled, Gecko currently sets priority to HIGHEST.
# - When the flag is enabled, it respectively maps to LOW/HIGHEST/HIGHEST.
- name: network.fetchpriority.adjustments.link-preload-script.low
  type: int32_t
  value: 30
  mirror: always
- name: network.fetchpriority.adjustments.link-preload-script.high
  type: int32_t
  value: 0
  mirror: always
- name: network.fetchpriority.adjustments.link-preload-script.auto
  type: int32_t
  value: 0
  mirror: always

# Adjustments to apply to the internal priority of <script type="module"
# fetchpriority=low/high/auto> with respect to the case when
# network.fetchpriority is disabled.
# - When the flag is disabled, Gecko currently sets priority to NORMAL.
# - When the flag is enabled, it respectively maps to LOW/HIGH/NORMAL.
- name: network.fetchpriority.adjustments.module-script.low
  type: int32_t
  value: 10
  mirror: always
- name: network.fetchpriority.adjustments.module-script.high
  type: int32_t
  value: -10
  mirror: always
- name: network.fetchpriority.adjustments.module-script.auto
  type: int32_t
  value: 0
  mirror: always

# Adjustments to apply to the internal priority of async or defer <script
# fetchpriority=low/high/auto> with respect to the case when
# network.fetchpriority is disabled.
# - When the flag is disabled, Gecko currently sets priority to NORMAL.
# - When the flag is enabled, it respectively maps to LOW/HIGH/NORMAL.
- name: network.fetchpriority.adjustments.async-or-defer-script.low
  type: int32_t
  value: 10
  mirror: always
- name: network.fetchpriority.adjustments.async-or-defer-script.high
  type: int32_t
  value: -10
  mirror: always
- name: network.fetchpriority.adjustments.async-or-defer-script.auto
  type: int32_t
  value: 0
  mirror: always

# Adjustments to apply to the internal priority of <script
# fetchpriority=low/high/auto> inside the <head>, with respect to the case when
# network.fetchpriority is disabled.
# - When the flag is disabled, Gecko currently sets priority to NORMAL.
# - When the flag is enabled, it respectively maps to LOW/HIGH/NORMAL.
- name: network.fetchpriority.adjustments.script-in-head.low
  type: int32_t
  value: 10
  mirror: always
- name: network.fetchpriority.adjustments.script-in-head.high
  type: int32_t
  value: -10
  mirror: always
- name: network.fetchpriority.adjustments.script-in-head.auto
  type: int32_t
  value: 0
  mirror: always

# Adjustments to apply to the internal priority of <script
# fetchpriority=low/high/auto> (other than the scripts handled above) with
# respect to the case when network.fetchpriority is disabled.
# - When the flag is disabled, Gecko currently sets priority to NORMAL.
# - When the flag is enabled, it respectively maps to LOW/HIGH/NORMAL.
- name: network.fetchpriority.adjustments.other-script.low
  type: int32_t
  value: 10
  mirror: always
- name: network.fetchpriority.adjustments.other-script.high
  type: int32_t
  value: -10
  mirror: always
- name: network.fetchpriority.adjustments.other-script.auto
  type: int32_t
  value: 0
  mirror: always

# Adjustments to apply to the internal priority of <link rel=preload as=font
# fetchpriority=low/high/auto> with respect to the case when
# network.fetchpriority is disabled.
# - When the flag is disabled, Gecko currently sets priority to HIGH.
# - When the flag is enabled, it respectively maps to LOW/HIGH/HIGH.
- name: network.fetchpriority.adjustments.link-preload-font.low
  type: int32_t
  value: 20
  mirror: always
- name: network.fetchpriority.adjustments.link-preload-font.high
  type: int32_t
  value: -10
  mirror: always
- name: network.fetchpriority.adjustments.link-preload-font.auto
  type: int32_t
  value: 0
  mirror: always

# Adjustments to apply to the internal priority of <link rel=preload as=fetch
# fetchpriority=low/high/auto> with respect to the case when
# network.fetchpriority is disabled.
# - When the flag is disabled, Gecko currently sets priority to NORMAL.
# - When the flag is enabled, it respectively maps to LOW/HIGH/NORMAL.
- name: network.fetchpriority.adjustments.link-preload-fetch.low
  type: int32_t
  value: 10
  mirror: always
- name: network.fetchpriority.adjustments.link-preload-fetch.high
  type: int32_t
  value: -10
  mirror: always
- name: network.fetchpriority.adjustments.link-preload-fetch.auto
  type: int32_t
  value: 0
  mirror: always

# Adjustments to apply to the internal priority of deferred style for
# fetchpriority=low/high/auto> with respect to the case when
# network.fetchpriority is disabled.
# - When the flag is disabled, Gecko currently sets priority to NORMAL.
# - When the flag is enabled, it respectively maps to LOW/NORMAL/NORMAL.
- name: network.fetchpriority.adjustments.deferred-style.low
  type: int32_t
  value: 10
  mirror: always
- name: network.fetchpriority.adjustments.deferred-style.high
  type: int32_t
  value: 0
  mirror: always
- name: network.fetchpriority.adjustments.deferred-style.auto
  type: int32_t
  value: 0
  mirror: always

# Adjustments to apply to the internal priority of <link rel=preload as=style
# fetchpriority=low/high/auto> with respect to the case when
# network.fetchpriority is disabled.
# - When the flag is disabled, Gecko currently sets priority to HIGHEST.
# - When the flag is enabled, it respectively maps to HIGH/HIGHEST/HIGHEST.
- name: network.fetchpriority.adjustments.link-preload-style.low
  type: int32_t
  value: 10
  mirror: always
- name: network.fetchpriority.adjustments.link-preload-style.high
  type: int32_t
  value: 0
  mirror: always
- name: network.fetchpriority.adjustments.link-preload-style.auto
  type: int32_t
  value: 0
  mirror: always

# Adjustments to apply to the internal priority of other non-deferred
# stylesheet load for fetchpriority=low/high/auto with respect to the case when
# network.fetchpriority is disabled.
# - When the flag is disabled, Gecko currently sets priority to NORMAL.
# - When the flag is enabled, it respectively maps to HIGH/HIGHEST/NORMAL.
- name: network.fetchpriority.adjustments.non-deferred-style.low
  type: int32_t
  value: 0
  mirror: always
- name: network.fetchpriority.adjustments.non-deferred-style.high
  type: int32_t
  value: -20
  mirror: always
- name: network.fetchpriority.adjustments.non-deferred-style.auto
  type: int32_t
  value: 0
  mirror: always

# Adjustments to apply to the internal priority of global fetch API
# for fetchpriority=low/high/auto with respect to the case when
# network.fetchpriority is disabled.
# - When the flag is disabled, Gecko currently sets priority to NORMAL.
# - When the flag is enabled, it respectively maps to LOW/HIGH/NORMAL.
- name: network.fetchpriority.adjustments.global-fetch-api.low
  type: RelaxedAtomicInt32
  value: 10
  mirror: always
- name: network.fetchpriority.adjustments.global-fetch-api.high
  type: RelaxedAtomicInt32
  value: -10
  mirror: always
- name: network.fetchpriority.adjustments.global-fetch-api.auto
  type: RelaxedAtomicInt32
  value: 0
  mirror: always

# Adjustments to apply to the internal priority of <link rel=preload as=images
# fetchpriority=low/high/auto> and <img fetchpriority=low/high/auto> with
# respect to the case when network.fetchpriority is disabled.
# - When the flag is disabled, Gecko currently sets priority to LOW.
# - When the flag is enabled, it respectively maps to LOW/LOW/HIGH.
# The image code can currently further adjust the priority for image load, see
# imgRequest::BoostPriority and AdjustPriorityForImages.
- name: network.fetchpriority.adjustments.images.low
  type: int32_t
  value: 10
  mirror: always
- name: network.fetchpriority.adjustments.images.high
  type: int32_t
  value: -20
  mirror: always
- name: network.fetchpriority.adjustments.images.auto
  type: int32_t
  value: 0
  mirror: always

# Adjustments to apply to the internal priority of <audio>, <track>, <video>,
# or <link rel=preload as=audio/track/video> with respect to the case when
# network.fetchpriority is disabled.
# - When the flag is disabled, Gecko currently sets priority to NORMAL.
# - When the flag is enabled, it respectively maps to LOW/LOW/HIGH.
- name: network.fetchpriority.adjustments.media.low
  type: int32_t
  value: 10
  mirror: always
- name: network.fetchpriority.adjustments.media.high
  type: int32_t
  value: 0
  mirror: always
- name: network.fetchpriority.adjustments.media.auto
  type: int32_t
  value: 0
  mirror: always

# Enables `<link rel="preconnect">` tag and `Link: rel=preconnect` response header
# handling.
- name: network.preconnect
  type: RelaxedAtomicBool
  value: true
  mirror: always

# How many seconds to force-validate a prefetched cache entry that has no
# explicit Cache-Control or Expires headers (bug 1527334). Set to 0 to disable.
- name: network.prefetch-next.force-valid-for
  type: uint32_t
  value: 300
  mirror: always

# Enables `<link rel="modulepreload">` tag and `Link: rel=modulepreload`
# response header handling.
- name: network.modulepreload
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Enable 103 Early Hint status code (RFC 8297)
- name: network.early-hints.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Enable sending 103 (Early Hints) responses over HTTP/1.1
- name: network.early-hints.over-http-v1-1.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Enable `Link: rel=preconnect` in 103 Early Hint response.
- name: network.early-hints.preconnect.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# The max number of speculative connections we allow for `Link: rel=preconnect`.
# When 0, the speculative connection created due to `Link: rel=preconnect` will
# be limited by "network.http.speculative-parallel-limit".
- name: network.early-hints.preconnect.max_connections
  type: uint32_t
  value: 10
  mirror: always

# How long we should wait for EarlyHintPreloader to be used.
# Under normal circumstances it should be used immidiately.
- name: network.early-hints.parent-connect-timeout
  type: uint32_t
  value: 10000
  mirror: always

# Whether to use the network process or not
# Start a separate socket process. Performing networking on the socket process
# is control by a sepparate pref
# ("network.http.network_access_on_socket_process.enabled").
# Changing these prefs requires a restart.
- name: network.process.enabled
  type: RelaxedAtomicBool
  mirror: always
#if defined(ANDROID) || defined(MOZ_THUNDERBIRD) || defined(XP_IOS)
  value: false # see bug 1641427
#else
  value: true
#endif

# Whether we can send OnDataAvailable to content process directly.
- name: network.send_ODA_to_content_directly
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether we can send OnDataFinished to html5parser in content process directly
- name: network.send_OnDataFinished.html5parser
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether we can send OnDataFinished in the content process
- name: network.send_OnDataFinished
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether we can send OnDataFinished to content process directly.
- name: network.send_OnDataFinished.nsInputStreamPump
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether we can send OnDataFinished to cssLoader in content process.
- name: network.send_OnDataFinished.cssLoader
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether we can send send OnDataFinished only after dispatching
# all the progress events on the main thread
- name: network.send_OnDataFinished_after_progress_updates
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Perform all network access on the socket process.
# The pref requires "network.process.enabled" to be true.
# Changing these prefs requires a restart.
- name: network.http.network_access_on_socket_process.enabled
  type: RelaxedAtomicBool
  mirror: always
  value: false

# Telemetry of traffic categories. Whether or not to enable HttpTrafficAnalyzer.
- name: network.traffic_analyzer.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether DNS resolution is limited to literals and cached entries.
- name: network.dns.disabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: network.dns.disablePrefetchFromHTTPS
  type: bool
  value: false
  mirror: always

# For testing purpose only: allow dns prefetch through proxies
- name: network.dns.prefetch_via_proxy
  type: bool
  value: false
  mirror: always

# Max time to shutdown the resolver threads
- name: network.dns.resolver_shutdown_timeout_ms
  type: uint32_t
  value: 5000
  mirror: always

# When true on Windows DNS resolutions for single label domains
# (domains that don't contain a dot) will be resolved using the DnsQuery
# API instead of PR_GetAddrInfoByName
- name: network.dns.dns_query_single_label
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Use platform DNS APIs (where available) to resolve HTTPS queries
- name: network.dns.native_https_query
  type: RelaxedAtomicBool
  value: true
  mirror: always

# DnsQuery_A is broken for HTTPS queries on Windows 10.
# Once it gets fixed, we can flip this pref to enable it.
# Changes might not take effect until restart.
- name: network.dns.native_https_query_win10
  type: RelaxedAtomicBool
  value: false
  mirror: always

# When true, the HTTPS query will actually call the native
# platform API. When false it will return before the call
# to the platform API
# This pref is necessary because having a HTTPS record
# could cause channels to connect to a different port,
# which is not desirable in automation.
- name: network.dns.native_https_query_in_automation
  type: RelaxedAtomicBool
  value: false
  mirror: always

#ifdef MOZ_WIDGET_ANDROID
# When resolving a native HTTPS query with native APIs
# the Android implementation has a max timeout
- name: network.dns.native_https_timeout_android
  type: RelaxedAtomicInt32
  value: 20000
  mirror: always
#endif

#ifdef XP_MACOSX
# When resolving a native HTTPS query with native APIs
# the MacOS implementation has a max timeout
- name: network.dns.native_https_timeout_mac_msec
  type: RelaxedAtomicInt32
  value: 5000
  mirror: always
#endif

# When this pref is true, we copy the host name to a fresh string before
# calling into getaddrinfo.
- name: network.dns.copy_string_before_call
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: network.dns.max_high_priority_threads
  type: RelaxedAtomicUint32
  value: 40
  mirror: always

- name: network.dns.max_any_priority_threads
  type: RelaxedAtomicUint32
  value: 24
  mirror: always

# This makes it so NS_HTTP_REFRESH_DNS is only
# set on DNS resolutions when LOAD_FRESH_CONNECTION is set.
# That's because we don't need to refresh DNS on
# every page reload.
- name: network.dns.only_refresh_on_fresh_connection
  type: RelaxedAtomicBool
  value: true
  mirror: always

# When true, DNS resolutions will downgrade DNS
# from AF_UNSPEC to AF_INET when no non-local IPv6 addresses are
# available.
- name: network.dns.skip_ipv6_when_no_addresses
  type: RelaxedAtomicBool
  value: false
  mirror: always

# This preference specifies a list of domains for which DNS lookups will be
# IPv4 only. Works around broken DNS servers which can't handle IPv6 lookups
# and/or allows the user to disable IPv6 on a per-domain basis. See bug 68796.
- name: network.dns.ipv4OnlyDomains
  type: String
  value: ""
  mirror: never

# This is the number of dns cache entries allowed
- name: network.dnsCacheEntries
  type: RelaxedAtomicUint32
  value: 1600
  mirror: always

# In the absence of OS TTLs, the DNS cache TTL value
- name: network.dnsCacheExpiration
  type: RelaxedAtomicUint32
  value: 60
  mirror: always

# Get TTL; not supported on all platforms; nop on the unsupported ones.
- name: network.dns.get-ttl
  type: RelaxedAtomicBool
#if defined(XP_WIN)
  value: true
#else
  value: false
#endif
  mirror: always

# For testing purposes! Makes the native resolver resolve IPv4 "localhost"
# instead of the actual given name.
- name: network.dns.native-is-localhost
  type: RelaxedAtomicBool
  value: false
  mirror: always

# The grace period allows the DNS cache to use expired entries, while kicking off
# a revalidation in the background.
- name: network.dnsCacheExpirationGracePeriod
  type: RelaxedAtomicUint32
  value: 600
  mirror: always

# This preference can be used to turn off DNS prefetch.
- name: network.dns.disablePrefetch
  type: RelaxedAtomicBool
  value: false
  mirror: always

# This preference controls whether .onion hostnames are
# rejected before being given to DNS. RFC 7686
- name: network.dns.blockDotOnion
  type: RelaxedAtomicBool
  value: true
  mirror: always

# These domains are treated as localhost equivalent
- name: network.dns.localDomains
  type: String
  value: ""
  mirror: never

# When non empty all non-localhost DNS queries (including IP addresses)
# resolve to this value. The value can be a name or an IP address.
# domains mapped to localhost with localDomains stay localhost.
- name: network.dns.forceResolve
  type: String
  value: ""
  mirror: never

# Contols whether or not "localhost" should resolve when offline
- name: network.dns.offline-localhost
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Defines how much longer resolver threads should stay idle before are shut down.
# A negative value will keep the thread alive forever.
- name: network.dns.resolver-thread-extra-idle-time-seconds
  type: RelaxedAtomicInt32
  value: 60
  mirror: always

# When true, the DNS code will always set the AI_CANONNAME
# when calling getaddrinfo
- name: network.dns.always_ai_canonname
  type: RelaxedAtomicBool
  value: true
  mirror: always

# When true, the OnLookupComplete will be dispatched with increased priority
- name: network.dns.high_priority_dispatch
  type: RelaxedAtomicBool
  value: true
  mirror: always

# This preference specifies a comma seperated list of URL/IPAddress:Port that will be treated as public IPAddressSpace.
- name: network.lna.address_space.public.override
  type: String
  type: String
  value: ""
  mirror: never

# This preference specifies a comma seperated list of URL/IPAddress:Port that will be treated as private IPAddressSpace.
- name: network.lna.address_space.private.override
  type: String
  value: ""
  mirror: never

# This preference specifies a comma seperated list of URL/IPAddress:Port that will be treated as local IPAddressSpace.
- name: network.lna.address_space.local.override
  type: String
  value: ""
  mirror: never

# This preference controls Local Network Access (LNA) feature.
- name: network.lna.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# This preference controls if we need to fail transactions for Local Network Access (LNA) failures.
- name: network.lna.blocking
  type: RelaxedAtomicBool
  value: true
  mirror: always

# When this pref is true, loads triggered by scripts classified as trackers
# will automatically be blocked.
- name: network.lna.block_trackers
  type: RelaxedAtomicBool
  value: false
  mirror: always

# When this pref is true, top-level document navigation to local network addresses
# will bypass LNA permission checks.
- name: network.lna.allow_top_level_navigation
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Comma-separated list of domains to skip LNA checks for.
# Supports suffix wildcard patterns (*.example.com)
- name: network.lna.skip-domains
  type: String
  value: ""
  mirror: never

# When this pref is false, skip all LNA checks for WebSocket connections.
# When true, WebSocket connections follow normal LNA rules.
# Currently this is disabled for parity with chrome
- name: network.lna.websocket.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# When this pref is true, skip LNA checks for requests from private network
# to localhost (private -> local IP address space transitions).
- name: network.lna.local-network-to-localhost.skip-checks
  type: RelaxedAtomicBool
  value: true
  mirror: always

# When this pref is true, defer the LNA check for private IP address space
# targets on HTTPS connections until after the TLS handshake succeeds. This
# avoids prompting the user when DNS transiently misdirects a public hostname
# to a private address and the server cannot present a valid certificate.
# Local (loopback) addresses and plaintext HTTP requests are unaffected and
# are still checked pre-connect.
- name: network.lna.defer_https_check
  type: RelaxedAtomicBool
  value: true
  mirror: always

# When true, benchmarking IP addresses 198.18.X.X is treated as local
# Depending on how this ends up being treated in the LNA spec, we might
# change it to be in the private space, but for now it's disabled to
# match Chrome LNA behaviour.
- name: network.lna.benchmarking-is-local
  type: RelaxedAtomicBool
  value: false
  mirror: always

# When true, block LNA requests from insecure contexts (http:// origins that
# are not localhost or .local). Uses IsPotentiallyTrustworthyOrigin to
# determine if the origin is trustworthy.
- name: network.lna.block_insecure_contexts
  type: RelaxedAtomicBool
  value: true
  mirror: always


# The proxy type. See nsIProtocolProxyService.idl
#     PROXYCONFIG_DIRECT   = 0
#     PROXYCONFIG_MANUAL   = 1
#     PROXYCONFIG_PAC      = 2
#     PROXYCONFIG_WPAD     = 4
#     PROXYCONFIG_SYSTEM   = 5
- name: network.proxy.type
  type: RelaxedAtomicUint32
  value: 5
  mirror: always

# Whether to use WPAD while configuring proxy with system settings
- name: network.proxy.system_wpad
  type: bool
  value: false
  mirror: always

# Whether to allow the use of WPAD while configuring proxy with system settings
- name: network.proxy.system_wpad.allowed
  type: bool
  value: false
  mirror: always

# Whether the SOCKS5 proxy should be in charge of DNS resolution. Making it a
# SOCKS5h proxy by convention
- name: network.proxy.socks5_remote_dns
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether the SOCKS4 proxy should be in charge of DNS resolution. Making it a
# SOCKS4a proxy.
- name: network.proxy.socks_remote_dns
  type: RelaxedAtomicBool
  value: false
  mirror: always

# When receiving a network change event, the time (in ms) we wait to reload the
# PAC url.
- name: network.proxy.reload_pac_delay
  type: RelaxedAtomicUint32
  value: 2000
  mirror: always

# When parsing "SOCKS" in PAC string, the default version of SOCKS that will be
# used.
- name: network.proxy.default_pac_script_socks_version
  type: RelaxedAtomicUint32
  value: 4
  mirror: always

# Whether to force failover to direct for system requests.
#ifdef MOZ_PROXY_DIRECT_FAILOVER
- name: network.proxy.failover_direct
  type: bool
  value: true
  mirror: always
#endif

# Whether to allow a bypass flag to be set on httpChannel that will
# prevent proxies from being used for that specific request.
- name: network.proxy.allow_bypass
  type: bool
#ifdef MOZ_PROXY_BYPASS_PROTECTION
  value: false
#else
  value: true
#endif
  mirror: always

- name: network.proxy.parse_pac_on_socket_process
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: network.proxy.detect_system_proxy_changes
  type: RelaxedAtomicBool
#ifdef XP_WIN
  value: @IS_EARLY_BETA_OR_EARLIER@
#else
  value: false
#endif
  mirror: always

- name: network.proxy.fast_path_system_direct
  type: RelaxedAtomicBool
  value: true
  mirror: always

# If all non-direct proxies have failed, we retry all of them in case they
# are online now.
- name: network.proxy.retry_failed_proxies
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Some requests during a page load are marked as "tail", mainly trackers, but not only.
# This pref controls whether such requests are put to the tail, behind other requests
# emerging during page loading process.
- name: network.http.tailing.enabled
  type: bool
  value: true
  mirror: always

# Priority urgency of tailed request. Default to 6, which is a very low priority
- name: network.http.tailing.urgency
  type: RelaxedAtomicUint32
  value: 6
  mirror: always

# Tailing: When the page load has not yet reached DOMContentLoaded point, tail requestes are delayed
# by (non-tailed requests count + 1) * delay-quantum milliseconds.
- name: network.http.tailing.delay-quantum
  type: int32_t
  value: 600
  mirror: always

# Tailing: The same as above, but applied after the document load reached DOMContentLoaded event.
- name: network.http.tailing.delay-quantum-after-domcontentloaded
  type: int32_t
  value: 100
  mirror: always

# Tailing: Upper limit for the calculated delay, prevents long standing and comet-like requests tail forever.  This is in milliseconds as well.
- name: network.http.tailing.delay-max
  type: int32_t
  value: 6000
  mirror: always

# Tailing: Total limit we delay tailed requests since a page load beginning.
- name: network.http.tailing.total-max
  type: int32_t
  value: 45000
  mirror: always

# When true, the default Accept request header will include the supported mime
# types for images.
- name: network.http.accept_include_images
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Whether to run proxy checks when processing Alt-Svc headers.
- name: network.http.altsvc.proxy_checks
  type: bool
  value: true
  mirror: always

- name: network.http.stale_while_revalidate.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Capacity of the above cache, in kilobytes.
- name: network.ssl_tokens_cache_capacity
  type: RelaxedAtomicUint32
  value: 8192
  mirror: always

# How many records we store per entry
- name: network.ssl_tokens_cache_records_per_entry
  type: RelaxedAtomicUint32
  value: 10
  mirror: always

# Enable persistence of the SSL tokens cache to disk
- name: network.ssl_tokens_cache_persistence
  type: RelaxedAtomicBool
  value: false
  mirror: always

# The maximum allowed length for a URL - 1MB default.
- name: network.standard-url.max-length
  type: RelaxedAtomicUint32
  value: 1048576
  mirror: always

# If true, use the HSTS preload list.
- name: network.stricttransportsecurity.preloadlist
  type: RelaxedAtomicBool
  value: true
  mirror: always

# DNS Trusted Recursive Resolver
0 - default off, 1 - reserved/off, 2 - TRR first, 3 - TRR only,
4 - reserved/off, 5 off by choice
- name: network.trr.mode
  type: RelaxedAtomicUint32
  value: 0
  mirror: always

# Default global TRR provider
- name: network.trr.default_provider_uri
  type: String
  value: "https://mozilla.cloudflare-dns.com/dns-query"
  mirror: never

# If true, retry TRR for recoverable errors once.
- name: network.trr.retry_on_recoverable_errors
  type: RelaxedAtomicBool
  value: false
  mirror: always

# If true, don't fallback to native DNS upon network errors.
- name: network.trr.strict_native_fallback
  type: RelaxedAtomicBool
  value: false
  mirror: always

# If true, we'll fallback to native if the retry also times out.
- name: network.trr.strict_native_fallback_allow_timeouts
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Single TRR request timeout (ms) when strict native fallback is enabled.
- name: network.trr.strict_fallback_request_timeout_ms
  type: RelaxedAtomicUint32
  value: 6000
  mirror: always

# If false, the temporary blocklisting feature is disabled.
# This is useful for tests to prevent bleeding extra reqs
# between tasks, since we may attempt to look up the
# parent domain in the background when blocklisting a host.
- name: network.trr.temp_blocklist
  type: RelaxedAtomicBool
  value: true
  mirror: always

# TRR blocklist entry expire time (in seconds). Default is one minute.
# Meant to survive basically a page load.
- name: network.trr.temp_blocklist_duration_sec
  type: RelaxedAtomicUint32
  value: 60
  mirror: always

# Single TRR request timeout, in milliseconds
- name: network.trr.request_timeout_ms
  type: RelaxedAtomicUint32
  value: 1500
  mirror: always

# Single TRR request timeout, in milliseconds for mode 3
- name: network.trr.request_timeout_mode_trronly_ms
  type: RelaxedAtomicUint32
  value: 30000
  mirror: always

# Similar to network.http.http2.ping-timeout, but this is used when the
# Http/2 connection is connected to the TRR server.
- name: network.trr.ping_timeout
  type: RelaxedAtomicUint32
  value: 3000
  mirror: always

# The timeout of the TRR confirmation request
- name: network.trr.confirmation_timeout_ms
  type: RelaxedAtomicUint32
  value: 6000
  mirror: always

# Whether to send the Accept-Language header for TRR requests
- name: network.trr.send_accept-language_headers
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Whether to send an empty Accept-Encoding header for TRR requests
- name: network.trr.send_empty_accept-encoding_headers
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether to send the User-Agent header for TRR requests
- name: network.trr.send_user-agent_headers
  type: RelaxedAtomicBool
  value: false
  mirror: always

# If we should wait for TRR service confirmation to complete before enabling
# TRR for lookups when fallback is enabled. Confirmation is always skipped when
# global mode is TRR-only (no fallback).
- name: network.trr.wait-for-confirmation
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Normally when confirmation fails we wait for the confirmation to succeed
# before attempting to do TRR. When this pref is true, we optimistically
# assume the confirmation will succeed and might attempt TRR anyway.
# If network.trr.wait-for-confirmation is true, this pref is ignored.
- name: network.trr.attempt-when-retrying-confirmation
  type: RelaxedAtomicBool
  value: false
  mirror: always

# When true, the confirmation context starts in the CONFIRM_FAILED state
# instead of optimistically assuming TRR is usable. Lookups then fall back to
# native DNS until the first confirmation succeeds, rather than blocking on the
# TRR connection being established. Used on Android to avoid cold-startup delays
# when DoH is enabled via autoselect.
- name: network.trr.start-confirmation-in-failed-state
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Controls whether the DoH rollout on Android sets
# network.trr.start-confirmation-in-failed-state when it enables DoH. Provides a
# kill switch for the behavior without changing the underlying TRR pref.
- name: network.android_doh.start_in_confirmation_failed_state
  type: bool
  value: true
  mirror: never

# Use GET (rather than POST)
- name: network.trr.useGET
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Allow RFC1918 address in responses?
- name: network.trr.allow-rfc1918
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Whether to apply split horizon mitigations when using TRR.
# These include adding the DNS suffix to the excluded domains
- name: network.trr.split_horizon_mitigations
  type: RelaxedAtomicBool
  value: true
  mirror: always

# If true, hosts matching the OS-provided DNS suffix list are excluded from
# TRR even when in TRR-only mode (mode 3). When false (default), the DNS
# suffix list is ignored in TRR-only mode so those names are still resolved
# via TRR.
- name: network.trr.exclude_dns_suffix_in_mode_trronly
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Explicitly disable ECS (EDNS Client Subnet, RFC 7871)
- name: network.trr.disable-ECS
  type: RelaxedAtomicBool
  value: true
  mirror: always

# When true, the DNS+TRR cache will be cleared when a relevant TRR pref
# changes. (uri, bootstrapAddress, excluded-domains)
- name: network.trr.clear-cache-on-pref-change
  type: RelaxedAtomicBool
  value: true
  mirror: always

# After this many failed TRR requests in a row, consider TRR borked
- name: network.trr.max-fails
  type: RelaxedAtomicUint32
  value: 15
  mirror: always

# When the TRR confirmation is set to CONFIRM_FAILED due to many failures in
# a row, we set a timer to retry. This has an exponential backoff up to
# network.trr.max-retry-timeout-ms (64 seconds by default)
- name: network.trr.retry-timeout-ms
  type: RelaxedAtomicUint32
  value: 125
  mirror: always

- name: network.trr.max-retry-timeout-ms
  type: RelaxedAtomicUint32
  value: 64000
  mirror: always

# Retry with no TRR when the response contained only 0.0.0.0 or ::
- name: network.trr.fallback-on-zero-response
  type: RelaxedAtomicBool
  value: false
  mirror: always

# If true we parse the /etc/hosts file and exclude any host names from TRR.
# Reading the file is only done once, when TRR is first enabled - this could be
# soon after startup or when the pref is flipped.
- name: network.trr.exclude-etc-hosts
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether to add padding in the doh dns queries (rfc 7830)
- name: network.trr.padding
  type: RelaxedAtomicBool
  value: true
  mirror: always

# The block size to pad to. Capped at 1024 bytes.
# Setting it to 0 doesn't add additional padding, but allows the server to
# respond with padding (RFC7930 Sec 4)
- name: network.trr.padding.length
  type: RelaxedAtomicUint32
  value: 128
  mirror: always

# Whether to skip the NS check for the blocked host.
# Note this is used for test only.
- name: network.trr.skip-check-for-blocked-host
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Whether to use the connection info that is generated asynchronously.
- name: network.trr.async_connInfo
  type: RelaxedAtomicBool
  value: @IS_EARLY_BETA_OR_EARLIER@
  mirror: always

# If true, a failed TRR request that contains an extended DNS error
# matching the hardFail condition in DNSPacket.cpp will not be
# retried with native DNS
- name: network.trr.hard_fail_on_extended_error
  type: RelaxedAtomicBool
  value: true
  mirror: always

# The base URL of the `Learn more` button for skip reasons
- name: network.trr_ui.skip_reason_learn_more_url
  type: String
  value: "https://firefox-source-docs.mozilla.org/networking/dns/trr-skip-reasons.html#"
  mirror: never

# Use Oblivious HTTP when making TRR requests.
- name: network.trr.use_ohttp
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Oblivious HTTP relay URI for TRR requests.
- name: network.trr.ohttp.relay_uri
  type: String
  value: ""
  mirror: never

# URI from which to fetch the configuration for the Oblivious HTTP gateway for TRR requests.
- name: network.trr.ohttp.config_uri
  type: String
  value: ""
  mirror: never

# The URI used for the target DoH server when network.trr.use_ohttp is true
- name: network.trr.ohttp.uri
  type: String
  value: ""
  mirror: never

# Scaling factor for the QUIC PTO timer on the HTTP/3 connection used for DoH.
0 means "use neqo's default (spec-compliant)". Values below 100 fire loss
# probes sooner, reducing tail-loss latency for short-lived DNS queries.
- name: network.trr.fast_pto_for_http3_conn
  type: RelaxedAtomicUint32
#ifdef NIGHTLY_BUILD
  value: 50
#else
  value: 0
#endif
  mirror: always

# The idle timeout for the HTTP/3 connection that is used for DoH
- name: network.trr.idle_timeout_for_http3_conn
  type: RelaxedAtomicUint32
#ifdef EARLY_BETA_OR_EARLIER
  value: 400
#else
  value: 30
#endif
  mirror: always

# When true, TRR/DoH requests and responses will be issues from and parsed
# on the socket thread. When false, a dedicated "TRR Background" is used.
- name: network.trr.parse_on_socket_thread
  type: RelaxedAtomicBool
  value: true
  mirror: always

# When true, the TRR (DoH) connection is preserved across connection-cleanup
# events (e.g. application-background on Android) instead of being torn down.
- name: network.trr.preserve_on_background
  type: RelaxedAtomicBool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

# When true, the TRR transaction gets marked and runnables
# dispatched for it get increased priority.
- name: network.trr.high_priority_events
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Speculatively pre-connect to the TRR server when the app returns to the
# foreground (application-foreground), so the connection is ready before the
# first DNS query arrives. Effective on Android; application-foreground is not
# fired on desktop.
- name: network.trr.preconnect_on_foreground
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Allow the network changed event to get sent when a network topology or setup
# change is noticed while running.
- name: network.notify.changed
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Allow network detection of IPv6 related changes (bug 1245059)
- name: network.notify.IPv6
  type: RelaxedAtomicBool
#ifdef XP_WIN
  value: false
#else
  value: true
#endif
  mirror: always

# Whether to check the dnsSuffix on network changes
- name: network.notify.dnsSuffixList
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether to check the registry for proxies on network changes that indicate
# that TRR should not be used.
- name: network.notify.checkForProxies
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether to check the registry for NRPT rules on network changes that
# indicate that TRR should not be used.
- name: network.notify.checkForNRPT
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether NotifyIpInterfaceChange should be called immediately after
# registration in order to record the initial state of the network adapters.
- name: network.notify.initial_call
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether to check for DNS resolvers
- name: network.notify.resolvers
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether to use the rust implemented DefaultURI for unknown scheme types
- name: network.url.useDefaultURI
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Allows use of a protocol exception list that will bypass defaultURI parser
- name: network.url.simple_uri_unknown_schemes_enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# A list of schemes to allow for bypassing defaultURI as default
# This is only used when network.url.simple_uri_unknown_schemes_enabled is true
- name: network.url.simple_uri_unknown_schemes
  type: String
  value: ""
  mirror: never

# The maximum allowed length for a URL - 512MB default.
# If 0 that means no limit.
- name: network.url.max-length
  type: RelaxedAtomicUint32
  value: 512 * 1024 * 1024
  mirror: always

# When true, if all the cyrillic characters in a label
# are latin confusables and on a non-cyrillic domain
# the label will be displayed as punycode.
- name: network.idn.punycode_cyrillic_confusables
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Force remapping of remote port numbers to allow reaching local testing
# servers or port forwarders listening on non-standard ports.  Note that
# this is not changing the origin URL in the addressbar, only internally
# the port number used.  This is intended to be used along with the
# `network.dns.forceResolve` preference.
#
# The form is:
#   "80,443,808-888=8080563=8081"
# this will remap ports for HTTP, HTTPS and the range of 808-888 included
# to use port 8080, and port 563 to go to 8081.
- name: network.socket.forcePort
  type: String
  value: ""
  mirror: never

# Try and use HTTP2 when using SSL
- name: network.http.http2.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: network.http.http2.enabled.deps
  type: RelaxedAtomicBool
  value: false
  mirror: always

# When true, Firefox will send Extensivle prioritization scheme
# PRIORITY_UPDATE frames.
- name: network.http.http2.priority_updates
  type: RelaxedAtomicBool
  value: false
  mirror: always

# This pref controls whether to send the
# SETTINGS_NO_RFC7540_PRIORITIES when stream dependencies
# are disabled, and extensible prioritization scheme is in use.
# defaults to false as some servers panic when they see this (bug 1928600)
- name: network.http.http2.send_NO_RFC7540_PRI
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: network.http.http2.enforce-tls-profile
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: network.http.http2.chunk-size
  type: RelaxedAtomicInt32
  value: 16000
  mirror: always

- name: network.http.http2.timeout
  type: RelaxedAtomicInt32
  value: 170
  mirror: always

- name: network.http.http2.coalesce-hostnames
  type: RelaxedAtomicBool
  value: true
  mirror: always

# When true, origin A and origin B will be coalesced if they have an overlap
# in IP addresses as advertized by DNS, regardless if the existing connection
# to origin A is not to an IP present in B's DNS response.
# When false, an existing connection will only be reused if the
# connection's remote IP is also present in B's DNS response.
- name: network.http.http2.aggressive_coalescing
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: network.http.http2.ping-threshold
  type: RelaxedAtomicInt32
  value: 58
  mirror: always

- name: network.http.http2.ping-timeout
  type: RelaxedAtomicInt32
  value: 8
  mirror: always

- name: network.http.http2.send-buffer-size
  type: RelaxedAtomicInt32
  value: 0
  mirror: always

# When true, Firefox will send a SETTINGS_MAX_CONCURRENT_STREAMS
# parameter when push is disabled. Chrome doesn't send this,
# so some servers misbehave when we do. See Bug 1919750.
- name: network.http.http2.send-push-max-concurrent-frame
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: network.http.http2.push-allowance
  type: RelaxedAtomicInt32
  value: 131072  # 128KB
  mirror: always

- name: network.http.http2.pull-allowance
  type: RelaxedAtomicInt32
  value: 12582912  # 12MB
  mirror: always

- name: network.http.http2.default-concurrent
  type: RelaxedAtomicInt32
  value: 100
  mirror: always

- name: network.http.http2.default-hpack-buffer
  type: RelaxedAtomicInt32
  value: 65536 # 64K
  mirror: always

- name: network.http.http2.websockets
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: network.http.http2.enable-hpack-dump
  type: RelaxedAtomicBool
  value: false
  mirror: always

# According to RFC 9113, the maximum stream ID is 0x80000000.
# However, we've been using a smaller value since the beginning.
- name: network.http.http2.max_stream_id
  type: RelaxedAtomicInt32
  value: 0x7800000
  mirror: always

- name: network.http.move_to_pending_list_after_network_change
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Enable HTTP/3
- name: network.http.http3.enable
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Receive buffer size of QUIC socket
- name: network.http.http3.recvBufferSize
  type: RelaxedAtomicInt32
  value: 1048576
  mirror: always

# Use NSPR for HTTP3 UDP IO
- name: network.http.http3.use_nspr_for_io
  type: RelaxedAtomicBool
  value: false
  mirror: always
  rust: true

# Set IP ECN marks on HTTP3/QUIC UDP datagrams. Noop if
# network.http.http3.use_nspr_for_io is true.
- name: network.http.http3.ecn_mark
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# Report IP ECN marks from HTTP3/QUIC UDP datagrams via QUIC ACKs back to the
# sender. Noop if network.http.http3.use_nspr_for_io is true.
- name: network.http.http3.ecn_report
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# Poll UDP socket via PR_POLL_WRITE on WOULD_BLOCK. Noop if
# network.http.http3.use_nspr_for_io is true.
#
# See <https://phabricator.services.mozilla.com/D239162> for details.
- name: network.http.http3.pr_poll_write
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# Fallback to H2 if mHttp3Connection->Fetch returns an error in
# Http3Session::TryActivating
- name: network.http.http3.fallback_to_h2_on_error
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Maximum number of UDP segments in a single UDP GSO send. Noop if
# network.http.http3.use_nspr_for_io is true.
- name: network.http.http3.max_gso_segments
  type: RelaxedAtomicUint32
#ifdef XP_WIN
  # Disable GSO on Windows.
  #
  # See https://bugzilla.mozilla.org/show_bug.cgi?id=1979279 for details.
  value: 1
#else
  # Current industry standard. Likely worth tuning.
  value: 10
#endif
  mirror: always
  rust: true

# Kill switch for the Apple fast UDP datapath (sendmsg_x/recvmsg_x). Set to
# false to disable probing and usage without restarting Firefox.
- name: network.http.http3.apple_fast_datapath
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

- name: network.http.http3.enable_qlog
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: network.http.http3.enable_0rtt
  type: RelaxedAtomicBool
  value: true
  mirror: always

# When true, ZeroRttHandle::Finish0RTT treats the real transaction as gone to
# simulate a transaction is cancelled during 0RTT handshake.
- name: network.http.0rtt_force_txn_gone_for_testing
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Maximum time (ms) a session can remain in ZERORTT state before being
# considered stuck. If a Http3Session doesn't transition to CONNECTED within
# this timeout, it will be closed.
- name: network.http.http3.0rtt_timeout
  type: RelaxedAtomicUint32
  value: 5000
  mirror: always

# When a h3 transaction is inserted in the pending queue, the time (ms) we wait
# to create a TCP backup connection.
- name: network.http.http3.backup_timer_delay
  type: RelaxedAtomicUint32
  value: 100
  mirror: always

# Delay in milliseconds before falling back the proxy’s inner connection
# from HTTP/3 to HTTP/2/1 after receiving 200 OK.
- name: network.http.http3.inner_fallback_delay
  type: RelaxedAtomicUint32
  value: 3000
  mirror: always

# The global half open sockets allowed for creating a backup connection.
- name: network.http.http3.parallel_fallback_conn_limit
  type: RelaxedAtomicUint32
  value: 32
  mirror: always

# Connection-level flow control limit
- name: network.http.http3.max_data
  type: RelaxedAtomicUint32
  value: 25165824
  mirror: always

# Stream-level flow control limit
- name: network.http.http3.max_stream_data
  type: RelaxedAtomicUint32
  value: 12582912
  mirror: always

# Enable http3 network priority as described in
# <https://www.rfc-editor.org/rfc/rfc9218.html>.
- name: network.http.http3.priority
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Depriorizing background tabs notifies websites when switching to or from the
# tab while still loading resources for the website. On one hand it might
# improve performance when switching to an tab with a website using the same
# QUIC connection. On the other hand it sends more data to the website and
# might be a privacy concern.
- name: network.http.http3.send_background_tabs_deprioritization
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: network.http.http3.version_negotiation.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# When a Http/3 connection failed, whether to retry with a different IP address.
- name: network.http.http3.retry_different_ip_family
  type: RelaxedAtomicBool
  value: @IS_EARLY_BETA_OR_EARLIER@
  mirror: always

# This is for testing purpose. When true, nsUDPSocket::SendWithAddress and
# neqo_http3conn_process_output_and_send will return NS_ERROR_CONNECTION_REFUSED
# for address "::1".
- name: network.http.http3.block_loopback_ipv6_addr
  type: RelaxedAtomicBool
  value: false
  mirror: always
  rust: true

# The congestion control algorithm with which to configure neqo.
0 => NewReno
1 => Cubic
- name: network.http.http3.cc_algorithm
  type: RelaxedAtomicUint32
  value: 1
  mirror: always
  rust: true

# The slow start algorithm with which to configure neqo.
0 => Classic
1 => HyStart++
2 => SEARCH
- name: network.http.http3.slow_start_algorithm
  type: RelaxedAtomicUint32
  value: 0
  mirror: always
  rust: true

# HTTP3: Whether the HyStart++ alternative CSS baseline value should be used.
# Has no effect unless network.http.http3.slow_start_algorithm is set to 1, which activates HyStart++.
- name: network.http.http3.hystart_alternative_css_baseline
  type: RelaxedAtomicBool
  value: false
  mirror: always
  rust: true

# HTTP3: Whether Spurious Congestion Event Recovery should be turned on.
- name: network.http.http3.spurious_recovery
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# Whether to send an mlkem768x25519 key share in HTTP/3 TLS handshakes.
# Has no effect unless security.tls.enable_kyber is true.
- name: network.http.http3.enable_kyber
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# When true, HTTP/3 will be disabled when third party roots are found.
- name: network.http.http3.disable_when_third_party_roots_found
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Only used for testing purposes. In automation, this value is used to override
# the result of third party roots check.
- name: network.http.http3.has_third_party_roots_found_in_automation
  type: RelaxedAtomicBool
  value: false
  mirror: always

# When network.http.http3.alt-svc-mapping-for-testing is set, only use
# HTTP/3 to connect.
- name: network.http.http3.force-use-alt-svc-mapping-for-testing
  type: RelaxedAtomicBool
  value: false
  mirror: always

# When network.http.http3.sni-slicing is set, TLS SNI slicing is enabled.
- name: network.http.http3.sni-slicing
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# Whether to enable Zlib for H3/QUIC certificate compression.
# Has no effect unless security.tls.enable_certificate_compression_zlib is true.
- name: network.http.http3.enable_certificate_compression_zlib
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# Whether to enable Zstd for H3/QUIC certificate compression.
# Has no effect unless security.tls.enable_certificate_compression_zstd is true.
- name: network.http.http3.enable_certificate_compression_zstd
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# Whether to enable Brotli for H3/QUIC certificate compression.
# Has no effect unless security.tls.enable_certificate_compression_brotli is true.
- name: network.http.http3.enable_certificate_compression_brotli
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# When true, skip alt-svc validation when the connection is made using HTTPS RR.
- name: network.http.skip_alt_svc_validation_on_https_rr
  type: RelaxedAtomicBool
  value: true
  mirror: always

# The idle timeout used for HTTP/3 connection.
- name: network.http.http3.idle_timeout
  type: RelaxedAtomicUint32
  value: 30
  mirror: always

# Whether to enable Packetization Layer Path MTU Discovery.
- name: network.http.http3.pmtud
  type: RelaxedAtomicBool
  value: false
  mirror: always
  rust: true

# When true, force TRR connections to use HTTP/3 first
- name: network.trr.force_http3_first
  type: RelaxedAtomicBool
  value: false
  mirror: always

# When true, allow HTTP/3 first behavior when enabled via remote settings
- name: network.trr.allow_default_http3_first
  type: RelaxedAtomicBool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

# When true, a http request will be upgraded to https when HTTPS RR is
# available.
- name: network.dns.upgrade_with_https_rr
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether to use HTTPS RR as AltSvc
- name: network.dns.use_https_rr_as_altsvc
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether to check for NAT64 using the system resolver
- name: network.connectivity-service.nat64-check
  type: bool
  value: true
  mirror: always

# Manually enter the NAT64 prefix that will be used if IPv4 is unavailable.
# The value is formatted as IPv6 with the least significant bits to be dropped.
# For example, 64:ff9b:: is a common prefix. This will not disable
# the NAT64 check, although the value of this pref will be prioritized.
- name: network.connectivity-service.nat64-prefix
  type: String
  value: ""
  mirror: never

# Whether to wait for idle-startup notification before performing connectivity checks
- name: network.connectivity-service.wait_for_idle_startup
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether to enable echconfig.
- name: network.dns.echconfig.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether to enable echconfig for http3.
- name: network.dns.http3_echconfig.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# This pref needs to be worked together with network.dns.echconfig.enabled
# being true and there is no record without ECHConfig.
# When we try all records with ECHConfig in HTTPS RRs and still can't connect,
# this pref indicate whether we can fallback to the origin server.
- name: network.dns.echconfig.fallback_to_origin_when_all_failed
  type: RelaxedAtomicBool
  value: false
  mirror: always

# When true, reset the exclusion list when all records are excluded.
- name: network.dns.httpssvc.reset_exclustion_list
  type: RelaxedAtomicBool
  value: true
  mirror: always

# If the http3 connection cannot be ready after the timeout value here, the
# transaction will start another non-http3 conneciton.
# Setting this value to 0 indicates this feature is disabled.
- name: network.dns.httpssvc.http3_fast_fallback_timeout
  type: RelaxedAtomicUint32
  value: 50
  mirror: always

# The TTL for negative responses of TXT and HTTPS records.
- name: network.dns.negative_ttl_for_type_record
  type: RelaxedAtomicUint32
  value: 300   # 5 minutes (in seconds)
  mirror: always

# Whether to use port prefixed QNAME for HTTPS RR
- name: network.dns.port_prefixed_qname_https_rr
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether to use HTTPS RR and ignore NS_HTTP_DISALLOW_HTTPS_RR
# This pref is only set when running tests
- name: network.dns.force_use_https_rr
  type: RelaxedAtomicBool
  value: false
  mirror: always

# When true, we check if the cname is the same as the target name of the record.
# If not, the record will not be used.
- name: network.dns.https_rr.check_record_with_cname
  type: RelaxedAtomicBool
  value: true
  mirror: always

# This preference can be used to turn off IPv6 name lookups. See bug 68796.
- name: network.dns.disableIPv6
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Whether to prefer IPv6 name lookups.
- name: network.dns.preferIPv6
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Only used for testing
- name: network.dns.mock_HTTPS_RR_domain
  type: String
  value: ""
  mirror: never

# When true, placing the most recent used cache entry
# to the tail of the EvictionQ.
- name: network.dns.mru_to_tail
  type: RelaxedAtomicBool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

# Whether to add additional record IPs to the cache
- name: network.trr.add_additional_records
  type: RelaxedAtomicBool
  value: false
  mirror: always

# When true, the HTTP cache uses the No-Vary-Search response header to match
# URL variants against existing cache entries, implementing the "equivalent
# modulo variation config" algorithm from the No-Vary-Search spec
# (https://httpwg.org/http-extensions/draft-ietf-httpbis-no-vary-search.html).
# Can be set to false to disable the feature if regressions are observed.
- name: network.cache.no_vary_search
  type: RelaxedAtomicBool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

# When this pref is true, AddStorageEntry will return an error if the
# OPEN_READONLY & OPEN_SECRETLY flags are passed and no entry exists.
# If no regressions occur this pref should be removed.
- name: network.cache.bug1708673
  type: RelaxedAtomicBool
  value: false
  mirror: always

# How much progress we want to do minimum when purging under pressure.
# On disk, we may see blocking I/O, so for now we keep 0 here.
- name: network.cache.purge_minprogress_disk
  type: RelaxedAtomicUint32
  value: 0
  mirror: always

# How much progress we want to do minimum when purging under pressure.
# In memory, purging is cheap and memory is precious.
- name: network.cache.purge_minprogress_memory
  type: RelaxedAtomicUint32
  value: 32
  mirror: always

# When true we will dispatch a background task (separate process) to
# delete the cache folder at shutdown in order to avoid shutdown hangs.
- name: network.cache.shutdown_purge_in_background_task
  type: RelaxedAtomicBool
#if defined(XP_WIN)
  value: true
#else
  value: false
#endif
  mirror: always

# Number of seconds to wait for the cache folder to be renamed before
# the background task forcefully exists.
- name: network.cache.shutdown_purge_folder_wait_seconds
  type: RelaxedAtomicUint32
  value: 10
  mirror: always

- name: network.cache.persist_permanent_redirects_http
  type: bool
  value: false
  mirror: always

# Disable cache purging temporarily to support cache tests
- name: network.cache.purge_disable
  type: RelaxedAtomicBool
  value: false
  mirror: always

# The number of milliseconds after which a suspended channel writing
# to a cache entry will notify all readers waiting for a callback to
# continue without a cache entry.
- name: network.cache.suspended_writer_delay_ms
  type: RelaxedAtomicUint32
  value: 5000
  mirror: always

# This is used for a temporary workaround for a web-compat issue. If pref is
# true CORS preflight requests are allowed to send client certificates.
- name: network.cors_preflight.allow_client_cert
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Whether to record the telemetry event when a JAR channel is failed to load.
- name: network.jar.record_failure_reason
  type: RelaxedAtomicBool
  value: @IS_EARLY_BETA_OR_EARLIER@
  mirror: always

# nsJARInputStream::Available returns the size indicated by the archived entry
# so we need a limit so we don't OOM if the archive is corrupted.
- name: network.jar.max_available_size
  type: RelaxedAtomicUint32
  value: 256*1024*1024 # 256 Mb
  mirror: always

# When decompressing an archived entry we need to allocate a buffer
# large enough to hold the uncompressed entry. This pref specifies the max
# size of such a buffer.
# When set to 0 there is no limit.
- name: network.jar.max_entry_size
  type: RelaxedAtomicUint32
  value: 256*1024*1024 # 256 Mb
  mirror: always

# When this pref is true, we will use the HTTPS acceptable content encoding
# list for trustworthy domains such as http://localhost
- name: network.http.encoding.trustworthy_is_https
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Support http3 version1
- name: network.http.http3.support_version1
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Disable early data on an origin if SSL_ERROR_PROTOCOL_VERSION_ALERT is received
- name: network.http.early_data_disable_on_error
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Disable early data if it fails for more than this number of origins
- name: network.http.early_data_max_error
  type: RelaxedAtomicUint32
  value: 5
  mirror: always

# If true, remove the resumption token when 0RTT failed.
- name: network.http.remove_resumption_token_when_early_data_failed
  type: RelaxedAtomicBool
  value: true
  mirror: always

  # The length of cnonce string used in HTTP digest auth.
- name: network.http.digest_auth_cnonce_length
  type: uint32_t
  value: 16
  mirror: always

# When a primary or backup half-open socket fails while another is still
# connecting, retry with the remaining one
- name: network.http.retry_with_another_half_open
  type: RelaxedAtomicBool
  value: @IS_EARLY_BETA_OR_EARLIER@
  mirror: always

- name: network.http.basic_http_auth.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: network.http.happy_eyeballs_enabled
  type: RelaxedAtomicBool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

# The time to wait after receiving the first DNS response before moving on
# to the connection phase (ms).
- name: network.http.happy_eyeballs_resolution_delay
  type: RelaxedAtomicUint32
  value: 50
  mirror: always

# The time to wait between successive connection attempts (ms).
- name: network.http.happy_eyeballs_connection_attempt_delay
  type: RelaxedAtomicUint32
  value: 250
  mirror: always

# If true, it will include extra tags to be sniffed by nsUnknownDecoder
# These tags were previously sniffed by Firefox for legacy/webcompat but
# are not part of the MIME sniffing spec.
- name: network.mimesniff.extra_moz_html_tags
  type: RelaxedAtomicBool
  value: false
  mirror: always

# When true, we will also sniff content beginning with <!--
# but not followed by space or > as HTML. This differs from the mimesniff
# standard but matches Chrome.
- name: network.mimesniff.non_standard_html_comment
  type: RelaxedAtomicBool
  value: true
  mirror: always

# The maximum count that we allow socket prrocess to crash. If this count is
# reached, we won't use networking over socket process.
- name: network.max_socket_process_failed_count
  type: RelaxedAtomicUint32
  value: 1
  mirror: always

- name: network.allow_redirect_to_data
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: network.allow_raw_sockets_in_content_processes
  type: bool
  value: false
  mirror: once

- name: network.allow_large_stack_size_for_socket_thread
  type: RelaxedAtomicBool
  value: true
  mirror: always

# WebTransport
- name: network.webtransport.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# WebTransport Redirect support
- name: network.webtransport.redirect.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Wifi-scan polling period, in ms, when on a mobile network.
# A value of 0 indicates that no polling should be done.
- name: network.wifi.scanning_period
  type: RelaxedAtomicUint32
  value: 60000
  mirror: always

# Block synchronous XMLHttpRequests coming from system requests
- name: network.xhr.block_sync_system_requests
  type: bool
  value: true
  mirror: always

# When the Access-Control-Allow-Headers is wildcard (*), whether to allow
# CORS-protected requests with the Authorization request header.
- name: network.cors_preflight.authorization_covered_by_wildcard
  type: bool
  value: true
  mirror: always

# Inner schemes that are allowed to display application/http-index-format.
# Set to * to allow all schemes.
- name: network.http_index_format.allowed_schemes
  type: String
  value: "file"
  mirror: never

# Enable off-main-thread decompression of network streams
# Note:network.decompression_off_mainthread triggered a bug, so
# we switched to a new pref that can be turned off safely
- name: network.decompression_off_mainthread2
  type: bool
  value: true
  mirror: always

# Minimum content-length to use off-main-thread decompression of network streams
- name: network.decompression_off_mainthread_min_size
  type: int32_t
  value: 512
  mirror: always

# Cached state of parental controls (enabled/disabled)
- name: network.parental_controls_cached_state
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Used for testing purposes only. When true, it attaches an extra networking
# layer to simulate different network scenarios.
- name: network.socket.attach_mock_network_layer
  type: RelaxedAtomicBool
  value: false
  mirror: always

# When true, the socket transport service will have an additional queue for
# runnables with increased priority.
- name: network.socket.prioritize_runnables
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Maximum duration (seconds) that transmitted data may remain unacknowledged
# before TCP forcibly closes the connection. 0 = disabled (kernel default).
# Only effective on Linux/Android (TCP_USER_TIMEOUT, kernel 2.6.37+).
- name: network.tcp.user_timeout
  type: RelaxedAtomicInt32
#ifdef NIGHTLY_BUILD
  value: 30
#else
  value: 0
#endif
  mirror: always

# Maximum unsent data (bytes) in the kernel send buffer before a TCP socket
# stops reporting writable. Reduces local send bufferbloat for multiplexed
# connections. 0 = disabled (kernel default). Effective on Linux 4.6+ and macOS.
- name: network.tcp.notsent_lowat
  type: RelaxedAtomicInt32
#ifdef NIGHTLY_BUILD
  value: 32768
#else
  value: 0
#endif
  mirror: always

# Whether to redirect a failing request to an essential domain
# to a fallback domain that hosts the same content.
- name: network.essential_domains_fallback
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Enable HTTP Compression Dictionary support
- name: network.http.dictionaries.enable
  type: RelaxedAtomicBool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

#---------------------------------------------------------------------------
# Prefs starting with "nglayout."
#---------------------------------------------------------------------------

# Enable/disable display list invalidation logging --- useful for debugging.
- name: nglayout.debug.invalidation
  type: bool
  value: false
  mirror: always

- name: nglayout.debug.disable_xul_cache
  type: bool
  value: false
  mirror: always

- name: nglayout.initialpaint.delay
  type: int32_t
  value: 5
  mirror: always

- name: nglayout.initialpaint.delay_in_oopif
  type: int32_t
  value: 5
  mirror: always

#---------------------------------------------------------------------------
# Prefs starting with "page_load."
#---------------------------------------------------------------------------

# Time in milliseconds during which certain tasks are deprioritized during
# page load.
- name: page_load.deprioritization_period
  type: RelaxedAtomicUint32
  value: 5000
  mirror: always

#---------------------------------------------------------------------------
# Prefs starting with "pdfjs."
#---------------------------------------------------------------------------

- name: pdfjs.disabled
  type: bool
  value: false
  mirror: always

#---------------------------------------------------------------------------
# Prefs starting with "permissions."
#---------------------------------------------------------------------------

1-Accept, 2-Deny, Any other value: Accept
- name: permissions.default.image
  type: RelaxedAtomicUint32
  value: 1
  mirror: always

- name: permissions.default.screen-wake-lock
  type: RelaxedAtomicUint32
  value: 1
  mirror: always

- name: permissions.isolateBy.userContext
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: permissions.isolateBy.privateBrowsing
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Is support for Permissions.query enabled for camera and microphone?
- name: permissions.media.query.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether default permissions should be imported from remote settings in
# addition to importing them from browser/app/permissions.
- name: permissions.manager.remote.enabled
  type: bool
  value: true
  mirror: always

# Enable expiration of permissions that haven't been used recently.
- name: permissions.expireUnused.enabled
  type: RelaxedAtomicBool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

# Duration in seconds after which unused permissions expire.
# Default: 13 months (13 * 30 * 24 * 60 * 60 = 33696000)
- name: permissions.expireUnusedThresholdSec
  type: uint32_t
  value: 33696000
  mirror: always

# Comma-separated list of permission types that can expire due to inactivity.
# Derived from SitePermissions.sys.mjs gPermissions._permissions
# Double-keyed permissions must include the ^ delimiter (e.g., "open-protocol-handler^")
- name: permissions.expireUnusedTypes
  type: String
  value: "autoplay-media,cookie,camera,localhost,local-network,microphone,screen,speaker,popup,install,geo,open-protocol-handler^,xr,focus-tab-by-prompt,shortcuts,canvas,midi,midi-sysex,storage-access,3rdPartyStorage^,3rdPartyFrameStorage^"
  mirror: never

#---------------------------------------------------------------------------
# Prefs starting with "places."
#---------------------------------------------------------------------------

# Whether pages alternative frecency is enabled. This and the following related
# prefs only apply at restart.
- name: places.frecency.pages.alternative.featureGate
  type: bool
  value: false
  mirror: once

- name: places.frecency.pages.alternative.veryHighWeight
  type: uint32_t
  value: 200
  mirror: once

- name: places.frecency.pages.alternative.highWeight
  type: uint32_t
  value: 100
  mirror: once

- name: places.frecency.pages.alternative.mediumWeight
  type: uint32_t
  value: 50
  mirror: once

- name: places.frecency.pages.alternative.lowWeight
  type: uint32_t
  value: 20
  mirror: once

- name: places.frecency.pages.alternative.halfLifeDays
  type: uint32_t
  value: 30
  mirror: once

- name: places.frecency.pages.alternative.numSampledVisits
  type: uint32_t
  value: 10
  mirror: once

# Max difference allowed between a visit and an interaction.
- name: places.frecency.pages.alternative.interactions.maxVisitGapSeconds
  type: uint32_t
  value: 2 * 60
  mirror: once

# Minimum view time required to upgrade a visit score.
- name: places.frecency.pages.alternative.interactions.viewTimeSeconds
  type: uint32_t
  value: 60
  mirror: once

# Minimum view time required to upgrade a visit score of a visit
# provided there is a minimum threshold of keypresses.
- name: places.frecency.pages.alternative.interactions.viewTimeIfManyKeypressesSeconds
  type: uint32_t
  value: 20
  mirror: once

# Minimum keypresses of a visit required to upgrade a visit score.
- name: places.frecency.pages.alternative.interactions.manyKeypresses
  type: uint32_t
  value: 50
  mirror: once

# Preferences related to interaction based frecency.
- name: places.frecency.pages.veryHighWeight
  type: uint32_t
  value: 200
  mirror: once

- name: places.frecency.pages.highWeight
  type: uint32_t
  value: 100
  mirror: once

- name: places.frecency.pages.mediumWeight
  type: uint32_t
  value: 50
  mirror: once

- name: places.frecency.pages.lowWeight
  type: uint32_t
  value: 20
  mirror: once

- name: places.frecency.pages.halfLifeDays
  type: uint32_t
  value: 30
  mirror: once

- name: places.frecency.pages.numSampledVisits
  type: uint32_t
  value: 10
  mirror: once

# Max difference allowed between a visit and an interaction.
- name: places.frecency.pages.interactions.maxVisitGapSeconds
  type: uint32_t
  value: 2 * 60
  mirror: once

# Minimum view time required to upgrade a visit score.
- name: places.frecency.pages.interactions.viewTimeSeconds
  type: uint32_t
  value: 60
  mirror: once

# Minimum view time required to upgrade a visit score of a visit
# provided there is a minimum threshold of keypresses.
- name: places.frecency.pages.interactions.viewTimeIfManyKeypressesSeconds
  type: uint32_t
  value: 20
  mirror: once

# Minimum keypresses of a visit required to upgrade a visit score.
- name: places.frecency.pages.interactions.manyKeypresses
  type: uint32_t
  value: 50
  mirror: once

# Whether flooding prevention feature is enabled or not.
- name: places.history.floodingPrevention.enabled
  type: bool
  value: true
  mirror: always

# Maximum elapsed time betwen a user interaction and a visit before starting to
# apply flooding prevention.
- name: places.history.floodingPrevention.maxSecondsFromLastUserInteraction
  type: uint32_t
  value: 3
  mirror: always

# Number of consecutive accesses to an origin in a short timeframe before
# starting to restrict storing visits for it.
- name: places.history.floodingPrevention.restrictionCount
  type: uint32_t
  value: 3
  mirror: always

# Duration of the timeframe where consecutive visits to an origin should happen
# before starting to restrict storing visits for it.
- name: places.history.floodingPrevention.restrictionExpireSeconds
  type: uint32_t
  value: 5
  mirror: always

#---------------------------------------------------------------------------
# Prefs starting with "plain_text."
#---------------------------------------------------------------------------

# When false, text in plaintext documents does not wrap long lines.
- name: plain_text.wrap_long_lines
  type: bool
  value: true
  mirror: always

#---------------------------------------------------------------------------
# Prefs starting with "preferences."
#---------------------------------------------------------------------------

- name: preferences.allow.omt-write
  type: bool
  value: true
  mirror: never

#ifdef DEBUG
  # If set to true, setting a Preference matched to a `Once` StaticPref will
  # assert that the value matches. Such assertion being broken is a clear flag
  # that the Once policy shouldn't be used.
-   name: preferences.check.once.policy
    type: bool
    value: false
    mirror: always

  # If set to true, StaticPrefs Once policy check will be skipped during
  # automation regression test. Use with care. This pref must be set back to
  # false as soon as specific test has completed.
-   name: preferences.force-disable.check.once.policy
    type: bool
    value: false
    mirror: always
#endif

#---------------------------------------------------------------------------
# Prefs starting with "print."
#---------------------------------------------------------------------------

# Variation fonts can't always be embedded in certain output formats
# such as PDF. To work around this, draw the variation fonts using
# paths instead of using font embedding.
- name: print.font-variations-as-paths
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether we always print silently (without a print dialog).
- name: print.always_print_silent
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Whether we directly use the system print dialog to collect the user's print
# settings rather than using the tab-modal print preview dialog.
# Note: `print.always_print_silent` overrides this.
- name: print.prefer_system_dialog
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Whether we attempt to generate links in Save As PDF output.
- name: print.save_as_pdf.links.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether we attempt to generate and use document-internal PDF destinations.
- name: print.save_as_pdf.internal_destinations.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether we use the CSS @page size as the paper size in PDF output.
- name: print.save_as_pdf.use_page_rule_size_as_paper_size.enabled
  type: RelaxedAtomicBool
  value: @IS_NOT_ANDROID@
  mirror: always

# The default DPI for printing.
#
# For PDF-based output, DPI should ideally be irrelevant, but in fact it is not
# for multiple reasons:
#
#  * Layout code that tries to respect device pixels (e.g. for snapping glyph
#    positions and baselines, and especially for the "GDI Classic"
#    rendering-mode threshold for certain fonts).
#
#  * The limitations of the PDF format mean that we can't natively represent
#    certain effects, such as filters, in PDF output, so we need to rasterize
#    the parts of the document with these applied.
#
#  * Other rasterized things like images and such are also affected by DPI
#    (both in the output, and the images we select via srcset, for example).
#
# Therefore, using a high DPI is preferable. For now, we use 144dpi to match
# physical printer output on Windows, but higher (e.g. 300dpi) might be better,
# but only if it does not lead to issues such as excessive memory use.
- name: print.default_dpi
  type: float
  value: 144.0f
  mirror: always

# Disabling this will no-op window.print()
- name: print.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Determines if and when to center pages on a sheet horiontally when printing.
# With a setting of 2, it's guaranteed that A4 on US Letter will be centered.
#  0: never,
#  1: always,
#  2: when the ratio of sheet to page size after content scaling is near 1.0
- name: print.center_page_on_sheet
  type: RelaxedAtomicUint32
  value: 2
  mirror: always

#ifdef MOZ_ENABLE_SKIA_PDF
# Whether we should try to use skpdf for pdf output.
- name: print.experimental.skpdf
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Encoding quality for images. 101 means lossless, otherwise they get
# jpeg-encoded with a particular quality.
- name: print.skpdf.image-encoding-quality
  type: RelaxedAtomicInt32
  value: 101
  mirror: always
#endif

#---------------------------------------------------------------------------
# Prefs starting with "privacy."
#---------------------------------------------------------------------------

# Annotate trackers using the strict list. If set to false, the basic list will
# be used instead.
- name: privacy.annotate_channels.strict_list.enabled
  type: bool
  value: false
  mirror: always

# Annotate trackers using the strict list in the private browsing mode. If set
# to false, the basic list will be used instead.
- name: privacy.annotate_channels.strict_list.pbmode.enabled
  type: bool
  value: true
  mirror: always

# Enable the clearing of cache data using the clear-site-data header. If enabled,
# header values of "cache" and "*" will clear cached data from the origin
- name: privacy.clearSiteDataHeader.cache.enabled
  type: bool
  value: true
  mirror: always

# Also enable the clearing the bfcache for "Clear-Site-Data"-Header
- name: privacy.clearSiteDataHeader.cache.bfcache.enabled
  type: bool
  value: true
  mirror: always

# First Party Isolation (double keying), disabled by default.
- name: privacy.firstparty.isolate
  type: RelaxedAtomicBool
  value: false
  mirror: always

# If false, two windows in the same domain with different first party domains
# (top level URLs) can access resources through window.opener. This pref is
# effective only when "privacy.firstparty.isolate" is true.
- name: privacy.firstparty.isolate.restrict_opener_access
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: privacy.firstparty.isolate.block_post_message
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: privacy.firstparty.isolate.use_site
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Enforce tracking protection in all modes.
- name: privacy.trackingprotection.enabled
  type: bool
  value: false
  mirror: always

# Enforce tracking protection in Private Browsing mode.
- name: privacy.trackingprotection.pbmode.enabled
  type: bool
  value: true
  mirror: always

# Annotate channels based on the tracking protection list in all modes
- name: privacy.trackingprotection.annotate_channels
  type: bool
  value: true
  mirror: always

# Block harmful addon URLs.
- name: privacy.trackingprotection.harmfuladdon.enabled
  type: bool
  value: false
  mirror: always

# Block 3rd party fingerprinting resources.
- name: privacy.trackingprotection.fingerprinting.enabled
  type: bool
  value: false
  mirror: always

# Block 3rd party cryptomining resources.
- name: privacy.trackingprotection.cryptomining.enabled
  type: bool
  value: false
  mirror: always

# Block 3rd party socialtracking resources.
- name: privacy.trackingprotection.socialtracking.enabled
  type: bool
  value: false
  mirror: always

# Consider socialtracking annotation as trackers (see ETP).
- name: privacy.socialtracking.block_cookies.enabled
  type: bool
  value: true
  mirror: always

# Block 3rd party emailtracking resources in all mode.
- name: privacy.trackingprotection.emailtracking.enabled
  type: bool
  value: false
  mirror: always

# Block 3rd party emailtracking resources in Private Browsing mode.
- name: privacy.trackingprotection.emailtracking.pbmode.enabled
  type: bool
  value: true
  mirror: always

# Collecting 3rd party emailtracking telemetry.
- name: privacy.trackingprotection.emailtracking.data_collection.enabled
  type: bool
  value: true
  mirror: always

- name: privacy.trackingprotection.testing.report_blocked_node
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Annotate channels based on the consent manager list
# Note: consent manager annotations will be disabled if tracking protection is disabled
- name: privacy.trackingprotection.consentmanager.annotate_channels
  type: bool
  value: true
  mirror: always

# Skip blocking for consentmanager resources in all modes.
- name: privacy.trackingprotection.consentmanager.skip.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Skip blocking for consentmanager resources in Private Browsing mode.
- name: privacy.trackingprotection.consentmanager.skip.pbmode.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Annotate channels based on the anti-fraud list
# Note: anti-fraud annotations will be disabled if tracking protection is disabled
- name: privacy.trackingprotection.antifraud.annotate_channels
  type: bool
  value: true
  mirror: always

# Skip blocking for anti-fraud resources in all modes.
- name: privacy.trackingprotection.antifraud.skip.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Skip blocking for anti-fraud resources in Private Browsing mode.
- name: privacy.trackingprotection.antifraud.skip.pbmode.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Enable content classifier service protection (blocking).
- name: privacy.trackingprotection.content.protection.enabled
  type: bool
  value: false
  mirror: always

# Specify `|` delimited urls to use to fetch lists that will
# be used to block requests if the feature is enabled.
# Warning: this should not be enabled by the build.
- name: privacy.trackingprotection.content.protection.test_list_urls
  type: String
  value: ""
  mirror: never

# Comma-separated content classifier feature names whose engines are used
# for blocking in non-private browsing contexts.
# Defined feature names are in ContentClassifierService.cpp, kFeatures.
- name: privacy.trackingprotection.content.protection.engines
  type: String
  value: "test_block"
  mirror: never

# Comma-separated content classifier feature names whose engines are used
# for blocking in private browsing contexts.
# Defined feature names are in ContentClassifierService.cpp, kFeatures.
- name: privacy.trackingprotection.content.protection.engines.pbmode
  type: String
  value: ""
  mirror: never

# Enable content classifier service annotation.
- name: privacy.trackingprotection.content.annotation.enabled
  type: bool
  value: false
  mirror: always

# Specify `|` delimited urls to use to fetch lists that will
# be used to annotate requests if the feature is enabled.
# Warning: this should not be enabled by the build.
- name: privacy.trackingprotection.content.annotation.test_list_urls
  type: String
  value: ""
  mirror: never

# Comma-separated content classifier feature names whose engines are used
# for annotation in non-private browsing contexts.
# Defined feature names are in ContentClassifierService.cpp, kFeatures.
- name: privacy.trackingprotection.content.annotation.engines
  type: String
  value: "test_annotate"
  mirror: never

# Comma-separated content classifier feature names whose engines are used
# for annotation in private browsing contexts.
# Defined feature names are in ContentClassifierService.cpp, kFeatures.
- name: privacy.trackingprotection.content.annotation.engines.pbmode
  type: String
  value: ""
  mirror: never

# When true, fire an observer notification when filter lists finish loading.
- name: privacy.trackingprotection.content.testing
  type: bool
  value: false
  mirror: always

# Log level for the content classifier remote settings client.
# Set to "Debug" for verbose output, or one of "Info", "Warn", "Error", "Off".
- name: privacy.trackingprotection.content.remote_settings.loglevel
  type: String
  value: "Warn"
  mirror: never

# Enable the "baseline" allow-list for fixing severe site breakage (e.g. blank
# page).
- name: privacy.trackingprotection.allow_list.baseline.enabled
  type: bool
  value: true
  mirror: always

# Enable the "convenience" allow-list for less severe site breakage (e.g. embeds
# or images missing). "convenience" can only be enabled if "baseline" is
# enabled. When "baseline" is false this pref is ignored.
- name: privacy.trackingprotection.allow_list.convenience.enabled
  type: bool
  value: true
  mirror: always

# Allows content to defer the annotation url classification features
# completion until the data is being handled.
- name: privacy.trackingprotection.defer_annotation.enabled
  type: bool
  value: false
  mirror: always

# Whether to spoof user locale to English (used as part of Resist
# Fingerprinting).
0 - will prompt
1 - don't spoof
2 - spoof
- name: privacy.spoof_english
  type: RelaxedAtomicUint32
  value: 0
  mirror: always
  do_not_use_directly: true

# Send "do not track" HTTP header, disabled by default.
- name: privacy.donottrackheader.enabled
  type: bool
  value: false
  mirror: always

# Potentially send "global privacy control" HTTP header and set navigator
# property accordingly. Communicates user's desire to opt-out/in of
# websites or services selling or sharing the user's information, false by
# default.
# true - Send the header with a value of 1 to indicate opting-out
# false - Do not send header to indicate opting-in
- name: privacy.globalprivacycontrol.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Controls whether or not GPC signals are sent in private browsing mode.
# This can be overridden by `privacy.globalprivacycontrol.enabled` as true.
- name: privacy.globalprivacycontrol.pbmode.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Controls whether or not GPC signals are sent. Meant to act as a third option
# of 'undecided' by leaving the navigator property undefined and not attaching
# the Sec-GPC HTTP header.
- name: privacy.globalprivacycontrol.functionality.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Lower the priority of network loads for resources on the tracking protection
# list.  Note that this requires the
# privacy.trackingprotection.annotate_channels pref to be on in order to have
# any effect.
- name: privacy.trackingprotection.lower_network_priority
  type: bool
  value: false
  mirror: always

# A subset of Resist Fingerprinting protections focused specifically on timers.
# This affects the Animation API, the performance APIs, Date.getTime,
# Event.timestamp, File.lastModified, audioContext.currentTime,
# canvas.captureStream.currentTime.
- name: privacy.reduceTimerPrecision
  type: RelaxedAtomicBool
  value: true
  mirror: always

# If privacy.reduceTimerPrecision is false, this pref controls whether or not
# to clamp all timers at a fixed 20 microsconds. It should always be enabled,
# and is only specified as a pref to enable an emergency disabling in the event
# of catastrophic failure.
- name: privacy.reduceTimerPrecision.unconditional
  type: RelaxedAtomicBool
  value: true
  mirror: always

# The resistFingerprinting variables are marked with 'Relaxed' memory ordering.
# We don't particurally care that threads have a percently consistent view of
# the values of these prefs. They are not expected to change often, and having
# an outdated view is not particurally harmful. They will eventually become
# consistent.
#
# The variables will, however, be read often (specifically .microseconds on
# each timer rounding) so performance is important.
- name: privacy.resistFingerprinting
  type: RelaxedAtomicBool
  value: false
  mirror: always
  do_not_use_directly: true

# When the .pbmode pref is on, RFP or FPP will be enabled in PBM
# When the non-pbm pref is on, they will be enabled in PBM and non-PBM
- name: privacy.resistFingerprinting.pbmode
  type: RelaxedAtomicBool
  value: false
  mirror: always
  do_not_use_directly: true

# privacy.fingerprintingProtection enables a set of fingerprinting protections
# designed to minimize breakage while maximizing protection.
- name: privacy.fingerprintingProtection
  type: RelaxedAtomicBool
  value: false
  mirror: always
  do_not_use_directly: true

- name: privacy.fingerprintingProtection.pbmode
  type: RelaxedAtomicBool
  value: true
  mirror: always
  do_not_use_directly: true

# Disables FPP Remote settings bucket. Allows user to stop overriding
# of FPP overrides
- name: privacy.fingerprintingProtection.remoteOverrides.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: privacy.fingerprintingProtection.testing
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Enable/Disable fingerprinting protections that are enabled in
# Enhanced Tracking Protection Standard mode.
# bFPP cannot be enabled in only PBM, it is either enabled
# browser-wide or disabled browser-wide. If FPP is enabled
# in the same context as bFPP, FPP takes precedence. If
# RFP is enabled in the same context as FPP, then RFP takes precedence
- name: privacy.baselineFingerprintingProtection
  type: RelaxedAtomicBool
  value: true
  mirror: always
  do_not_use_directly: true

# This pref can be used to disable mozAddonManager entirely for fingerprinting
# reasons. Someone like Tor browser will use this pref.
# NOTE: We'd like this to be a "hidden" pref once StaticPrefs supports it.
- name: privacy.resistFingerprinting.block_mozAddonManager
  type: RelaxedAtomicBool
  value: false
  mirror: always

# The log level for browser console messages logged in RFPHelper.sys.mjs. Change to
# 'All' and restart to see the messages.
- name: privacy.resistFingerprinting.jsmloglevel
  type: String
  value: "Warn"
  mirror: never

# Enable jittering the clock one precision value forward.
- name: privacy.resistFingerprinting.reduceTimerPrecision.jitter
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Dynamically tune the resolution of the timer reduction for
# `privacy.reduceTimerPrecision` and `privacy.resistFingerprinting`.
- name: privacy.resistFingerprinting.reduceTimerPrecision.microseconds
  type: RelaxedAtomicUint32
  value: 1000
  mirror: always

- name: privacy.resistFingerprinting.target_video_res
  type: uint32_t
  value: 1080
  mirror: always

# Enable resetting the fingerprinting randomization key daily for normal windwos.
- name: privacy.resistFingerprinting.randomization.daily_reset.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Enable resetting the fingerprinting randomization key daily for private windwos.
- name: privacy.resistFingerprinting.randomization.daily_reset.private.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Control whether we use the SipHash to generate the canvas random key.
- name:  privacy.resistFingerprinting.randomization.canvas.use_siphash
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Anti-tracking permission expiration.
- name: privacy.restrict3rdpartystorage.expiration
  type: uint32_t
  value: 2592000   # 30 days (in seconds)
  mirror: always

# Report Anti-tracking warnings to console lazily
- name: privacy.restrict3rdpartystorage.console.lazy
  type: bool
  value: true
  mirror: always

# Enable the heuristic to allow storage access for windows opened using window.open() after user interaction
- name: privacy.restrict3rdpartystorage.heuristic.opened_window_after_interaction
  type: bool
  value: true
  mirror: always

# Enable the heuristic to allow storage access for windows opened using window.open()
- name: privacy.restrict3rdpartystorage.heuristic.window_open
  type: bool
  value: false
  mirror: always

# Enable the heuristic to allow storage access for windows opened using window.open()
- name: privacy.restrict3rdpartystorage.heuristic.redirect
  type: bool
  value: false
  mirror: always

# Enable the heuristic to allow storage access for extended navigations with interaction
- name: privacy.restrict3rdpartystorage.heuristic.navigation
  type: bool
#if defined(ANDROID)
  value: false
#else
  value: true
#endif
  mirror: always

# Anti-tracking permission expiration.
- name: privacy.restrict3rdpartystorage.expiration_redirect
  type: uint32_t
  value: 2592000   # 30 days (in seconds)
  mirror: always

# Anti-tracking user-interaction expiration.
- name: privacy.userInteraction.expiration
  type: uint32_t
  value: 3888000   # 45 days (in seconds)
  mirror: always

# Anti-tracking user-interaction document interval.
- name: privacy.userInteraction.document.interval
  type: uint32_t
  value: 1800   # 30 minutes (in seconds)
  mirror: always

# Enable Anti-tracking testing. When it enables, it will notify the observers
# when user-interaction permission or storage access permission is added. This
# is for testing only.
- name: privacy.antitracking.testing
  type: bool
  value: false
  mirror: always

  # Full isolation (referrer, cookie jar, etc) of resources injected by content-scripts.
- name: privacy.antitracking.isolateContentScriptResources
  type: bool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

# Controls the anti-tracking webcompat features. This includes:
# - All URL-Classifier and state partitioning skip lists (prefs and remote
#   settings)
# - Storage access heuristics (opener, redirect, etc.)
# - StorageAccessAPI automatic grants (skips the prompt)
# - Allowing specific tracking channels on user opt-in (e.g. facebook login
#   shim).
- name: privacy.antitracking.enableWebcompat
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Enable the heuristic to allow storage access for recent visited pages
- name: privacy.restrict3rdpartystorage.heuristic.recently_visited
  type: bool
#if defined(ANDROID)
  value: true
#else
  value: false
#endif
  mirror: always

# Valid time gap since last visit
- name: privacy.restrict3rdpartystorage.heuristic.recently_visited_time
  type: uint32_t
  value: 600    # 10 minutes
  mirror: always

# Whether to exclude third-party trackers from the storage access heuristics.
- name: privacy.restrict3rdpartystorage.heuristic.exclude_third_party_trackers
  type: bool
  value: true
  mirror: always

# Recent visited pages redirection permission expiration.
- name: privacy.restrict3rdpartystorage.expiration_visited
  type: uint32_t
  value: 2592000   # 30 days (in seconds)
  mirror: always

- name: privacy.window.maxInnerWidth
  type: int32_t
  value: 1400
  mirror: always

- name: privacy.window.maxInnerHeight
  type: int32_t
  value: 900
  mirror: always

- name: privacy.sanitize.sanitizeOnShutdown
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: privacy.clearOnShutdown.cache
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: privacy.clearOnShutdown_v2.cache
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: privacy.dynamic_firstparty.limitForeign
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: privacy.dynamic_firstparty.use_site
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: privacy.partition.bloburl_per_partition_key
  type: bool
  value: true
  mirror: always

- name: privacy.window.name.update.enabled
  type: bool
  value: true
  mirror: always

# By default, the network state isolation is not active when there is a proxy
# setting. This pref forces the network isolation even in these scenarios.
- name: privacy.partition.network_state.connection_with_proxy
  type: bool
  value: false
  mirror: always

# Partition the service workers unconditionally when dFPI is enabled.
- name: privacy.partition.serviceWorkers
--> --------------------

--> maximum size reached

--> --------------------

[Verzeichnis aufwärts1.369unsichere VerbindungÜbersetzung europäischer Sprachen durch Browser2026-08-24]

                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002