From 48db30f6e28d4b90d80fbf065d6bf7fa1d579fbd Mon Sep 17 00:00:00 2001 From: Pierre TALLOTTE Date: Fri, 12 Feb 2021 15:45:48 +0000 Subject: [PATCH] style: Hide non-standard values of caption-side. Differential Revision: https://phabricator.services.mozilla.com/D104321 --- components/style/values/specified/table.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/components/style/values/specified/table.rs b/components/style/values/specified/table.rs index cd2bfa96c5d..79136b12ca1 100644 --- a/components/style/values/specified/table.rs +++ b/components/style/values/specified/table.rs @@ -4,6 +4,8 @@ //! Specified types for CSS values related to tables. +use crate::parser::ParserContext; + /// Specified values for the `caption-side` property. /// /// Note that despite having "physical" names, these are actually interpreted @@ -12,6 +14,11 @@ /// line-start and -end. /// /// https://drafts.csswg.org/css-tables/#propdef-caption-side +#[cfg(feature = "gecko")] +fn caption_side_non_standard_enabled(_context: &ParserContext) -> bool { + static_prefs::pref!("layout.css.caption-side-non-standard.enabled") +} + #[allow(missing_docs)] #[derive( Clone, @@ -35,11 +42,15 @@ pub enum CaptionSide { Top, Bottom, #[cfg(feature = "gecko")] + #[parse(condition = "caption_side_non_standard_enabled")] Right, #[cfg(feature = "gecko")] + #[parse(condition = "caption_side_non_standard_enabled")] Left, #[cfg(feature = "gecko")] + #[parse(condition = "caption_side_non_standard_enabled")] TopOutside, #[cfg(feature = "gecko")] + #[parse(condition = "caption_side_non_standard_enabled")] BottomOutside, }