From b38517757fb663c0ab7f430d11b388999c3b6ade Mon Sep 17 00:00:00 2001 From: Oriol Brufau Date: Tue, 16 May 2023 08:46:45 +0200 Subject: [PATCH] style: Remove layout.css.ruby.position-alternate.enabled pref Differential Revision: https://phabricator.services.mozilla.com/D114044 --- .../properties/longhands/inherited_text.mako.rs | 2 +- components/style/values/specified/text.rs | 17 ++--------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/components/style/properties/longhands/inherited_text.mako.rs b/components/style/properties/longhands/inherited_text.mako.rs index b8b603e8b2e..6e6bd79c0e6 100644 --- a/components/style/properties/longhands/inherited_text.mako.rs +++ b/components/style/properties/longhands/inherited_text.mako.rs @@ -332,7 +332,7 @@ ${helpers.single_keyword( ${helpers.predefined_type( "ruby-position", "RubyPosition", - "Default::default()", + "computed::RubyPosition::AlternateOver", engines="gecko", spec="https://drafts.csswg.org/css-ruby/#ruby-position-property", animation_value_type="discrete", diff --git a/components/style/values/specified/text.rs b/components/style/values/specified/text.rs index 3fe3b92c354..7ee4dbedda3 100644 --- a/components/style/values/specified/text.rs +++ b/components/style/values/specified/text.rs @@ -1216,25 +1216,13 @@ pub enum RubyPosition { Under, } -impl Default for RubyPosition { - fn default() -> Self { - if static_prefs::pref!("layout.css.ruby.position-alternate.enabled") { - RubyPosition::AlternateOver - } else { - RubyPosition::Over - } - } -} - impl Parse for RubyPosition { fn parse<'i, 't>( _context: &ParserContext, input: &mut Parser<'i, 't>, ) -> Result> { // Parse alternate before - let alternate_enabled = static_prefs::pref!("layout.css.ruby.position-alternate.enabled"); - let alternate = alternate_enabled && - input.try_parse(|i| i.expect_ident_matching("alternate")).is_ok(); + let alternate = input.try_parse(|i| i.expect_ident_matching("alternate")).is_ok(); if alternate && input.is_exhausted() { return Ok(RubyPosition::AlternateOver); } @@ -1245,8 +1233,7 @@ impl Parse for RubyPosition { }; // Parse alternate after let alternate = alternate || - (alternate_enabled && - input.try_parse(|i| i.expect_ident_matching("alternate")).is_ok()); + input.try_parse(|i| i.expect_ident_matching("alternate")).is_ok(); Ok(match (over, alternate) { (true, true) => RubyPosition::AlternateOver,