style: Remove some text-decoration prefs that are always on.

Differential Revision: https://phabricator.services.mozilla.com/D99675
This commit is contained in:
Emilio Cobos Álvarez 2020-12-14 16:14:35 +00:00
parent 45af831c82
commit 5f4da63a5e
3 changed files with 2 additions and 18 deletions

View file

@ -109,8 +109,6 @@ ${helpers.predefined_type(
extra_specified="${'distribute' if engine == 'gecko' else ''}" extra_specified="${'distribute' if engine == 'gecko' else ''}"
gecko_enum_prefix="StyleTextJustify" gecko_enum_prefix="StyleTextJustify"
animation_value_type="discrete" animation_value_type="discrete"
gecko_pref="layout.css.text-justify.enabled"
has_effect_on_gecko_scrollbars="False"
spec="https://drafts.csswg.org/css-text/#propdef-text-justify" spec="https://drafts.csswg.org/css-text/#propdef-text-justify"
servo_restyle_damage="rebuild_and_reflow" servo_restyle_damage="rebuild_and_reflow"
> >
@ -385,8 +383,6 @@ ${helpers.predefined_type(
"computed::LengthPercentageOrAuto::auto()", "computed::LengthPercentageOrAuto::auto()",
engines="gecko", engines="gecko",
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
gecko_pref="layout.css.text-underline-offset.enabled",
has_effect_on_gecko_scrollbars=False,
spec="https://drafts.csswg.org/css-text-decor-4/#underline-offset", spec="https://drafts.csswg.org/css-text-decor-4/#underline-offset",
)} )}
@ -397,8 +393,6 @@ ${helpers.predefined_type(
"computed::TextUnderlinePosition::AUTO", "computed::TextUnderlinePosition::AUTO",
engines="gecko", engines="gecko",
animation_value_type="discrete", animation_value_type="discrete",
gecko_pref="layout.css.text-underline-position.enabled",
has_effect_on_gecko_scrollbars=False,
spec="https://drafts.csswg.org/css-text-decor-3/#text-underline-position-property", spec="https://drafts.csswg.org/css-text-decor-3/#text-underline-position-property",
)} )}
@ -410,7 +404,5 @@ ${helpers.predefined_type(
engines="gecko", engines="gecko",
needs_context=False, needs_context=False,
animation_value_type="discrete", animation_value_type="discrete",
gecko_pref="layout.css.text-decoration-skip-ink.enabled",
has_effect_on_gecko_scrollbars=False,
spec="https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink-property", spec="https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink-property",
)} )}

View file

@ -75,6 +75,5 @@ ${helpers.predefined_type(
engines="gecko", engines="gecko",
initial_specified_value="generics::text::GenericTextDecorationLength::Auto", initial_specified_value="generics::text::GenericTextDecorationLength::Auto",
animation_value_type="ComputedValue", animation_value_type="ComputedValue",
gecko_pref="layout.css.text-decoration-thickness.enabled",
spec="https://drafts.csswg.org/css-text-decor-4/#text-decoration-width-property" spec="https://drafts.csswg.org/css-text-decor-4/#text-decoration-width-property"
)} )}

View file

@ -10,11 +10,9 @@
sub_properties="text-decoration-line sub_properties="text-decoration-line
${' text-decoration-style text-decoration-color text-decoration-thickness' if engine == 'gecko' else ''}" ${' text-decoration-style text-decoration-color text-decoration-thickness' if engine == 'gecko' else ''}"
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration"> spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration">
% if engine == "gecko": % if engine == "gecko":
use crate::values::specified; use crate::values::specified;
use crate::properties::longhands::{text_decoration_style, text_decoration_color, text_decoration_thickness}; use crate::properties::longhands::{text_decoration_style, text_decoration_color, text_decoration_thickness};
use crate::properties::{PropertyId, LonghandId};
% endif % endif
use crate::properties::longhands::text_decoration_line; use crate::properties::longhands::text_decoration_line;
@ -23,9 +21,6 @@
input: &mut Parser<'i, 't>, input: &mut Parser<'i, 't>,
) -> Result<Longhands, ParseError<'i>> { ) -> Result<Longhands, ParseError<'i>> {
% if engine == "gecko": % if engine == "gecko":
let text_decoration_thickness_enabled =
PropertyId::Longhand(LonghandId::TextDecorationThickness).enabled_for_all_content();
let (mut line, mut style, mut color, mut thickness, mut any) = (None, None, None, None, false); let (mut line, mut style, mut color, mut thickness, mut any) = (None, None, None, None, false);
% else: % else:
let (mut line, mut any) = (None, false); let (mut line, mut any) = (None, false);
@ -49,9 +44,7 @@
% if engine == "gecko": % if engine == "gecko":
parse_component!(style, text_decoration_style); parse_component!(style, text_decoration_style);
parse_component!(color, text_decoration_color); parse_component!(color, text_decoration_color);
if text_decoration_thickness_enabled {
parse_component!(thickness, text_decoration_thickness); parse_component!(thickness, text_decoration_thickness);
}
% endif % endif
break; break;
@ -82,7 +75,7 @@
% if engine == "gecko": % if engine == "gecko":
*self.text_decoration_style == text_decoration_style::SpecifiedValue::Solid, *self.text_decoration_style == text_decoration_style::SpecifiedValue::Solid,
*self.text_decoration_color == specified::Color::CurrentColor, *self.text_decoration_color == specified::Color::CurrentColor,
self.text_decoration_thickness.map_or(true, |t| t.is_auto()) self.text_decoration_thickness.is_auto()
% else: % else:
true, true, true true, true, true
% endif % endif