From b54c1ff38dbeda700d17a8a96152eebef3c54e60 Mon Sep 17 00:00:00 2001 From: roytam1 Date: Wed, 7 Jan 2026 23:38:06 +0800 Subject: [PATCH] ported from UXP: Issue #1791 - Part 1: Un-prefix `-moz-appearance` (a266b985) --- layout/style/nsCSSPropAliasList.h | 6 +++++- layout/style/nsCSSPropList.h | 6 +++--- layout/style/nsComputedDOMStylePropertyList.h | 2 +- modules/libpref/init/all.js | 1 + 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/layout/style/nsCSSPropAliasList.h b/layout/style/nsCSSPropAliasList.h index 80ed00c5f..606955943 100644 --- a/layout/style/nsCSSPropAliasList.h +++ b/layout/style/nsCSSPropAliasList.h @@ -251,6 +251,10 @@ CSS_PROP_ALIAS(-moz-tab-size, tab_size, MozTabSize, "") +CSS_PROP_ALIAS(-moz-appearance, + appearance, + MozAppearance, + "layout.css.prefixes.appearance") CSS_PROP_ALIAS(-moz-user-select, user_select, @@ -298,7 +302,7 @@ CSS_PROP_ALIAS(-webkit-animation-timing-function, WEBKIT_PREFIX_PREF) CSS_PROP_ALIAS(-webkit-appearance, - _moz_appearance, + appearance, WebkitAppearance, WEBKIT_PREFIX_PREF) diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index 5306462e2..d706dfd07 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -461,9 +461,9 @@ CSS_PROP_DISPLAY( CSS_PROP_NO_OFFSET, eStyleAnimType_None) CSS_PROP_DISPLAY( - -moz-appearance, - _moz_appearance, - CSS_PROP_DOMPROP_PREFIXED(Appearance), + appearance, + appearance, + Appearance, CSS_PROPERTY_PARSE_VALUE, "", VARIANT_HK, diff --git a/layout/style/nsComputedDOMStylePropertyList.h b/layout/style/nsComputedDOMStylePropertyList.h index dab7b3814..4de04a87c 100644 --- a/layout/style/nsComputedDOMStylePropertyList.h +++ b/layout/style/nsComputedDOMStylePropertyList.h @@ -276,7 +276,7 @@ COMPUTED_STYLE_PROP(z_index, ZIndex) * Implementations of -moz- styles * \* ******************************* */ -COMPUTED_STYLE_PROP(_moz_appearance, Appearance) +COMPUTED_STYLE_PROP(appearance, Appearance) COMPUTED_STYLE_PROP(_moz_binding, Binding) COMPUTED_STYLE_PROP(_moz_border_bottom_colors, BorderBottomColors) COMPUTED_STYLE_PROP(_moz_border_left_colors, BorderLeftColors) diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 56c7a06b4..ec5bdbdd3 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -2708,6 +2708,7 @@ pref("layout.css.prefixes.animations", true); pref("layout.css.prefixes.box-sizing", true); pref("layout.css.prefixes.font-features", true); pref("layout.css.prefixes.gradients", true); +pref("layout.css.prefixes.appearance", true); // Are webkit-prefixed properties & property-values supported? pref("layout.css.prefixes.webkit", true);