modules/libpref/init/StaticPrefList.yaml
author Tim Huang <tihuang@mozilla.com>
Thu, 29 Jul 2021 15:23:05 +0000
changeset 587021 4ddb82c5ddbbd9e6eee5005b0152176e3b05310e
parent 587010 df331c8f3557e68fadc8c4086c8ad220c4e6af7b
child 587087 027aeb3ebc746a154d9b60f8e2e9d4cb538eede5
permissions -rw-r--r--
Bug 1720294 - Part 1: Add a pref 'network.http.referer.disallowCrossSiteRelexingDefault'. r=ckerschb Add a pref to control if Firefox to disallow relaxing the referrer policy for cross-site requests. If it's set, we will ignore 'unsafe-url', 'no-referrer-when-downgrade' and 'origin-when-cross-origin' for cross-site requests. Differential Revision: https://phabricator.services.mozilla.com/D119971

# 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
#
# - `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, or `String`. 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.font-display.enabled")`.
#
# 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

#ifdef ANDROID
#define IS_ANDROID true
#define IS_NOT_ANDROID false
#else
#define IS_ANDROID false
#define IS_NOT_ANDROID true
#endif

#---------------------------------------------------------------------------
# Prefs starting with "accessibility."
#---------------------------------------------------------------------------

- 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.ARIAReflection.enabled
  type: bool
  value: false
  mirror: always

# Whether form controls and images should be focusable with mouse, in content
# documents.
#
# This matches historical macOS / Safari behavior.
#
#  * 0: never
#  * 1: always
#  * 2: on content documents
- name: accessibility.mouse_focuses_formcontrol
  type: int32_t
#ifdef XP_MACOSX
  value: 2
#else
  value: 1
#endif
  mirror: always

# Whether to cache the entire accessibility trees of all content processes in
# the parent process.
- name: accessibility.cache.enabled
  type: bool
  value: false
  mirror: once

#---------------------------------------------------------------------------
# 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
#ifdef XP_WIN
  # Linux and macOS turn on system level notification as default, but Windows is
  # disabled due to instability (dependencies of bug 1497425).
  value: false
#else
  value: true
#endif
  mirror: always


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

#endif

#---------------------------------------------------------------------------
# Prefs starting with "apz."
# The apz prefs are explained in AsyncPanZoomController.cpp
#---------------------------------------------------------------------------

# amount we zoom in for a double tap gesture if we couldn't find any content
# based rect to zoom to
- name: apz.doubletapzoom.defaultzoomin
  type: AtomicFloat
  value: 1.2f
  mirror: always

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

- 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.nonwr.activate_all_scroll_frames
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: apz.nonwr.activate_all_scroll_frames_when_fission
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: apz.prefer_jank_minimal_displayports
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: apz.allow_double_tap_zooming
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: apz.mac.enable_double_tap_zoom_touchpad_gesture
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: apz.allow_immediate_handoff
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: apz.allow_zooming
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: apz.allow_zooming_out
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: apz.android.chrome_fling_physics.friction
  type: AtomicFloat
  value: 0.015f
  mirror: always

- name: apz.android.chrome_fling_physics.inflexion
  type: AtomicFloat
  value: 0.35f
  mirror: always

- name: apz.android.chrome_fling_physics.stop_threshold
  type: AtomicFloat
  value: 0.1f
  mirror: always

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

- name: apz.axis_lock.breakout_angle
  type: AtomicFloat
  value: float(M_PI / 8.0)    # 22.5 degrees
  mirror: always
  include: <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.
# 0 = FREE (No locking at all)
# 1 = STANDARD (Once locked, remain locked until scrolling ends)
# 2 = STICKY (Allow lock to be broken, with hysteresis)
- name: apz.axis_lock.mode
  type: RelaxedAtomicInt32
  value: 2
  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.initial.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

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

- name: apz.enlarge_displayport_when_clipped
  type: RelaxedAtomicBool
  value: @IS_ANDROID@
  mirror: always

# Test only.
- name: apz.fixed-margin-override.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Test only.
- name: apz.fixed-margin-override.bottom
  type: RelaxedAtomicInt32
  value: 0
  mirror: always

# Test only.
- name: apz.fixed-margin-override.top
  type: RelaxedAtomicInt32
  value: 0
  mirror: always

- name: apz.fling_accel_base_mult
  type: AtomicFloat
  value: 1.0f
  mirror: always

- name: apz.fling_accel_supplemental_mult
  type: AtomicFloat
  value: 1.0f
  mirror: always

- name: apz.fling_accel_min_fling_velocity
  type: AtomicFloat
  value: 1.5f
  mirror: always

- name: apz.fling_accel_min_pan_velocity
  type: AtomicFloat
  value: 0.8f
  mirror: always

- name: apz.fling_accel_max_pause_interval_ms
  type: RelaxedAtomicInt32
  value: 50
  mirror: always

- name: apz.fling_curve_function_x1
  type: float
  value: 0.0f
  mirror: once

- name: apz.fling_curve_function_x2
  type: float
  value: 1.0f
  mirror: once

- name: apz.fling_curve_function_y1
  type: float
  value: 0.0f
  mirror: once

- name: apz.fling_curve_function_y2
  type: float
  value: 1.0f
  mirror: once

- name: apz.fling_curve_threshold_inches_per_ms
  type: AtomicFloat
  value: -1.0f
  mirror: always

- name: apz.fling_friction
  type: AtomicFloat
  value: 0.002f
  mirror: always

- name: apz.fling_min_velocity_threshold
  type: AtomicFloat
  value: 0.5f
  mirror: always

- name: apz.fling_stop_on_tap_threshold
  type: AtomicFloat
  value: 0.05f
  mirror: always

- name: apz.fling_stopped_threshold
  type: AtomicFloat
  value: 0.01f
  mirror: always

- name: apz.touch_acceleration_factor_x
  type: float
  value: 1.0f
  mirror: always

- name: apz.touch_acceleration_factor_y
  type: float
  value: 1.0f
  mirror: always

# new scrollbar code for desktop zooming
- name: apz.force_disable_desktop_zooming_scrollbars
  type: RelaxedAtomicBool
  value: false
  mirror: always

#ifdef MOZ_WIDGET_GTK
-   name: apz.gtk.kinetic_scroll.enabled
    type: RelaxedAtomicBool
    value: true
    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
#endif

- name: apz.keyboard.enabled
  type: bool
  value: @IS_NOT_ANDROID@
  mirror: once

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

- name: apz.max_tap_time
  type: RelaxedAtomicInt32
  value: 300
  mirror: always

- name: apz.max_velocity_inches_per_ms
  type: AtomicFloat
  value: -1.0f
  mirror: always

- name: apz.max_velocity_queue_size
  type: uint32_t
  value: 5
  mirror: once

- name: apz.min_skate_speed
  type: AtomicFloat
  value: 1.0f
  mirror: always

- name: apz.minimap.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: apz.mvm.force-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
#if defined(XP_MACOSX)
  value: true
#else
  value: false
#endif
  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

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

# Fetch displayport updates early from the message queue.
- name: apz.pinch_lock.mode
  type: RelaxedAtomicInt32
  value: 1
  mirror: always

- name: apz.pinch_lock.scroll_lock_threshold
  type: AtomicFloat
  value: 1.0f / 32.0f   # 1/32 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: 50   # milliseconds
  mirror: once

- name: apz.popups.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

- 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_start_tolerance
  type: AtomicFloat
  value: 0.1f
  mirror: always

- name: apz.velocity_bias
  type: AtomicFloat
  value: 0.0f
  mirror: always

- name: apz.velocity_relevance_time_ms
  type: RelaxedAtomicUint32
  value: 100
  mirror: always

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

- name: apz.windows.use_direct_manipulation
  type: RelaxedAtomicBool
  value: true
  mirror: always

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

- name: apz.x_skate_highmem_adjust
  type: AtomicFloat
  value: 0.0f
  mirror: always

- name: apz.x_skate_size_multiplier
  type: AtomicFloat
  value: 1.25f
  mirror: always

- name: apz.x_stationary_size_multiplier
  type: AtomicFloat
  value: 1.5f
  mirror: always

- name: apz.y_skate_highmem_adjust
  type: AtomicFloat
  value: 0.0f
  mirror: always

- name: apz.y_skate_size_multiplier
  type: AtomicFloat
#if defined(MOZ_WIDGET_ANDROID)
  value: 1.5f
#else
  value: 3.5f
#endif
  mirror: always

- name: apz.y_stationary_size_multiplier
  type: AtomicFloat
#if defined(MOZ_WIDGET_ANDROID)
  value: 1.5f
#else
  value: 3.5f
#endif
  mirror: always

- name: apz.zoom_animation_duration_ms
  type: RelaxedAtomicInt32
#if defined(MOZ_WIDGET_ANDROID)
  value: 250
#else
  value: 350
#endif
  mirror: always

- name: apz.scale_repaint_delay_ms
  type: RelaxedAtomicInt32
  value: 500
  mirror: always

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

#---------------------------------------------------------------------------
# Prefs starting with "browser."
#---------------------------------------------------------------------------

- name: browser.active_color
  type: String
  value: "#EE0000"
  mirror: never

- name: browser.anchor_color
  type: String
  value: "#0000EE"
  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.offline.enable
  type: bool
  value: @IS_NOT_EARLY_BETA_OR_EARLIER@
  mirror: always

- name: browser.cache.disk.enable
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: browser.cache.memory.enable
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Limit of recent metadata we keep in memory for faster access, in KB.
- name: browser.cache.disk.metadata_memory_limit
  type: RelaxedAtomicUint32
  value: 250   # 0.25 MB
  mirror: always

# Does the user want smart-sizing?
- name: browser.cache.disk.smart_size.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Disk cache capacity in kilobytes. It's used only when
# browser.cache.disk.smart_size.enabled == false
- name: browser.cache.disk.capacity
  type: RelaxedAtomicUint32
  value: 256000
  mirror: always

# -1 = determine dynamically, 0 = none, n = memory capacity in kilobytes.
- name: browser.cache.memory.capacity
  type: RelaxedAtomicInt32
  value: -1
  mirror: always

# When smartsizing is disabled we could potentially fill all disk space by
# cache data when the disk capacity is not set correctly. To avoid that we
# check the free space every time we write some data to the cache. The free
# space is checked against two limits. Once the soft limit is reached we start
# evicting the least useful entries, when we reach the hard limit writing to
# the entry fails.
- name: browser.cache.disk.free_space_soft_limit
  type: RelaxedAtomicUint32
  value: 5 * 1024   # 5MB
  mirror: always

- name: browser.cache.disk.free_space_hard_limit
  type: RelaxedAtomicUint32
  value: 1024    # 1MB
  mirror: always

# The number of chunks we preload ahead of read. One chunk currently has
# 256kB.
- name: browser.cache.disk.preload_chunk_count
  type: RelaxedAtomicUint32
  value: 4    # 1 MB of read ahead
  mirror: always

# Max-size (in KB) for entries in disk cache. Set to -1 for no limit.
# (Note: entries bigger than 1/8 of disk-cache are never cached)
- name: browser.cache.disk.max_entry_size
  type: RelaxedAtomicUint32
  value: 50 * 1024    # 50 MB
  mirror: always

# Max-size (in KB) for entries in memory cache. Set to -1 for no limit.
# (Note: entries bigger than than 90% of the mem-cache are never cached.)
- name: browser.cache.memory.max_entry_size
  type: RelaxedAtomicInt32
  value: 5 * 1024
  mirror: always

# Memory limit (in kB) for new cache data not yet written to disk. Writes to
# the cache are buffered and written to disk on background with low priority.
# With a slow persistent storage these buffers may grow when data is coming
# fast from the network. When the amount of unwritten data is exceeded, new
# writes will simply fail. We have two buckets, one for important data
# (priority) like html, css, fonts and js, and one for other data like images,
# video, etc.
# Note: 0 means no limit.
- name: browser.cache.disk.max_chunks_memory_usage
  type: RelaxedAtomicUint32
  value: 40 * 1024
  mirror: always
- name: browser.cache.disk.max_priority_chunks_memory_usage
  type: RelaxedAtomicUint32
  value: 40 * 1024
  mirror: always

# Number of seconds the cache spends writing pending data and closing files
# after shutdown has been signalled. Past that time data is not written and
# files are left open for the OS to clean up.
- name: browser.cache.max_shutdown_io_lag
  type: RelaxedAtomicUint32
  value: 2
  mirror: always

# 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

- name: browser.contentblocking.database.enabled
  type: bool
  value: false
  mirror: always

# How many recent block/unblock actions per origins we remember in the
# Content Blocking log for each top-level window.
- name: browser.contentblocking.originlog.length
  type: uint32_t
  value: 32
  mirror: always

- name: browser.display.background_color
  type: String
  value: "#FFFFFF"
  mirror: never

# 0 = always, except in high contrast mode
# 1 = always
# 2 = never
#
# Default to 0 on windows and mac, 1 elsewhere.
- name: browser.display.document_color_use
  type: RelaxedAtomicUint32
#if defined(XP_WIN) || defined(XP_MACOSX)
  value: 0
#else
  value: 1
#endif
  mirror: always
  rust: true

# 0 = always native
# 1 = never native
# other = default
- name: browser.display.windows.non_native_menus
  type: RelaxedAtomicUint32
  value: 2
  mirror: always
  rust: true

# This pref dictates whether or not backplates and background images
# are to be drawn, when in high-contrast mode:
#   false: do not draw backplates or render background images
#   true: render background images and draw backplates
# This condition is only considered when high-contrast mode is enabled
# in Firefox, ie. when the user has:
#   (1) mUseAccessibilityMode set to true (Widows high-contrast mode is on)
#       AND browser.display.document_color_use set to 0
#       (only with high-contrast themes) OR
#   (2) browser.display.document_color_use set to 2 (always)
- name: browser.display.permit_backplate
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# Whether we should suppress the background-image of the canvas (the root
# frame) if we're in forced colors mode.
#
# This is important because some sites use background-image with a plain color
# and it causes undesirable results in high-contrast mode.
#
# See bug 1614921 for example.
- name: browser.display.suppress_canvas_background_image_on_forced_colors
  type: bool
  value: true
  mirror: always

- name: browser.display.focus_ring_on_anything
  type: bool
  value: false
  mirror: always

- name: browser.display.focus_ring_width
  type: uint32_t
  value: 1
  mirror: always

- name: browser.display.focus_background_color
  type: String
  value: "#117722"
  mirror: never

# Focus ring border style.
# 0 = solid border, 1 = dotted border
- name: browser.display.focus_ring_style
  type: uint32_t
  value: 1
  mirror: always

- name: browser.display.focus_text_color
  type: String
  value: "#ffffff"
  mirror: never
- name: browser.display.foreground_color
  type: String
  value: "#000000"
  mirror: never

# 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

# 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

- name: browser.display.use_focus_colors
  type: bool
  value: false
  mirror: always

- name: browser.display.use_system_colors
  type: bool
  value: false
  mirror: always

- name: browser.dom.window.dump.enabled
  type: RelaxedAtomicBool
  value: @IS_NOT_MOZILLA_OFFICIAL@
  mirror: always

# See bug 1710926
- name: browser.download.improvements_to_download_panel
  type: bool
  value: false
  mirror: always

- name: browser.download.sanitize_non_media_extensions
  type: bool
  value: true
  mirror: always

# Image document's automatic image sizing.
- name: browser.enable_automatic_image_resizing
  type: bool
  value: true
  mirror: always

# Image document's click-to-resize.
- name: browser.enable_click_image_resizing
  type: bool
  value: @IS_NOT_ANDROID@
  mirror: always

# 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

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

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

# 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

# Controls @media -moz-toolbar-prefers-color-scheme.
#
# Returns whether the toolbar is dark (0), light (1), or system (2).
#
# Default to "system", the theming code sets it appropriately.
- name: browser.theme.toolbar-theme
  type: RelaxedAtomicUint32
  value: 2
  mirror: always
  rust: true

# Enable Proton restyle. Requires restart.
- name: browser.proton.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

- name: browser.proton.places-tooltip.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

# Password protection
- name: browser.safebrowsing.passwords.enabled
  type: bool
  value: false
  mirror: always

# Phishing protection
- name: browser.safebrowsing.phishing.enabled
  type: bool
  value: true
  mirror: always

# Maximum size for an array to store the safebrowsing prefixset.
- name: browser.safebrowsing.prefixset_max_array_size
  type: RelaxedAtomicUint32
  value: 512*1024
  mirror: always

# SessionStore prefs
# Maximum number of bytes of DOMSessionStorage data we collect per origin.
- name: browser.sessionstore.dom_storage_limit
  type: uint32_t
  value: 2048
  mirror: always

# Minimal interval between two save operations in milliseconds (while the user is active).
- name: browser.sessionstore.interval
  type: RelaxedAtomicUint32
  value: 15000
  mirror: always

# Causes SessionStore to ignore non-final update messages from
# browser tabs that were not caused by a flush from the parent.
# This is a testing flag and should not be used by end-users.
- name: browser.sessionstore.debug.no_auto_updates
  type: RelaxedAtomicBool
  value: false
  mirror: always

# If set, use DocumentChannel to directly initiate loads entirely
# from parent-process BrowsingContexts
- name: browser.tabs.documentchannel.parent-controlled
  type: bool
  value: false
  mirror: always

- name: browser.tabs.remote.desktopbehavior
  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
#if !defined(ANDROID)
  value: true
#else
  value: @IS_NIGHTLY_BUILD@
#endif
  mirror: always

# 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
#if !defined(ANDROID)
  value: true
#else
  value: @IS_NIGHTLY_BUILD@
#endif
  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

# 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
  value: @IS_NIGHTLY_BUILD@
  mirror: always

# When true, zooming will be enabled on all sites, even ones that declare
# user-scalable=no.
- name: browser.ui.zoom.force-user-scalable
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: browser.underline_anchors
  type: bool
  value: true
  mirror: always

- name: browser.viewport.desktopWidth
  type: RelaxedAtomicInt32
  value: 980
  mirror: always

- name: browser.visited_color
  type: String
  value: "#551A8B"
  mirror: never

#---------------------------------------------------------------------------
# Prefs starting with "canvas."
#---------------------------------------------------------------------------

# Limit for the canvas image cache. 0 means unlimited.
- name: canvas.image.cache.limit
  type: int32_t
  value: 0
  mirror: always

# Add support for canvas path objects
- name: canvas.path.enabled
  type: bool
  value: true
  mirror: always

- name: canvas.capturestream.enabled
  type: bool
  value: true
  mirror: always

# Is support for CanvasRenderingContext2D.filter enabled?
- name: canvas.filters.enabled
  type: bool
  value: true
  mirror: always

# Provide ability to turn on support for canvas focus rings.
- name: canvas.focusring.enabled
  type: bool
  value: true
  mirror: always

# Is support for CanvasRenderingContext2D's hitRegion APIs enabled?
- name: canvas.hitregions.enabled
  type: bool
  value: false
  mirror: always

# Is support for CanvasRenderingContext2D's createConicGradient API enabled?
- name: canvas.createConicGradient.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Provide ability to turn on support for canvas mozGetAsFile API.
- name: canvas.mozgetasfile.enabled
  type: bool
  value: false
  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

#---------------------------------------------------------------------------
# Prefs starting with "consoleservice."
#---------------------------------------------------------------------------

#if defined(ANDROID)
  # Disable sending console to logcat on release builds.
-   name: consoleservice.logcat
    type: RelaxedAtomicBool
    value: @IS_NOT_RELEASE_OR_BETA@
    mirror: always
#endif

#---------------------------------------------------------------------------
# Prefs starting with "content."
#---------------------------------------------------------------------------

- name: content.cors.disable
  type: bool
  value: false
  mirror: always

# Back off timer notification after count.
# -1 means never.
- name: content.notify.backoffcount
  type: int32_t
  value: -1
  mirror: always

# Notification interval in microseconds.
# The notification interval has a dramatic effect on how long it takes to
# initially display content for slow connections. The current value
# provides good incremental display of content without causing an increase
# in page load time. If this value is set below 1/10 of a second it starts
# to impact page load performance.
# See bugzilla bug 72138 for more info.
- name: content.notify.interval
  type: int32_t
  value: 120000
  mirror: always

# Do we notify based on time?
- name: content.notify.ontimer
  type: bool
  value: true
  mirror: always

# How many times to deflect in interactive mode.
- name: content.sink.interactive_deflect_count
  type: int32_t
  value: 0
  mirror: always

# How many times to deflect in perf mode.
- name: content.sink.perf_deflect_count
  type: int32_t
  value: 200
  mirror: always

# Parse mode for handling pending events.
# 0 = don't check for pending events
# 1 = don't deflect if there are pending events
# 2 = bail if there are pending events
- name: content.sink.pending_event_mode
  type: int32_t
# ifdef XP_WIN
  value: 1
# else
  value: 0
# endif
  mirror: always

# How often to probe for pending events. 1 = every token.
- name: content.sink.event_probe_rate
  type: int32_t
  value: 1
  mirror: always

# How long to stay off the event loop in interactive mode (microseconds).
- name: content.sink.interactive_parse_time
  type: int32_t
  value: 3000
  mirror: always

# How long to stay off the event loop in perf mode.
- name: content.sink.perf_parse_time
  type: int32_t
  value: 360000
  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 "datareporting."
#---------------------------------------------------------------------------

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

# Tells if DevTools have been explicitely enabled by the user. This pref
# allows to disable all features related to DevTools for users that never use
# them. Until bug 1361080 lands, we always consider them enabled.
- name: devtools.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

- 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

- name: devtools.toolbox.force-chrome-prefs
  type: RelaxedAtomicBool
  value: true
  mirror: always

#---------------------------------------------------------------------------
# Prefs starting with "docshell."
#---------------------------------------------------------------------------

# Used to indicate whether session history listeners should be notified
# about content viewer eviction. Used only for testing.
- name: docshell.shistory.testing.bfevict
  type: bool
  value: false
  mirror: always

# If true, pages with an opener won't be bfcached.
- name: docshell.shistory.bfcache.require_no_opener
  type: bool
  value: @IS_ANDROID@
  mirror: always

# If true, page with beforeunload or unload event listeners can be bfcached.
- name: docshell.shistory.bfcache.allow_unload_listeners
  type: bool
  value: @IS_ANDROID@
  mirror: always

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

# Whether window.mozPaintCount is exposed to the web.
- name: dom.mozPaintCount.enabled
  type: bool
  value: false
  mirror: always

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

- name: dom.allow_XUL_XBL_for_file
  type: bool
  value: false
  mirror: always

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

# Is support for automatically removing replaced filling animations enabled?
- name: dom.animations-api.autoremove.enabled
  type: bool
  value: true
  mirror: always

# Is support for composite operations from the Web Animations API enabled?
- name: dom.animations-api.compositing.enabled
  type: bool
  value: true
  mirror: always

# Is support for the core interfaces of Web Animations API enabled?
- name: dom.animations-api.core.enabled
  type: bool
  value: true
  mirror: always

# Is support for Document.getAnimations() and Element.getAnimations()
# supported?
- name: dom.animations-api.getAnimations.enabled
  type: bool
  value: true
  mirror: always

# Is support for animations from the Web Animations API without 0%/100%
# keyframes enabled?
- name: dom.animations-api.implicit-keyframes.enabled
  type: bool
  value: true
  mirror: always

# Is support for timelines from the Web Animations API enabled?
- name: dom.animations-api.timelines.enabled
  type: bool
  value: true
  mirror: always

# Synchronize transform animations with geometric animations on the
# main thread.
- name: dom.animations.mainthread-synchronization-with-geometric-animations
  type: bool
  value: @IS_NOT_NIGHTLY_BUILD@
  mirror: always

# Is support for AudioWorklet enabled?
- name: dom.audioworklet.enabled
  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: @IS_NIGHTLY_BUILD@
  mirror: always

# Block all downloads in iframes with the sandboxed attribute
- name: dom.block_download_in_sandboxed_iframes
  type: bool
  value: true
  mirror: always

# Block multiple window.open() per single event.
- name: dom.block_multiple_popups
  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: 20
  mirror: always

# Whether window.location.reload() and window.history.go(0) should be blocked
# if called directly from a window resize event handler.
#
# This used to be necessary long ago to prevent terrible UX when using stuff
# like TypeAheadFind (bug 258917), but it also causes compat issues on mobile
# (bug 1570566).
#
# So for now disable it on Android and Desktop Nightly, to see if we have any
# desktop regression before removing it completely. Note that this means that
# non-nightly RDM behaves different than Android in this case.
- name: dom.block_reload_from_resize_event_handler
  type: bool
#if defined(MOZ_WIDGET_ANDROID) || defined(NIGHTLY_BUILD)
  value: false
#else
  value: true
#endif
  mirror: always

# SW Cache API
- name: dom.caches.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: dom.caches.testing.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Disable capture attribute for input elements; only supported on GeckoView.
- name: dom.capture.enabled
  type: bool
  value: false
  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

# 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.
- name: dom.delay.block_external_protocol_in_iframes.enabled
  type: bool
  value: @IS_NOT_NIGHTLY_BUILD@
  mirror: always

# HTML <dialog> element
- name: dom.dialog_element.enabled
  type: bool
  value: @IS_NIGHTLY_BUILD@
  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

# If set this to true, `Document.execCommand` may be performed nestedly.
# Otherwise, nested calls just return false.
- name: dom.document.exec_command.nested_calls_allowed
  type: bool
  value: false
  mirror: always

- name: dom.enable_window_print
  type: bool
  value: @IS_NOT_ANDROID@
  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

- name: dom.element.transform-getters.enabled
  type: bool
  value: false
  mirror: always

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

# Is support for Performance.mozMemory enabled?
- name: dom.enable_memory_stats
  type: bool
  value: false
  mirror: always

# Enable Performance API
# Whether nonzero values can be returned from performance.timing.*
- name: dom.enable_performance
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Enable Performance Observer API
- name: dom.enable_performance_observer
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether resource timing will be gathered and returned by performance.GetEntries*
- name: dom.enable_resource_timing
  type: bool
  value: true
  mirror: always

# Whether event timing will be gathered and returned by performance observer*
- name: dom.enable_event_timing
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether performance.GetEntries* will contain an entry for the active document
- name: dom.enable_performance_navigation_timing
  type: bool
  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 touch event listeners are passive by default.
- name: dom.event.default_to_passive_touch_listeners
  type: bool
  value: true
  mirror: always

# Whether wheel listeners are passive by default.
- name: dom.event.default_to_passive_wheel_listeners
  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

# Whether WheelEvent should expose wheelDelta / wheelDeltaX / wheelDeltaY
- name: dom.event.wheelDelta.enabled
  type: bool
  value: true
  mirror: always

#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

# Enable clipboard readText() and writeText() by default
- name: dom.events.asyncClipboard
  type: bool
  value: true
  mirror: always

# Disable clipboard.read() by default
- name: dom.events.asyncClipboard.read
  type: bool
  value: false
  mirror: always

# Disable ClipboardItem and clipboard.write by default
- name: dom.events.asyncClipboard.clipboardItem
  type: bool
  value: false
  mirror: always

# 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

# 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

# Whether to expose test interfaces of various sorts
- name: dom.expose_test_interfaces
  type: bool
  value: false
  mirror: always

- name: dom.fetchObserver.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Allow the content process to create a File from a path. This is allowed just
# on parent process, on 'file' Content process, or for testing.
- name: dom.file.createInChild
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Support @autocomplete values for form autofill feature.
- name: dom.forms.autocomplete.formautofill
  type: bool
  value: false
  mirror: always

# 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

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

# W3C draft ImageCapture API
- name: dom.imagecapture.enabled
  type: bool
  value: false
  mirror: always

# <img loading="lazy">
#
# See https://github.com/whatwg/html/pull/3752
- name: dom.image-lazy-loading.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# The root margin for image lazy loading, defined as four (value, percentage)
# pairs.
- name: dom.image-lazy-loading.root-margin.top
  type: float
#if defined(EARLY_BETA_OR_EARLIER)
  value: 800
#else
  value: 300
#endif
  mirror: always

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

- name: dom.image-lazy-loading.root-margin.bottom
  type: float
#if defined(EARLY_BETA_OR_EARLIER)
  value: 800
#else
  value: 300
#endif
  mirror: always

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

- name: dom.image-lazy-loading.root-margin.left
  type: float
#if defined(EARLY_BETA_OR_EARLIER)
  value: 800
#else
  value: 300
#endif
  mirror: always

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

- name: dom.image-lazy-loading.root-margin.right
  type: float
#if defined(EARLY_BETA_OR_EARLIER)
  value: 800
#else
  value: 300
#endif
  mirror: always

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

# Enable passing the "storage" option to indexedDB.open.
- name: dom.indexedDB.storageOption.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Enable indexedDB in private browsing mode.
- name: dom.indexedDB.privateBrowsing.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: dom.input_events.beforeinput.enabled
  type: bool
  value: true
  mirror: always

# Whether innerWidth / innerHeight return rounded or fractional sizes.
#
# 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.rounded
  type: bool
  value: true
  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 we perform a more strict alignment with vsync for input events
- name: dom.input_events.strict_input_vsync_alignment
  type: bool
  value: true
  mirror: always

# Enable not moving the cursor to end when a text input or textarea has .value
# set to the value it already has.  By default, enabled.
- name: dom.input.skip_cursor_move_for_same_value_set
  type: bool
  value: true
  mirror: always

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

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

- name: dom.ipc.cancel_content_js_when_navigating
  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 MOZ_ENABLE_FORKSERVER
- name: dom.ipc.forkserver.enable
  type: bool
  value: false
  mirror: once
#endif

#ifdef MOZ_WIDGET_GTK
#
# Avoid the use of GTK in content processes if possible, by running
# them in headless mode, to conserve resources (e.g., connections to
# the X server).  See the usage in `ContentParent.cpp` for the full
# definition of "if possible".
#
# This does not affect sandbox policies; content processes may still
# dynamically connect to the display server for, e.g., WebGL.
- name: dom.ipc.avoid-gtk
  type: bool
  value: true
  mirror: always
#endif

# Whether or not to collect a paired minidump when force-killing a
# content process.
- name: dom.ipc.tabs.createKillHardCrashReports
  type: bool
  value: @IS_NOT_RELEASE_OR_BETA@
  mirror: once

# Allow Flash async drawing mode in 64-bit release builds.
- name: dom.ipc.plugins.asyncdrawing.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# How long we wait before unloading an idle plugin process.
- name: dom.ipc.plugins.unloadTimeoutSecs
  type: RelaxedAtomicUint32
  value: 30
  mirror: always

- name: dom.ipc.plugins.allow_dxgi_surface
  type: bool
  value: true
  mirror: always

# 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

- name: dom.ipc.tabs.disabled
  type: bool
  value: false
  mirror: always

# Process launch delay (in milliseconds).
- name: dom.ipc.processPrelaunch.delayMs
  type: uint32_t
# This number is fairly arbitrary ... the intention is to put off
# launching another app process until the last one has finished
# loading its content, to reduce CPU/memory/IO contention.
  value: 1000
  mirror: always

- name: dom.ipc.processPrelaunch.startupDelayMs
  type: uint32_t
# delay starting content processes for a short time after browser start
# to provide time for the UI to come up
  value: 1000
  mirror: always

# Process preallocation cache
# Only used in fission; in e10s we use 1 always
- name: dom.ipc.processPrelaunch.fission.number
  type: uint32_t
  value: 3
  mirror: always

# Limit preallocated processes below this memory size (in MB)
- name: dom.ipc.processPrelaunch.lowmem_mb
  type: uint32_t
  value: 4096
  mirror: always

- name: dom.ipc.processPriorityManager.enabled
  type: bool
  value: false
  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) && defined(NIGHTLY_BUILD)
  value: 3000
#else
  value: 0
#endif
  mirror: always

- name: dom.ipc.processPriorityManager.backgroundGracePeriodMS
  type: uint32_t
#if defined(MOZ_WIDGET_ANDROID) && defined(NIGHTLY_BUILD)
  value: 3000
#else
  value: 0
#endif
  mirror: always

# Is support for HTMLElement.autocapitalize enabled?
- name: dom.forms.autocapitalize
  type: bool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

# Support for input type=datetime-local.
- name: dom.forms.datetime-local
  type: bool
  value: @IS_ANDROID@
  mirror: always

# Support for input type=datetime-local widget. Disabled for now.
- name: dom.forms.datetime-local.widget
  type: bool
  value: false
  mirror: always

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

# Is support for HTMLElement.enterKeyHint enabled?
- name: dom.forms.enterkeyhint
  type: bool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

# Is support for HTMLElement.inputMode enabled?
- name: dom.forms.inputmode
  type: bool
#if defined(ANDROID)
  value: true
#else
  value: @IS_NOT_RELEASE_OR_BETA@
#endif
  mirror: always

# Enable Directory API. By default, disabled.
- name: dom.input.dirpicker
  type: bool
  value: false
  mirror: always

# Whether to allow or disallow web apps to cancel `beforeinput` events caused
# by MozEditableElement#setUserInput() which is used by autocomplete, autofill
# and password manager.
- name: dom.input_event.allow_to_cancel_set_user_input
  type: bool
  value: false
  mirror: always

# How long a content process can take before closing its IPC channel
# after shutdown is initiated.  If the process exceeds the timeout,
# we fear the worst and kill it.
- name: dom.ipc.tabs.shutdownTimeoutSecs
  type: RelaxedAtomicUint32
#if !defined(DEBUG) && !defined(MOZ_ASAN) && !defined(MOZ_VALGRIND) && !defined(MOZ_TSAN)
  value: 20
#else
  value: 0
#endif
  mirror: always

# Whether a native event loop should be used in the content process.
- name: dom.ipc.useNativeEventProcessing.content
  type: RelaxedAtomicBool
#if defined(XP_WIN) || defined(XP_MACOSX)
  value: false
#else
  value: true
#endif
  mirror: always

# If this is true, TextEventDispatcher dispatches keydown and keyup events
# even during composition (keypress events are never fired during composition
# even if this is true).
- name: dom.keyboardevent.dispatch_during_composition
  type: bool
  value: true
  mirror: always

# If this is true, keypress events for non-printable keys are dispatched only
# for event listeners of the system event group in web content.
- name: dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content
  type: bool
  value: true
  mirror: always

# If this is true, "keypress" event's keyCode value and charCode value always
# become same if the event is not created/initialized by JS.
- name: dom.keyboardevent.keypress.set_keycode_and_charcode_to_same_value
  type: bool
  value: true
  mirror: always

# Whether the Large-Allocation header is enabled.
- name: dom.largeAllocationHeader.enabled
  type: bool
  value: true
  mirror: always

- name: dom.largeAllocation.forceEnable
  type: bool
  value: false
  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

# This pref is used to enable/disable the `document.autoplayPolicy` API which
# returns a enum string which presents current autoplay policy and can change
# overtime based on user session activity.
- name: dom.media.autoplay.autoplay-policy-api
  type: bool
  value: false
  mirror: always

# Media Session API
- name: dom.media.mediasession.enabled
  type: bool
  value: true
  mirror: always

# Number of seconds of very quiet or silent audio before considering the audio
# inaudible.
- name: dom.media.silence_duration_for_audibility
  type: AtomicFloat
  value: 2.0f
  mirror: always

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

# Enable meta-viewport support in remote APZ-enabled frames.
- name: dom.meta-viewport.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Timeout clamp in ms for timeouts we clamp.
- name: dom.min_timeout_value
  type: RelaxedAtomicInt32
  value: 4
  mirror: always

# Timeout clamp in ms for background windows.
- name: dom.min_background_timeout_value
  type: int32_t
  value: 1000
  mirror: always

# Timeout clamp in ms for background windows when throttling isn't enabled.
- name: dom.min_background_timeout_value_without_budget_throttling
  type: int32_t
  value: 1000
  mirror: always

# Are missing-property use counters for certain DOM attributes enabled?
- name: dom.missing_prop_counters.enabled
  type: bool
  value: true
  mirror: always

# Is support for module scripts (<script type="module">) enabled for content?
- name: dom.moduleScripts.enabled
  type: bool
  value: true
  mirror: always

# Whether we disable triggering mutation events for changes to style
# attribute via CSSOM.
# 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.mutation-events.cssom.disabled
  type: bool
  value: true
  mirror: always

# Limit of location change caused by content scripts in a time span per
# BrowsingContext. This includes calls to History and Location APIs.
- name: dom.navigation.locationChangeRateLimit.count
  type: uint32_t
  value: 200
  mirror: always

# Time span in seconds for location change rate limit.
- name: dom.navigation.locationChangeRateLimit.timespan
  type: uint32_t
  value: 10
  mirror: always

# Network Information API
- name: dom.netinfo.enabled
  type: RelaxedAtomicBool
  value: @IS_ANDROID@
  mirror: always

# Whether we should open noopener links in a new process.
- name: dom.noopener.newprocess.enabled
  type: bool
  value: true
  mirror: always

# Whether we shouldn't show an error page for unknown protocols (and should
# show a console warning instead).
- name: dom.no_unknown_protocol_error.enabled
  type: bool
  value: true
  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

- name: dom.performance.children_results_ipc_timeout
  type: uint32_t
  value: 1000
  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.timeToDOMContentFlushed enabled?
- name: dom.performance.time_to_dom_content_flushed.enabled
  type: bool
  value: false
  mirror: always

# Is support for PerformanceTiming.timeToFirstInteractive enabled?
- name: dom.performance.time_to_first_interactive.enabled
  type: bool
  value: false
  mirror: always

# Is support for PerformanceTiming.timeToNonBlankPaint enabled?
- name: dom.performance.time_to_non_blank_paint.enabled
  type: bool
  value: false
  mirror: always

# Is support for Permissions.revoke enabled?
- name: dom.permissions.revoke.enable
  type: bool
  value: false
  mirror: always

# Is support for Element.requestPointerLock enabled?
# This is added for accessibility purpose. When user has no way to exit
# pointer lock (e.g. no keyboard available), they can use this pref to
# disable the Pointer Lock API altogether.
- name: dom.pointer-lock.enabled
  type: bool
  value: true
  mirror: always

# re-SAB: Whether to allow postMessage of a SharedArrayBuffer if various
# preconditions related to COOP and COEP are met
- name: dom.postMessage.sharedArrayBuffer.withCOOP_COEP
  type: bool
#if !defined(ANDROID)
  value: true
#else
  value: @IS_NIGHTLY_BUILD@
#endif
  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

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

# Should we try to load origin information from the cache?
# See bug 1563023 for more details.
- name: dom.quotaManager.loadQuotaFromCache
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Should we check build ID as part of the cache validation?
# When enabled, the cache is invalidated on any upgrade (or downgrade),
# ensuring that changes in how quota usage is calculated can't cause
# inconsistencies at the cost of a slower initialization. Currently, this
# should only be set to false in tests using a packaged profile that inherently
# includes a build id different from the building running the tests. In the
# future this may be set to false if we are confident that we have sufficiently
# thorough schema versioning.
- name: dom.quotaManager.caching.checkBuildId
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Preference that users can set to override temporary storage smart limit
# calculation.
- name: dom.quotaManager.temporaryStorage.fixedLimit
  type: RelaxedAtomicInt32
  value: -1
  mirror: always

# Preference that users can set to override temporary storage smart limit
# calculation.
- name: dom.quotaManager.temporaryStorage.chunkSize
  type: RelaxedAtomicUint32
  value: 10 * 1024
  mirror: always

# A pref that is used to enable testing features.
- name: dom.quotaManager.testing
  type: SequentiallyConsistentAtomicBool
  value: false
  mirror: always

#ifdef 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
  # TelemetryVFS.
-   name: dom.quotaManager.overrideXFullPathname
    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

# Reporting API.
- name: dom.reporting.enabled
  type: RelaxedAtomicBool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

- name: dom.reporting.testing.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: dom.reporting.featurePolicy.enabled
  type: RelaxedAtomicBool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

- name: dom.reporting.crash.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: dom.reporting.header.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# In seconds. The timeout to remove not-active report-to endpoints.
- name: dom.reporting.cleanup.timeout
  type: uint32_t
  value: 3600
  mirror: always

# Any X seconds the reports are dispatched to endpoints.
- name: dom.reporting.delivering.timeout
  type: uint32_t
  value: 5
  mirror: always

# How many times the delivering of a report should be tried.
- name: dom.reporting.delivering.maxFailures
  type: uint32_t
  value: 3
  mirror: always

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

# Enable requestIdleCallback API
- name: dom.requestIdleCallback.enabled
  type: bool
  value: true
  mirror: always

# Whether to enable the JavaScript start-up cache. This causes one of the first
# execution to record the bytecode of the JavaScript function used, and save it
# in the existing cache entry. On the following loads of the same script, the
# bytecode would be loaded from the cache instead of being generated once more.
- name: dom.script_loader.bytecode_cache.enabled
  type: bool
  value: true
  mirror: always

# Ignore the heuristics of the bytecode cache, and always record on the first
# visit. (used for testing purposes).

# Choose one strategy to use to decide when the bytecode should be encoded and
# saved. The following strategies are available right now:
#   * -2 : (reader mode) The bytecode cache would be read, but it would never
#          be saved.
#   * -1 : (eager mode) The bytecode would be saved as soon as the script is
#          seen for the first time, independently of the size or last access
#          time.
#   *  0 : (default) The bytecode would be saved in order to minimize the
#          page-load time.
#
# Other values might lead to experimental strategies. For more details, have a
# look at: ScriptLoader::ShouldCacheBytecode function.
- name: dom.script_loader.bytecode_cache.strategy
  type: int32_t
  value: 0
  mirror: always

# Force full parse on any external JS scripts that is being compiled off thread.
- name: dom.script_loader.full_parse
  type: bool
  value: false
  mirror: always

# Is support for decoding external (non-inline) classic or module DOM scripts
# (i.e. anything but workers) as UTF-8, then directly compiling without
# inflating to UTF-16, enabled?
- name: dom.script_loader.external_scripts.utf8_parsing.enabled
  type: bool
  value: true
  mirror: always

# Enable  speculative off main thread parsing of external scripts as
# soon as they are fetched.
- name: dom.script_loader.external_scripts.speculative_omt_parse.enabled
  type: bool
  value: true
  mirror: always

# Speculatively compile non parser inserted scripts
- name: dom.script_loader.external_scripts.speculate_non_parser_inserted.enabled
  type: bool
  value: false
  mirror: always

# Speculatively compile async scripts
- name: dom.script_loader.external_scripts.speculate_async.enabled
  type: bool
  value: false
  mirror: always

# Speculatively compile link preload scripts
- name: dom.script_loader.external_scripts.speculate_link_preload.enabled
  type: bool
  value: false
  mirror: always

- name: dom.securecontext.whitelist_onions
  type: bool
  value: false
  mirror: always

# This pref enables Sec-Fetch-* logic and causes corresponding
# request headers to be set.
- name: dom.security.secFetch.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# This pref enables the featurePolicy header support.
- name: dom.security.featurePolicy.header.enabled
  type: bool
  value: false
  mirror: always

- name: dom.security.featurePolicy.experimental.enabled
  type: bool
  value: false
  mirror: always

# Expose the 'featurePolicy' attribute in document and HTMLIFrameElement
- name: dom.security.featurePolicy.webidl.enabled
  type: bool
  value: false
  mirror: always

# Perform IPC based Principal vetting in ContentParent
- name: dom.security.enforceIPCBasedPrincipalVetting
  type: RelaxedAtomicBool
  value: true
  mirror: always

# For testing purposes only: Flipping this pref to true allows
# to skip the allowlist for about: pages and do not ship with a
# CSP and NS_ASSERT right away.
- name: dom.security.skip_about_page_csp_allowlist_and_assert
  type: RelaxedAtomicBool
  value: false
  mirror: always

# For testing purposes only: Flipping this pref to true allows
# to skip the assertion that every about page ships with a CSP.
- name: dom.security.skip_about_page_has_csp_assert
  type: RelaxedAtomicBool
  value: false
  mirror: always

# For testing purposes only: Flipping this pref to true allows
# to skip the assertion that HTML fragments (e.g. innerHTML) can
# not be used within chrome code or about: pages.
- name: dom.security.skip_html_fragment_assertion
  type: RelaxedAtomicBool
  value: false
  mirror: always

# For testing purposes only; Flipping this pref to true allows
# to skip the assertion that remote scripts can not be loaded
# in system privileged contexts.
- name: dom.security.skip_remote_script_assertion_in_system_priv_context
  type: RelaxedAtomicBool
  value: false
  mirror: always

# If true, all content requests will get upgraded to HTTPS://
# (some Firefox functionality requests, like OCSP will not be affected)
- name: dom.security.https_only_mode
  type: RelaxedAtomicBool
  value: false
  mirror: always

# If true, all content requests in Private Browsing Mode will get
# upgraded to HTTPS://. (If dom.security.https_only_mode is set
# to true then this pref has no effect)
- name: dom.security.https_only_mode_pbm
  type: RelaxedAtomicBool
  value: false
  mirror: always

# If true, sends http background request for top-level sites to
# counter long timeouts.
- name: dom.security.https_only_mode_send_http_background_request
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Time limit, in milliseconds, before sending the http background
# request for HTTPS-Only and HTTPS-First
- name: dom.security.https_only_fire_http_request_background_timer_ms
  type: RelaxedAtomicUint32
  value: 3000
  mirror: always

# If true, tries to break upgrade downgrade cycles where https-only tries
# to upgrad ethe connection, but the website tries to downgrade again.
- name: dom.security.https_only_mode_break_upgrade_downgrade_endless_loop
  type: RelaxedAtomicBool
  value: true
  mirror: always

# If true and HTTPS-only mode is enabled, requests
# to local IP addresses are also upgraded
- name: dom.security.https_only_mode.upgrade_local
  type: RelaxedAtomicBool
  value: false
  mirror: always

# If true and HTTPS-only mode is enabled, requests
# to .onion hosts are also upgraded
- name: dom.security.https_only_mode.upgrade_onion
  type: RelaxedAtomicBool
  value: false
  mirror: always

# WARNING: Don't ever update that pref manually! It is only used
# for telemetry purposes and allows to reason about retention of
# the pref dom.security.https_only_mode from above.
- name: dom.security.https_only_mode_ever_enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# WARNING: Don't ever update that pref manually! It is only used
# for telemetry purposes and allows to reason about retention of
# the pref dom.security.https_only_mode_pbm from above.
- name: dom.security.https_only_mode_ever_enabled_pbm
  type: RelaxedAtomicBool
  value: false
  mirror: always

# If true checks for secure www connections when https fails
# and gives the user suggestions on the error page
- name: dom.security.https_only_mode_error_page_user_suggestions
  type: RelaxedAtomicBool
  value: false
  mirror: always

# If true, top-level request will get upgraded to HTTPS and
# downgraded again if the request failed.
- name: dom.security.https_first
  type: RelaxedAtomicBool
  value: 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

- name: dom.security.unexpected_system_load_telemetry_enabled
  type: bool
  value: true
  mirror: always

# pref controls `Sanitizer` API being exposed
- name: dom.security.sanitizer.enabled
  type: bool
  value: false
  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: @IS_NIGHTLY_BUILD@
  mirror: always

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

- name: dom.arena_allocator.enabled
  type: bool
  value: true
  mirror: once

- name: dom.serviceWorkers.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: dom.serviceWorkers.navigationPreload.enabled
  type: RelaxedAtomicBool
  value: false
  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

- 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.workers.serialized-sab-access
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Whether automatic storage access granting heuristics should be turned on.
- name: dom.storage_access.auto_grants
  type: bool
  value: true
  mirror: always

- name: dom.storage_access.auto_grants.delayed
  type: bool
  value: true
  mirror: always

# Storage-access API.
- name: dom.storage_access.enabled
  type: bool
  value: false
  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

# Enable Storage API for all platforms except Android.
- name: dom.storageManager.enabled
  type: RelaxedAtomicBool
  value: @IS_NOT_ANDROID@
  mirror: always

# Should we abort LocalStorage requests when a sync message from parent is
# detected?
#
# LocalStorage is a synchronous API involving sync IPC from the child to the
# parent. Accessibility interfaces currently also involve different forms of
# synchronous parent-to-child communication. (See bug 1516136 comment 11 and
# comment 15.) Although LocalStorage NextGen no longer needs to consult the
# main thread, thereby eliminating the possibility of deadlock, the browser is
# very complex and so we have retained a fail-safe mechanism that will cause
# blocking LocalStorage operations to abort on synchronous IPC from the parent
# to the child.
#
# We are disabling this fail-safe mechanism because it is fundamentally visible
# to content when activated. When we abort the synchronous LocalStorage
# operation we throw an error which has the potential to break web content.
# This is not a hypothetical. In bug 1574569 content broke due to accessibility
# path aborting the LS call, but the LS call didn't need to abort because it
# was not at risk of deadlock.
#
# But we are retaining the preference in the event that regressions occur
# anywhere in the code-base that could cause a cascade that would result in
# deadlock. (There have been logic bugs in components that resulted in
# PBackground synchronously blocking in a way that could result in deadlock.)
# This allows us to re-enable the fail-safe with only a pref flip.
- name: dom.storage.abort_on_sync_parent_to_child_messages
  type: bool
  value: false
  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 LSNG (Next Generation Local Storage) is enabled.
# See bug 1517090 for enabling this on Nightly.
# See bug 1534736 for changing it to EARLY_BETA_OR_EARLIER.
# See bug 1539835 for enabling this unconditionally.
# See bug 1619948 for changing it back to EARLY_BETA_OR_EARLIER.
- name: dom.storage.next_gen
  type: RelaxedAtomicBool
  value: @IS_EARLY_BETA_OR_EARLIER@
  mirror: always
  do_not_use_directly: true

# Is support for Storage test APIs enabled?
- name: dom.storage.testing
  type: bool
  value: false
  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

- name: dom.testing.sync-content-blocking-notifications
  type: bool
  value: false
  mirror: always

- name: dom.textMetrics.actualBoundingBox.enabled
  type: bool
  value: true
  mirror: always

- name: dom.textMetrics.baselines.enabled
  type: bool
  value: false
  mirror: always

- name: dom.textMetrics.emHeight.enabled
  type: bool
  value: false
  mirror: always

- name: dom.textMetrics.fontBoundingBox.enabled
  type: bool
  value: false
  mirror: always

# Time (in ms) that it takes to regenerate 1ms.
- name: dom.timeout.background_budget_regeneration_rate
  type: int32_t
  value: 100
  mirror: always

# Time (in ms) that it takes to regenerate 1ms.
- name: dom.timeout.foreground_budget_regeneration_rate
  type: int32_t
  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: int32_t
  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: int32_t
  value: -1
  mirror: always

# The maximum amount a timeout can be delayed by budget throttling.
- name: dom.timeout.budget_throttling_max_delay
  type: int32_t
  value: 15000
  mirror: always

# Turn on budget throttling by default.
- name: dom.timeout.enable_budget_timer_throttling
  type: bool
  value: true
  mirror: always

# Should we defer timeouts and intervals while loading a page.  Released
# on Idle or when the page is loaded.
- name: dom.timeout.defer_during_load
  type: bool
  value: true
  mirror: always

# Maximum amount of time in milliseconds consecutive setTimeout()/setInterval()
# callback are allowed to run before yielding the event loop.
- name: dom.timeout.max_consecutive_callbacks_ms
  type: uint32_t
  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: int32_t
  value: 30000
  mirror: always

# UDPSocket API
- name: dom.udpsocket.enabled
  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 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: true
  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 Window.visualViewport enabled?
- name: dom.visualviewport.enabled
  type: bool
  value: true
  mirror: always

# Is support for WebVR APIs enabled?
# Enabled by default in beta and release for Windows and OS X and for all
# platforms in nightly and aurora.
- name: dom.vr.enabled
  type: RelaxedAtomicBool
#if defined(XP_WIN) || defined(XP_DARWIN) || !defined(RELEASE_OR_BETA)
  value: true
#else
  value: false
#endif
  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
# navigatior.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
# navigatior.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

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

-   name: dom.w3c_pointer_events.scroll_by_pen.enabled
    type: bool
    value: true
    mirror: always
#endif

# If the value is >= 0, it will be used for max touch points in child processes.
- name: dom.maxtouchpoints.testing.value
  type: int32_t
  value: -1
  mirror: always

# W3C pointer events draft.
- name: dom.w3c_pointer_events.implicit_capture
  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: @IS_NOT_ANDROID@
  mirror: always

# Is the 'assign' API for slot element enabled?
- name: dom.shadowdom.slot.assign.enabled
  type: bool
  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 support for form-associated custom element enabled?
- name: dom.webcomponents.formAssociatedCustomElement.enabled
  type: bool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

# Is support for the Web GPU API enabled?
- name: dom.webgpu.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

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

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

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

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

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

- name: dom.webnotifications.requireuserinteraction
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: dom.webnotifications.requireinteraction.enabled
  type: RelaxedAtomicBool
  value: @IS_NIGHTLY_BUILD@
  mirror: always

- name: dom.webnotifications.silent.enabled
  type: RelaxedAtomicBool
#if defined(MOZ_WIDGET_ANDROID)
  value: @IS_NIGHTLY_BUILD@
#else
  value: false
#endif
  mirror: always

- name: dom.webnotifications.vibrate.enabled
  type: RelaxedAtomicBool
#if defined(MOZ_WIDGET_ANDROID)
  value: @IS_NIGHTLY_BUILD@
#else
  value: false
#endif
  mirror: always

- name: dom.webnotifications.serviceworker.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Is support for Window.event enabled?
- name: dom.window.event.enabled
  type: bool
  value: true
  mirror: always

- name: dom.window.history.async
  type: bool
  value: true
  mirror: always

# Enable the "noreferrer" feature argument for window.open()
- name: dom.window.open.noreferrer.enabled
  type: bool
  value: true
  mirror: always

- name: dom.window.content.untrusted.enabled
  type: bool
  value: @IS_NOT_EARLY_BETA_OR_EARLIER@
  mirror: always

- name: dom.window.clientinformation.enabled
  type: bool
  value: true
  mirror: always

- name: dom.window.sidebar.enabled
  type: bool
  value: @IS_NOT_EARLY_BETA_OR_EARLIER@
  mirror: always

- name: dom.worker.canceling.timeoutMilliseconds
  type: RelaxedAtomicUint32
  value: 30000    # 30 seconds
  mirror: always

# Is support for compiling DOM worker scripts directly from UTF-8 (without ever
# inflating to UTF-16) enabled?
- name: dom.worker.script_loader.utf8_parsing.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: dom.worker.use_medium_high_event_queue
  type: RelaxedAtomicBool
  value: true
  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

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

# Enable content type normalization of XHR uploads via MIME Sniffing standard
- name: dom.xhr.standard_content_type_normalization
  type: RelaxedAtomicBool
  value: true
  mirror: always

# When this pref is set, parent documents may consider child iframes have
# loaded while they are still loading.
- name: dom.cross_origin_iframes_loaded_in_background
  type: bool
  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

- name: dom.webidl.crosscontext_hasinstance.enabled
  type: RelaxedAtomicBool
  value: @IS_NOT_NIGHTLY_BUILD@
  mirror: always

# WebShare API - exposes navigator.share()
- name: dom.webshare.enabled
  type: bool
  value: false
  mirror: always

# WebShare API - allows WebShare without user interaction (for tests only).
- name: dom.webshare.requireinteraction
  type: bool
  value: true
  mirror: always

# about:home and about:newtab include remote snippets that contain arbitrarily
# placed anchor tags in their content; we want sanitization to be turned off
# in order to render them correctly
- name: dom.about_newtab_sanitization.enabled
  type: bool
  value: false
  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

- 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

#---------------------------------------------------------------------------
# Prefs starting with "editor"
#---------------------------------------------------------------------------

# Allow or disallow to delete `<hr>` element when caret is at start of
# following line of the element.  If false, Backspace from start of following
# line of an `<hr>` element causes moving caret to immediatly after the `<hr>`
# element, and then, another Backspace can delete it.
- name: editor.hr_element.allow_to_delete_from_following_line
  type: bool
  value: false
  mirror: always

# 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

# 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

# Whether user pastes should be truncated.
- name: editor.truncate_user_pastes
  type: bool
  value: true
  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 enabling blink compatible white-space normalizer or keep using
# Gecko's traditional white-space normalizer.
- name: editor.white_space_normalization.blink_compatible
  type: bool
  value: false
  mirror: always

#---------------------------------------------------------------------------
# Prefs starting with "extensions."
#---------------------------------------------------------------------------

# Whether the background.service_worker in the extension manifest.json file
# is enabled.
- name: extensions.backgroundServiceWorker.enabled
  type: bool
  value: false
  mirror: once

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

# This pref governs whether we run webextensions in a separate process (true)
# or the parent/main process (false)
- name: extensions.webextensions.remote
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Whether to expose the MockExtensionAPI test interface in tests.
# The interface MockExtensionAPI doesn't represent a real extension API,
# it is only available in test and does include a series of cases useful
# to test the API request handling without tying the unit test to a
# specific WebExtensions API.
- name: extensions.webidl-api.expose_mock_interface
  type: RelaxedAtomicBool
  value: false
  mirror: always

#---------------------------------------------------------------------------
# Prefs starting with "findbar."
#---------------------------------------------------------------------------

- name: findbar.modalHighlight
  type: bool
  value: false
  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
# if fission is enabled by default.
- name: fission.autostart
  type: bool
  value: false
  mirror: never

# Prefs used by normandy to orchestrate the fission experiment. For more
# details, see the comments in nsAppRunner.cpp.
- name: fission.experiment.enrollmentStatus
  type: uint32_t
  value: 0
  mirror: never

- name: fission.experiment.startupEnrollmentStatus
  type: uint32_t
  value: 0
  mirror: never

# This pref has no effect within fission windows, it only controls the
# behaviour within non-fission windows. If true, preserve browsing contexts
# between process swaps.
- name: fission.preserve_browsing_contexts
  type: bool
  value: true
  mirror: always

# Store the session history in the parent process, and access it over IPC
# from the child processes.
- name: fission.sessionHistoryInParent
  type: bool
  value: false
  mirror: once
  do_not_use_directly: true

# If session history is stored in the parent process, enable bfcache for it.
- name: fission.bfcacheInParent
  type: bool
  value: true
  mirror: always
  do_not_use_directly: true

# Allow renaming of process names to the origin on nightly
# Setting this pref creates a privacy leak, but helps greatly with
# debugging
- name: fission.processOriginNames
  type: bool
  value: false
  mirror: always

# If true, allow process-switching documents loaded by <object> and <embed>
# elements into a remote process.
# NOTE: This pref has no impact outside of windows with the
# `useRemoteSubframes` flag set.
- name: fission.remoteObjectEmbed
  type: bool
  value: true
  mirror: always

# If true, show option for opening a non-Fission window in a menu, when Fission
# is enabled.
- name: fission.openNonFissionWindowOption
  type: bool
  value: false
  mirror: always

#---------------------------------------------------------------------------
# Prefs starting with "font."
#---------------------------------------------------------------------------

# A value greater than zero enables font size inflation for
# pan-and-zoom UIs, so that the fonts in a block are at least the size
# that, if a block's width is scaled to match the device's width, the
# fonts in the block are big enough that at most the pref value ems of
# text fit in *the width of the device*.
#
# When both this pref and the next are set, the larger inflation is used.
- name: font.size.inflation.emPerLine
  type: uint32_t
  value: 0
  mirror: always

# A value greater than zero enables font size inflation for
# pan-and-zoom UIs, so that if a block's width is scaled to match the
# device's width, the fonts in a block are at least the given font size.
# The value given is in twips, i.e., 1/20 of a point, or 1/1440 of an inch.
#
# When both this pref and the previous are set, the larger inflation is used.
- name: font.size.inflation.minTwips
  type: uint32_t
  value: 0
  mirror: always

# In products with multi-mode pan-and-zoom and non-pan-and-zoom UIs,
# this pref forces font inflation to always be enabled in all modes.
# That is, any heuristics used to detect pan-and-zoom
# vs. non-pan-and-zoom modes are disabled and all content is treated
# as pan-and-zoom mode wrt font inflation.
#
# This pref has no effect if font inflation is not enabled through
# either of the prefs above.  It has no meaning in single-mode UIs.
- name: font.size.inflation.forceEnabled
  type: bool
  value: false
  mirror: always

# In products with multi-mode pan-and-zoom and non-pan-and-zoom UIs,
# this pref disables font inflation in master-process contexts where
# existing heuristics can't be used determine enabled-ness.
#
# This pref has no effect if font inflation is not enabled through
# either of the prefs above.  The "forceEnabled" pref above overrides
# this pref.
- name: font.size.inflation.disabledInMasterProcess
  type: bool
  value: false
  mirror: always

# Defines the font size inflation mapping intercept parameter.
#
# Font size inflation computes a minimum font size, m, based on
# other preferences (see font.size.inflation.minTwips and
# font.size.inflation.emPerLine, above) and the width of the
# frame in which the text resides. Using this minimum, a specified
# font size, s, is mapped to an inflated font size, i, using an
# equation that varies depending on the value of the font size
# inflation mapping intercept parameter, P.
#
# If the intercept parameter is negative, then the following mapping
# function is used:
#
# i = m + s
#
# If the intercept parameter is non-negative, then the mapping function
# is a function such that its graph meets the graph of i = s at the
# point where both i and s are (1 + P/2) * m for values of s that are
# large enough. This means that when s=0, i is always equal to m.
- name: font.size.inflation.mappingIntercept
  type: int32_t
  value: 1
  mirror: always

# Since the goal of font size inflation is to avoid having to
# repeatedly scroll side to side to read a block of text, and there are
# a number of page layouts where a relatively small chunk of text is
# better off not being inflated according to the same algorithm we use
# for larger chunks of text, we want a threshold for an amount of text
# that triggers font size inflation.  This preference controls that
# threshold.
#
# It controls the threshold used within an *approximation* of the
# number of lines of text we use.  In particular, if we assume that
# each character (collapsing collapsible whitespace) has a width the
# same as the em-size of the font (when, normally, it's actually quite
# a bit smaller on average), this preference gives the percentage of a
# number of lines of text we'd need to trigger inflation.  This means
# that a percentage of 100 means that we'd need a number of characters
# (we know the font size and the width) equivalent to one line of
# square text (which is actually a lot less than a real line of text).
#
# A value of 0 means there's no character length threshold.
- name: font.size.inflation.lineThreshold
  type: uint32_t
  value: 400
  mirror: always

# This controls the percentage that fonts will be inflated, if font
# size inflation is enabled. Essentially, if we have a specified font
# size, s, and an inflated font size, i, this specifies that the ratio
# i/s * 100 should never exceed the value of this preference. In order
# for this preference to have any effect, its value must be greater
# than 100, since font inflation can never decrease the ratio i/s.
- name: font.size.inflation.maxRatio
  type: uint32_t
  value: 0
  mirror: always

# This setting corresponds to a global text zoom setting affecting
# all content that is not already subject to font size inflation.
# It is interpreted as a percentage value that is applied on top
# of the document's current text zoom setting.
#
# The resulting total zoom factor (text zoom * system font scale)
# will be limited by zoom.minPercent and maxPercent.
- name: font.size.systemFontScale
  type: uint32_t
  value: 100
  mirror: always

#---------------------------------------------------------------------------
# Prefs starting with "full-screen-api."
#---------------------------------------------------------------------------

- name: full-screen-api.enabled
  type: bool
  value: false
  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

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

-   name: fuzzing.necko.enabled
    type: RelaxedAtomicBool
    value: false
    mirror: always
#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: false
  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

#---------------------------------------------------------------------------
# Prefs starting with "gfx."
#---------------------------------------------------------------------------

- name: gfx.allow-texture-direct-mapping
  type: bool
  value: true
  mirror: once

# Allow 24-bit colour when the hardware supports it.
- name: gfx.android.rgb16.force
  type: bool
  value: false
  mirror: once

- name: gfx.apitrace.enabled
  type: bool
  value: false
  mirror: once

# Nb: we ignore this pref on release and beta.
- name: gfx.blocklist.all
  type: int32_t
  value: 0
  mirror: once

# 0x7fff is the maximum supported xlib surface size and is more than enough for canvases.
- name: gfx.canvas.max-size
  type: RelaxedAtomicInt32
  value: 0x7fff
  mirror: always

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

- 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
#if defined(XP_MACOSX) || defined(NIGHTLY_BUILD)
  value: true
#else
  value: false
#endif
  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.compositor.clearstate
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Whether GL contexts can be migrated to a different GPU (to match the one the
# OS is using for composition).
#
# 0 = force disable migration
# 1 = use migration where in safe configurations (the default)
# 2 = force enable migration (for testing)
- name: gfx.compositor.gpu-migration
  type: RelaxedAtomicInt32
  value: 1
  mirror: always

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

#if defined(MOZ_WIDGET_ANDROID)
  # Overrides the glClear color used when the surface origin is not (0, 0)
  # Used for drawing a border around the content.
-   name: gfx.compositor.override.clear-color.r
    type: AtomicFloat
    value: 0.0f
    mirror: always

-   name: gfx.compositor.override.clear-color.g
    type: AtomicFloat
    value: 0.0f
    mirror: always

-   name: gfx.compositor.override.clear-color.b
    type: AtomicFloat
    value: 0.0f
    mirror: always

-   name: gfx.compositor.override.clear-color.a
    type: AtomicFloat
    value: 0.0f
    mirror: always
#endif  # defined(MOZ_WIDGET_ANDROID)

- name: gfx.content.always-paint
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Size in megabytes
- name: gfx.content.skia-font-cache-size
  type: int32_t
  value: 5
  mirror: once

- name: gfx.device-reset.limit
  type: int32_t
  value: 10
  mirror: once

- name: gfx.device-reset.threshold-ms
  type: int32_t
  value: -1
  mirror: once


# Whether to disable the automatic detection and use of direct2d.
- name: gfx.direct2d.disabled
  type: bool
  value: false
  mirror: once

# Whether to attempt to enable Direct2D regardless of automatic detection or
# blacklisting.
- name: gfx.direct2d.force-enabled
  type: bool
  value: false
  mirror: once

# Whether to defer destruction of Direct2D DrawTargets to the paint thread
# when using OMTP.
- name: gfx.direct2d.destroy-dt-on-paintthread
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: gfx.direct3d11.reuse-decoder-device
  type: RelaxedAtomicInt32
  value: -1
  mirror: always

- 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

# 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 font sanitization is performed on the main thread or not.
- name: gfx.downloadable_fonts.sanitize_omt
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether to validate OpenType variation tables in fonts.
- name: gfx.downloadable_fonts.validate_variation_tables
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether OTS validation should be applied to OpenType Layout (OTL) tables.
- name: gfx.downloadable_fonts.otl_validation
  type: RelaxedAtomicBool
  value: @IS_NOT_RELEASE_OR_BETA@
  mirror: always

- name: gfx.draw-color-bars
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: gfx.e10s.hide-plugins-for-scroll
  type: bool
  value: true
  mirror: once

- name: gfx.e10s.font-list.shared
  type: bool
  value: true
  mirror: once

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

# 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: uint32_t
#if defined(XP_WIN)
  value: 60000
#else
  value: 8000
#endif
  mirror: once

# Disable antialiasing of Ahem, for use in tests.
- name: gfx.font_rendering.ahem_antialias_none
  type: RelaxedAtomicBool
  value: false
  mirror: always

#if defined(XP_MACOSX)
  # 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.opentype_svg.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

- name: gfx.font_rendering.fallback.async
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: gfx.basic_layer_manager.force_enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

#  Whether to enable LayerScope tool and default listening port.
- name: gfx.layerscope.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: gfx.layerscope.port
  type: RelaxedAtomicInt32
  value: 23456
  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

- name: gfx.logging.painted-pixel-count.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# 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)500000000
  mirror: once
  do_not_use_directly: true

# Use gfxPlatform::MaxTextureSize instead of the pref directly.
- name: gfx.max-texture-size
  type: int32_t
  value: (int32_t)32767
  mirror: once
  do_not_use_directly: true

- name: gfx.offscreencanvas.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: gfx.omta.background-color
  type: bool
  value: true
  mirror: always

- name: gfx.partialpresent.force
  type: RelaxedAtomicInt32
  value: 0
  mirror: always

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

- name: gfx.testing.device-fail
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: gfx.testing.device-reset
  type: RelaxedAtomicInt32
  value: 0
  mirror: always

- 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

# Disable surface sharing due to issues with compatible FBConfigs on
# NVIDIA drivers as described in bug 1193015.
- name: gfx.use-glx-texture-from-pixmap
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: gfx.use-iosurface-textures
  type: bool
  value: false
  mirror: once

- name: gfx.use-mutex-on-present
  type: bool
  value: false
  mirror: once

- name: gfx.use-ahardwarebuffer-content
  type: bool
  value: false
  mirror: once

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

- name: gfx.vsync.collect-scroll-transforms
  type: RelaxedAtomicBool
  value: false
  mirror: always

- 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

# We expose two prefs: gfx.webrender.all and gfx.webrender.enabled.
# The first enables WR+additional features, and the second just enables WR.
# For developer convenience, building with --enable-webrender=true or just
# --enable-webrender will set gfx.webrender.enabled to true by default.
#
# We also have a pref gfx.webrender.all.qualified which is not exposed via
# about:config. That pref enables WR but only on qualified hardware. This is
# the pref we'll eventually flip to deploy WebRender to the target population.
- name: gfx.webrender.all
  type: bool
  value: false
  mirror: once

- name: gfx.webrender.enabled
  type: bool
  value: false
  mirror: once
  do_not_use_directly: true

#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.blob-images
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: gfx.webrender.svg-images
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: gfx.webrender.blob.paint-flashing
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: gfx.webrender.enable-capture
  type: bool
  value: false
  mirror: once

- name: gfx.webrender.dl.dump-parent
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: gfx.webrender.dl.dump-content
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: gfx.webrender.dl.dump-content-serialized
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Also expose a pref to allow users to force-disable WR. This is exposed
# on all channels because WR can be enabled on qualified hardware on all
# channels.
- name: gfx.webrender.force-legacy-layers
  type: bool
  value: false
  mirror: once

#ifdef MOZ_WIDGET_GTK
- name: gfx.webrender.reject-software-driver
  type: bool
  value: true
  mirror: once
#endif

- name: gfx.webrender.highlight-painted-layers
  type: RelaxedAtomicBool
  value: false
  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.enable-multithreading
  type: bool
  value: true
  mirror: always

- name: gfx.webrender.batching.lookback
  type: uint32_t
  value: 10
  mirror: always

- name: gfx.webrender.compositor
  type: bool
#if defined(XP_WIN) || defined(XP_MACOSX)
  value: true
#else
  value: false
#endif
  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

- name: gfx.webrender.enable-gpu-markers
  type: bool
#ifdef DEBUG
  value: true
#else
  value: false
#endif
  mirror: once

- name: gfx.webrender.enable-item-cache
  type: bool
  value: true
  mirror: once

# Whether or not to fallback from WebRender/WebRender Software to Basic.
- name: gfx.webrender.fallback.basic
  type: bool
  value: false
  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
  # Whether or not to fallback from WebRender to Software WebRender + D3D11.
-   name: gfx.webrender.fallback.software-d3d11
    type: bool
    value: true
    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

- 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

#ifdef XP_MACOSX
- name: gfx.webrender.enable-client-storage
  type: bool
  value: true
  mirror: once
#endif

 # Width of WebRender tile size
- name: gfx.webrender.picture-tile-width
  type: RelaxedAtomicInt32
  value: 1024
  mirror: always

 # Width of WebRender tile size
- name: gfx.webrender.picture-tile-height
  type: RelaxedAtomicInt32
  value: 512
  mirror: always

# Whether to use EGL robustness or not.
- name: gfx.webrender.prefer-robustness
  type: bool
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
  value: true
#else
  value: false
#endif
  mirror: once

# Whether to use the WebRender software backend
- name: gfx.webrender.software
  type: bool
  value: false
  mirror: once

# Whether to use the D3D11 RenderCompositor when using WebRender software backend
- name: gfx.webrender.software.d3d11
  type: bool
  value: true
  mirror: once

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

- name: gfx.webrender.software.d3d11.upload-mode
  type: RelaxedAtomicInt32
  value: 4
  mirror: always

# Whether to allow widgets that don't support acceleration to use WebRender
# software backend
- name: gfx.webrender.software.unaccelerated-widget.allow
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether to force widgets to don't support acceleration to use WebRender
# despite that
- name: gfx.webrender.unaccelerated-widget.force
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Enable a lower quality, but higher performance pinch-zoom mode. Primarily
# for devices with weak GPUs, or when running SWGL.
- name: gfx.webrender.low-quality-pinch-zoom
  type: bool
#if defined(MOZ_WIDGET_ANDROID) && defined(NIGHTLY_BUILD)
  value: true
#else
  value: false
#endif
  mirror: once

# 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

#---------------------------------------------------------------------------
# Prefs starting with "gl." (OpenGL)
#---------------------------------------------------------------------------

- name: gl.allow-high-power
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: gl.ignore-dx-interop2-blacklist
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: gl.use-tls-is-current
  type: RelaxedAtomicInt32
  value: 0
  mirror: always

#---------------------------------------------------------------------------
# Prefs starting with "html5."
#---------------------------------------------------------------------------

# Turn HTML:inert on or off.
- name: html5.inert.enabled
  type: bool
  value: false
  mirror: always

# Toggle which thread the HTML5 parser uses for stream parsing.
- name: html5.offmainthread
  type: bool
  value: true
  mirror: always

# Time in milliseconds between the time a network buffer is seen and the timer
# firing when the timer hasn't fired previously in this parse in the
# off-the-main-thread HTML5 parser.
- name: html5.flushtimer.initialdelay
  type: RelaxedAtomicInt32
  value: 16
  mirror: always

# Time in milliseconds between the time a network buffer is seen and the timer
# firing when the timer has already fired previously in this parse.
- name: html5.flushtimer.subsequentdelay
  type: RelaxedAtomicInt32
  value: 16
  mirror: always

#---------------------------------------------------------------------------
# Prefs starting with "idle_period."
#---------------------------------------------------------------------------

- name: idle_period.min
  type: uint32_t
  value: 3
  mirror: always

- name: idle_period.during_page_load.min
  type: uint32_t
  value: 12
  mirror: always

- name: idle_period.cross_process_scheduling
  type: RelaxedAtomicBool
  value: true
  mirror: always

#---------------------------------------------------------------------------
# Prefs starting with "image."
#---------------------------------------------------------------------------

# The maximum size (in kB) that the aggregate frames of an animation can use
# before it starts to discard already displayed frames and redecode them as
# necessary.
- name: image.animated.decode-on-demand.threshold-kb
  type: RelaxedAtomicUint32
  value: 20*1024
  mirror: always

# The minimum number of frames we want to have buffered ahead of an
# animation's currently displayed frame.
- name: image.animated.decode-on-demand.batch-size
  type: RelaxedAtomicUint32
  value: 6
  mirror: always

# Whether we should recycle already displayed frames instead of discarding
# them. This saves on the allocation itself, and may be able to reuse the
# contents as well. Only applies if generating full frames.
- name: image.animated.decode-on-demand.recycle
  type: bool
  value: true
  mirror: once

# Resume an animated image from the last displayed frame rather than
# advancing when out of view.
- name: image.animated.resume-from-last-displayed
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Maximum number of surfaces for an image before entering "factor of 2" mode.
# This in addition to the number of "native" sizes of an image. A native size
# is a size for which we can decode a frame without up or downscaling. Most
# images only have 1, but some (i.e. ICOs) may have multiple frames for the
# same data at different sizes.
- name: image.cache.factor2.threshold-surfaces
  type: RelaxedAtomicInt32
  value: 4
  mirror: always

# Maximum size of a surface in KB we are willing to produce when rasterizing
# an SVG.
- name: image.cache.max-rasterized-svg-threshold-kb
  type: RelaxedAtomicInt32
  value: 200*1024
  mirror: always

# The maximum size, in bytes, of the decoded images we cache.
- name: image.cache.size
  type: int32_t
  value: 5*1024*1024
  mirror: once

# A weight, from 0-1000, to place on time when comparing to size.
# Size is given a weight of 1000 - timeweight.
- name: image.cache.timeweight
  type: int32_t
  value: 500
  mirror: once

# Decode all images automatically on load, ignoring our normal heuristics.
- name: image.decode-immediately.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Whether we attempt to downscale images during decoding.
- name: image.downscale-during-decode.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether we use EXIF metadata for image density.
- name: image.exif-density-correction.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether EXIF density metadata is sanity checked against PixelXDimension and PixelYDimension
- name: image.exif-density-correction.sanity-check.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# The threshold for inferring that changes to an <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

# Whether the heap should be used for frames from animated images. On Android,
# volatile memory keeps file handles open for each buffer.
- name: image.mem.animated.use_heap
  type: RelaxedAtomicBool
  value: @IS_ANDROID@
  mirror: always

# Enable extra information for debugging in the image memory reports.
- name: image.mem.debug-reporting
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Decodes images into shared memory to allow direct use in separate
# rendering processes. Only applicable with WebRender.
- name: image.mem.shared
  type: RelaxedAtomicBool
  value: true
  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

# Minimum buffer size in KB before using volatile memory over the heap.
- name: image.mem.volatile.min_threshold_kb
  type: RelaxedAtomicInt32
#if defined(ANDROID)
  # On Android, volatile memory keeps file handles open for each buffer.
  value: 100
#else
  value: -1
#endif
  mirror: always

# How long in ms before we should start shutting down idle decoder threads.
- name: image.multithreaded_decoding.idle_timeout
  type: int32_t
  value: 600000
  mirror: once

# How many threads we'll use for multithreaded decoding. If < 0, will be
# automatically determined based on the system's number of cores.
- name: image.multithreaded_decoding.limit
  type: int32_t
  value: -1
  mirror: once

# Whether we record SVG images as blobs or not.
- name: image.svg.blob-image
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Whether we attempt to decode WebP images or not.
- name: image.webp.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether we attempt to decode AVIF images or not.
- name: image.avif.enabled
  type: RelaxedAtomicBool
#if defined(MOZ_AV1)
  value: false
#else
  value: false
#endif
  mirror: always

# How strict we are in accepting/rejecting AVIF inputs according to whether they
# conform to the specification
# 0 = Permissive: accept whatever we can simply, unambiguously interpret
# 1 = Normal: reject violations of "shall" specification directives
# 2 = Strict: reject violations of "should" specification directives
- name: image.avif.compliance_strictness
  type: RelaxedAtomicInt32
  value: 1
  mirror: always

# Whether we apply container-level transforms like mirroring and rotation
- name: image.avif.apply_transforms
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether we use dav1d (true) or libaom (false) to decode AVIF image
- name: image.avif.use-dav1d
  type: RelaxedAtomicBool
  value: true
  mirror: always

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

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

# If true, dispatch the keydown and keyup events on any web apps even during
# composition.
- name: intl.ime.hack.on_any_apps.fire_key_events_for_composition
  type: bool
  value: @IS_ANDROID@
  mirror: always

# Android-specific pref to control if keydown and keyup events are fired even
# during composition.  Note that those prefs are ignored if
# dom.keyboardevent.dispatch_during_composition is false.
- name: intl.ime.hack.on_ime_unaware_apps.fire_key_events_for_composition
  type: bool
# If true and intl.ime.hack.on_any_apps.fire_key_events_for_composition is
# false, dispatch the keydown and keyup events only on IME-unaware web apps.
# So, this supports web apps which listen to only keydown or keyup events
# to get a change to do something at every text input.
  value: @IS_ANDROID@
  mirror: always

#ifdef XP_WIN
  # If true, automatically extend selection to cluster boundaries when
  # TSF/TIP requests to select from/by middle of a cluster.
-   name: intl.tsf.hack.extend_setting_selection_range_to_cluster_boundaries
    type: bool
    value: @IS_NOT_EARLY_BETA_OR_EARLIER@
    mirror: always
#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)
# 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

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

# Enable off-main-thread Warp compilation.
- name: javascript.options.ion.offthread_compilation
  type: bool
  value: true
  mirror: always  # LoadStartupJSPrefs
  do_not_use_directly: true

#ifdef DEBUG
  # Enable extra correctness checks in the JITs that are slow and only available
  # in debug builds.
-   name: javascript.options.jit.full_debug_checks
    type: bool
    value: false
    mirror: always  # LoadStartupJSPrefs
    do_not_use_directly: true
#endif

# Heuristic threshold for Warp/Ion to decide that too many bailouts are
# happening and an IonScript should be discarded.
#
# NOTE: This must match JitOptions defaults.
- name: javascript.options.ion.frequent_bailout_threshold
  type: int32_t
  value: 10
  mirror: always  # LoadStartupJSPrefs
  do_not_use_directly: true

# A threshold for Warp to decide whether a function can be inlined.
# If the size of a function is smaller than this threshold, then it
# may be inlined.
#
# NOTE: These must match JitOptions defaults.
- name: javascript.options.inlining_bytecode_max_length
  type: uint32_t
  value: 130
  mirror: always
  do_not_use_directly: true

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

# 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 better error message when accessing property of null or undefined.
- name: javascript.options.property_error_message_fix
  type: bool
  value: @IS_NIGHTLY_OR_DEV_EDITION@
  mirror: always

# Support for weak references in JavaScript (WeakRef and FinalizationRegistry).
- name: javascript.options.weakrefs
  type: bool
  value: true
  mirror: always

# Whether to expose the FinalizationRegistry.prototype.cleanupSome method.
- name: javascript.options.experimental.weakrefs.expose_cleanupSome
  type: bool
  value: false
  mirror: always

#ifdef NIGHTLY_BUILD
  # Experimental support for Iterator Helpers in JavaScript.
-   name: javascript.options.experimental.iterator_helpers
    type: bool
    value: false
    mirror: always

# Experimental support for class static blocks in JavaScript.
-   name: javascript.options.experimental.class_static_blocks
    type: bool
    value: false
    mirror: always
#endif  // NIGHTLY_BUILD

  # Support for Private Fields in JavaScript.
- name: javascript.options.experimental.private_fields
  type: bool
  value: true
  mirror: always

  # Experimental support for Private Methods in JavaScript.
- name: javascript.options.experimental.private_methods
  type: bool
  value: true
  mirror: always

  # Experimental support for the ergonomic brand check proposal.
- name: javascript.options.experimental.ergonomic_brand_checks
  type: bool
  value: true
  mirror: always

  # Experimental support for Top-level Await in JavaScript.
-   name: javascript.options.experimental.top_level_await
    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: 100
  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, since we do one in the
  # mobile browser (bug 669346).
  # XXX: this value possibly should be changed, or the pref removed entirely.
  #      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

# Streams API.
- name: javascript.options.streams
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Writable Streams API.  (The pref above must also be set to expose this.)
#
# Writable streams are still EXTRAORDINARILY BETA and it is well-known that
# things are likely pretty broken if you poke much at all, so if you flip this
# preference, don't report bugs against it just yet.
- name: javascript.options.writable_streams
  type: RelaxedAtomicBool
  value: false
  mirror: always

- 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_optimizingjit
  type: bool
  value: true
  mirror: always

#if defined(ENABLE_WASM_SIMD)
-   name: javascript.options.wasm_simd
    type: bool
    value: true
    mirror: always
#endif  // defined(ENABLE_WASM_SIMD)

#if defined(ENABLE_WASM_RELAXED_SIMD)
-   name: javascript.options.wasm_relaxed_simd
    type: bool
    value: false
    mirror: always
#endif  // defined(ENABLE_WASM_RELAXED_SIMD)

#if defined(ENABLE_WASM_EXTENDED_CONST)
-   name: javascript.options.wasm_extended_const
    type: bool
    value: @IS_NIGHTLY_BUILD@
    mirror: always
#endif  // defined(ENABLE_WASM_EXTENDED_CONST)

#if defined(ENABLE_WASM_EXCEPTIONS)
-   name: javascript.options.wasm_exceptions
    type: bool
    value: false
    mirror: always
#endif // defined(ENABLE_WASM_EXCEPTIONS)

#if defined(ENABLE_WASM_FUNCTION_REFERENCES)
-   name: javascript.options.wasm_function_references
    type: bool
    value: false
    mirror: always
#endif // defined(ENABLE_WASM_FUNCTION_REFERENCES)

#if defined(ENABLE_WASM_GC)
-   name: javascript.options.wasm_gc
    type: bool
    value: false
    mirror: always
#endif // defined(ENABLE_WASM_GC)

#if defined(ENABLE_WASM_SIMD_WORMHOLE) && defined(EARLY_BETA_OR_EARLIER)
  # This is x64-only and it would break unified macOS builds if
  # it were in all.js.  The feature rides the trains but not the
  # pref to control it; in late beta and release, it is only
  # available to privileged content.
-   name: javascript.options.wasm_simd_wormhole
    type: bool
    value: false
    mirror: always
#endif

#if defined(ENABLE_WASM_MEMORY64)
-   name: javascript.options.wasm_memory64
    type: bool
    value: true
    mirror: always
#endif  // defined(ENABLE_WASM_MEMORY64)

# Support for ArrayBuffers larger than 2 GB on 64-bit systems
- name: javascript.options.large_arraybuffers
  type: bool
  value: true
  mirror: always  # LoadStartupJSPrefs
  do_not_use_directly: true

# Support for pretenuring allocations based on their allocation site.
- name: javascript.options.site_based_pretenuring
  type: bool
  value: true
  mirror: always  # LoadStartupJSPrefs
  do_not_use_directly: true

#if !defined(JS_CODEGEN_MIPS32) && !defined(JS_CODEGEN_MIPS64)
  # Spectre security vulnerability mitigations for the JS JITs.
  #
  # NOTE: The MIPS 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: true
    mirror: always  # LoadStartupJSPrefs
    do_not_use_directly: true
#endif  // !defined(JS_CODEGEN_MIPSXX)

# 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

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

- name: layers.acceleration.draw-fps
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: layers.acceleration.draw-fps.print-histogram
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: layers.acceleration.draw-fps.write-to-file
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Whether to force acceleration on, ignoring blacklists.

# bug 838603 -- on Android, accidentally blacklisting OpenGL layers
# means a startup crash for everyone.
# Temporarily force-enable GL compositing.  This is default-disabled
# deep within the bowels of the widgetry system.  Remove me when GL
# compositing isn't default disabled in widget/android.
- name: layers.acceleration.force-enabled
  type: bool
  value: @IS_ANDROID@
  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

# Preference that when switched at runtime will run a series of benchmarks
# and output the result to stderr.
- name: layers.bench.enabled
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: layers.bufferrotation.enabled
  type: bool
  value: true
  mirror: once

- name: layers.child-process-shutdown
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: layers.componentalpha.enabled
  type: bool
#ifdef MOZ_GFX_OPTIMIZE_MOBILE
  # Nb: we ignore this pref if MOZ_GFX_OPTIMIZE_MOBILE is defined, as if this
  # pref was always false. But we go to the effort of setting it to false so
  # that telemetry's reporting of the pref value is more likely to reflect what
  # the code is doing.
  value: false
#else
  value: true
#endif
  mirror: once
  do_not_use_directly: true

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

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

# Enable DEAA antialiasing for transformed layers in the compositor.
- name: layers.deaa.enabled
  type: RelaxedAtomicBool
#if defined(MOZ_WIDGET_ANDROID)
  value: false
#else
  value: true
#endif
  mirror: always

- name: layers.draw-bigimage-borders
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: layers.draw-borders
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: layers.draw-tile-borders
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: layers.draw-layer-info
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: layers.dump
  type: RelaxedAtomicBool
  value: false
  mirror: always

# If we're dumping layers, also dump the texture data
- name: layers.dump-texture
  type: RelaxedAtomicBool
  value: false
  mirror: always

#ifdef MOZ_DUMP_PAINTING
-   name: layers.dump-decision
    type: RelaxedAtomicBool
    value: false
    mirror: always
#endif

- name: layers.dump-client-layers
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: layers.dump-host-layers
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: layers.compositing-tiles.width
  type: RelaxedAtomicInt32
  value: 1024
  mirror: always

- name: layers.compositing-tiles.height
  type: RelaxedAtomicInt32
  value: 1024
  mirror: always

# 0 is "no change" for contrast, positive values increase it, negative values
# decrease it until we hit mid gray at -1 contrast, after that it gets weird.
- name: layers.effect.contrast
  type: AtomicFloat
  value: 0.0f
  mirror: always

- name: layers.effect.grayscale
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: layers.effect.invert
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: layers.enable-tiles
  type: bool
#if defined(XP_MACOSX) || defined (XP_OPENBSD)
  value: true
#else
  value: false
#endif
  mirror: once

- name: layers.enable-tiles-if-skia-pomtp
  type: bool
#if defined(XP_WIN)
  value: true
#else
  value: false
#endif
  mirror: once

- name: layers.flash-borders
  type: RelaxedAtomicBool
  value: false
  mirror: always

# Force all possible layers to be always active layers.
- name: layers.force-active
  type: bool
  value: false
  mirror: always

- name: layers.force-shmem-tiles
  type: bool
  value: false
  mirror: once

- name: layers.draw-mask-debug
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: layers.force-synchronous-resize
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether to enable arbitrary layer geometry for OpenGL compositor.
- name: layers.geometry.opengl.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# Whether to enable arbitrary layer geometry for Basic compositor.
- name: layers.geometry.basic.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

 # Whether to enable arbitrary layer geometry for DirectX compositor.
- name: layers.geometry.d3d11.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: layers.gpu-process.allow-software
  type: bool
#if defined(XP_WIN)
  value: true
#else
  value: false
#endif
  mirror: once

- name: layers.gpu-process.enabled
  type: bool
#if defined(XP_WIN)
  value: true
#else
  value: false
#endif
  mirror: once

- name: layers.gpu-process.force-enabled
  type: bool
  value: false
  mirror: once

- name: layers.gpu-process.ipc_reply_timeout_ms
  type: int32_t
  value: 10000
  mirror: once

# How many unstable GPU process restarts we allow for a given configuration.
- name: layers.gpu-process.max_restarts
  type: RelaxedAtomicInt32
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
  #if defined(NIGHTLY_BUILD)
  value: 6
  #else
  value: 3
  #endif
#else
  value: 1
#endif
  mirror: always

# How many frames we must render before declaring the GPU process stable, and
# allow restarts without it counting against our maximum restarts.
- name: layers.gpu-process.stable.frame-threshold
  type: RelaxedAtomicUint32
  value: 10
  mirror: always

# How many milliseconds the GPU process must have lived before we accept that
# it is stable, and allow restarts without it counting against our maximum
# restarts.
- name: layers.gpu-process.stable.min-uptime-ms
  type: RelaxedAtomicInt32
  value: 4 * 60000
  mirror: always

# Note: This pref will only be used if it is less than layers.gpu-process.max_restarts.
- name: layers.gpu-process.max_restarts_with_decoder
  type: RelaxedAtomicInt32
  value: 0
  mirror: always

- name: layers.gpu-process.startup_timeout_ms
  type: int32_t
  value: 5000
  mirror: once

- name: layers.gpu-process.crash-also-crashes-browser
  type: bool
  value: false
  mirror: always

- name: layers.low-precision-buffer
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: layers.low-precision-opacity
  type: AtomicFloat
  value: 1.0f
  mirror: always

- name: layers.low-precision-resolution
  type: AtomicFloat
  value: 0.25f
  mirror: always

# Max number of layers per container. See Overwrite in mobile prefs.
- name: layers.max-active
  type: RelaxedAtomicInt32
  value: -1
  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

- name: layers.omtp.capture-limit
  type: uint32_t
  value: 25 * 1024 * 1024
  mirror: once

- name: layers.omtp.dump-capture
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: layers.omtp.paint-workers
  type: int32_t
  value: -1
  mirror: once

- name: layers.omtp.release-capture-on-main-thread
  type: RelaxedAtomicBool
  value: false
  mirror: always

- name: layers.orientation.sync.timeout
  type: RelaxedAtomicUint32
  value: (uint32_t)0
  mirror: always

#ifdef XP_WIN
-   name: layers.prefer-opengl
    type: bool
    value: false
    mirror: once
#endif

- name: layers.progressive-paint
  type: RelaxedAtomicBool
  value: false
  mirror: always
  do_not_use_directly: true

# Copy-on-write canvas.
- name: layers.shared-buffer-provider.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

- name: layers.single-tile.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always

# We allow for configurable and rectangular tile size to avoid wasting memory
# on devices whose screen size does not align nicely to the default tile size.
# Although layers can be any size, they are often the same size as the screen,
# especially for width.
- name: layers.tile-width
  type: int32_t
  value: 512
  mirror: once

- name: layers.tile-height
  type: int32_t
  value: 512
  mirror: once

- name: layers.tile-initial-pool-size
  type: uint32_t
  value: (uint32_t)50
  mirror: once

- name: layers.tile-pool-unused-size
  type: uint32_t
  value: (uint32_t)10
  mirror: once

- name: layers.tile-pool-shrink-timeout
  type: uint32_t
  value: (uint32_t)50
  mirror: once

- name: layers.tile-pool-clear-timeout
  type: uint32_t
  value: (uint32_t)5000
  mirror: once

# If this is set the tile size will only be treated as a suggestion.
# On B2G we will round this to the stride of the underlying allocation.
# On any platform we may later use the screen size and ignore
# tile-width/tile-height entirely. Its recommended to turn this off
# if you change the tile size.
- name: layers.tiles.adjust
  type: bool
  value: true
  mirror: once

- name: <