mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
style: Remove layout.css.ruby.position-alternate.enabled pref
Differential Revision: https://phabricator.services.mozilla.com/D114044
This commit is contained in:
parent
17ae374c65
commit
b38517757f
2 changed files with 3 additions and 16 deletions
|
@ -332,7 +332,7 @@ ${helpers.single_keyword(
|
||||||
${helpers.predefined_type(
|
${helpers.predefined_type(
|
||||||
"ruby-position",
|
"ruby-position",
|
||||||
"RubyPosition",
|
"RubyPosition",
|
||||||
"Default::default()",
|
"computed::RubyPosition::AlternateOver",
|
||||||
engines="gecko",
|
engines="gecko",
|
||||||
spec="https://drafts.csswg.org/css-ruby/#ruby-position-property",
|
spec="https://drafts.csswg.org/css-ruby/#ruby-position-property",
|
||||||
animation_value_type="discrete",
|
animation_value_type="discrete",
|
||||||
|
|
|
@ -1216,25 +1216,13 @@ pub enum RubyPosition {
|
||||||
Under,
|
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 {
|
impl Parse for RubyPosition {
|
||||||
fn parse<'i, 't>(
|
fn parse<'i, 't>(
|
||||||
_context: &ParserContext,
|
_context: &ParserContext,
|
||||||
input: &mut Parser<'i, 't>,
|
input: &mut Parser<'i, 't>,
|
||||||
) -> Result<RubyPosition, ParseError<'i>> {
|
) -> Result<RubyPosition, ParseError<'i>> {
|
||||||
// Parse alternate before
|
// Parse alternate before
|
||||||
let alternate_enabled = static_prefs::pref!("layout.css.ruby.position-alternate.enabled");
|
let alternate = input.try_parse(|i| i.expect_ident_matching("alternate")).is_ok();
|
||||||
let alternate = alternate_enabled &&
|
|
||||||
input.try_parse(|i| i.expect_ident_matching("alternate")).is_ok();
|
|
||||||
if alternate && input.is_exhausted() {
|
if alternate && input.is_exhausted() {
|
||||||
return Ok(RubyPosition::AlternateOver);
|
return Ok(RubyPosition::AlternateOver);
|
||||||
}
|
}
|
||||||
|
@ -1245,8 +1233,7 @@ impl Parse for RubyPosition {
|
||||||
};
|
};
|
||||||
// Parse alternate after
|
// Parse alternate after
|
||||||
let alternate = alternate ||
|
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) {
|
Ok(match (over, alternate) {
|
||||||
(true, true) => RubyPosition::AlternateOver,
|
(true, true) => RubyPosition::AlternateOver,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue