From 6785ffea7bda860d2e498f0455e284e2ebe1882e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 27 May 2023 15:02:42 +0200 Subject: [PATCH] style: Unprefix -moz-fit-content I'm not aware of any reason we shouldn't do this, as it is interoperable with other browsers, and it causes compat issues from sites that forget to use the prefixed version. Note this removes some #[parse(aliases)]. These only affect devtools autocomplete behavior, and we avoid autocompleting -moz-prefixed keywords when possible, so even though it's a slight behavior change, it's worth it. Differential Revision: https://phabricator.services.mozilla.com/D126718 --- components/style/values/computed/length.rs | 2 +- components/style/values/generics/length.rs | 6 ++---- components/style/values/specified/length.rs | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/components/style/values/computed/length.rs b/components/style/values/computed/length.rs index 3c4f7a2dbdc..02b42b48241 100644 --- a/components/style/values/computed/length.rs +++ b/components/style/values/computed/length.rs @@ -189,7 +189,7 @@ impl Size { #[cfg(feature = "gecko")] GenericSize::MinContent | GenericSize::MaxContent | - GenericSize::MozFitContent | + GenericSize::FitContent | GenericSize::MozAvailable | GenericSize::FitContentFunction(_) => false } diff --git a/components/style/values/generics/length.rs b/components/style/values/generics/length.rs index dfb3504e3cf..8d2596fffae 100644 --- a/components/style/values/generics/length.rs +++ b/components/style/values/generics/length.rs @@ -157,7 +157,7 @@ pub enum GenericSize { MinContent, #[cfg(feature = "gecko")] #[animation(error)] - MozFitContent, + FitContent, #[cfg(feature = "gecko")] #[animation(error)] MozAvailable, @@ -207,15 +207,13 @@ pub enum GenericMaxSize { None, #[cfg(feature = "gecko")] #[animation(error)] - #[parse(aliases = "-moz-max-content")] MaxContent, #[cfg(feature = "gecko")] #[animation(error)] - #[parse(aliases = "-moz-min-content")] MinContent, #[cfg(feature = "gecko")] #[animation(error)] - MozFitContent, + FitContent, #[cfg(feature = "gecko")] #[animation(error)] MozAvailable, diff --git a/components/style/values/specified/length.rs b/components/style/values/specified/length.rs index e73a9ddfde0..6105155d81d 100644 --- a/components/style/values/specified/length.rs +++ b/components/style/values/specified/length.rs @@ -1235,7 +1235,7 @@ macro_rules! parse_size_non_length { #[cfg(feature = "gecko")] "max-content" | "-moz-max-content" => $size::MaxContent, #[cfg(feature = "gecko")] - "-moz-fit-content" => $size::MozFitContent, + "fit-content" | "-moz-fit-content" => $size::FitContent, #[cfg(feature = "gecko")] "-moz-available" => $size::MozAvailable, $auto_or_none => $size::$auto_or_none_ident,