Bug 1843527 - Move abs() function behind a pref. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D183574
This commit is contained in:
Tiaan Louw 2023-07-14 11:29:55 +00:00
Родитель 1e731ab03c
Коммит 86ae06a010
2 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -8235,6 +8235,13 @@
mirror: always
rust: true
# Whether sign/abs functions are enabled in calc().
- name: layout.css.abs-sign.enabled
type: RelaxedAtomicBool
value: @IS_NIGHTLY_BUILD@
mirror: always
rust: true
# Whether infinity / nan constants are enabled in calc().
- name: layout.css.nan-inf.enabled
type: RelaxedAtomicBool

Просмотреть файл

@ -968,6 +968,8 @@ impl CalcNode {
static_prefs::pref!("layout.css.mod-rem.enabled")
} else if matches!(function, Pow | Sqrt | Hypot | Log | Exp) {
static_prefs::pref!("layout.css.exp.enabled")
} else if matches!(function, Abs) {
static_prefs::pref!("layout.css.abs-sign.enabled")
} else {
true
};