Backed out changeset 786ed9df69ff (bug 1691287) for build bustages in gecko/layout/style/ServoCSSPropList. CLOSED TREE

This commit is contained in:
Dorel Luca 2021-02-09 02:22:59 +02:00
Родитель 3fe9749ca2
Коммит a211f9245e
10 изменённых файлов: 48 добавлений и 14 удалений

Просмотреть файл

@ -9,7 +9,7 @@
%>
<%def name="predefined_type(name, type, initial_value, parse_method='parse',
vector=False,
needs_context=True, vector=False,
computed_type=None, initial_specified_value=None,
allow_quirks='No', allow_empty=False, **kwargs)">
<%def name="predefined_type_inner(name, type, initial_value, parse_method)">
@ -45,10 +45,10 @@
) -> Result<SpecifiedValue, ParseError<'i>> {
% if allow_quirks != "No":
specified::${type}::${parse_method}_quirky(context, input, AllowQuirks::${allow_quirks})
% elif parse_method != "parse":
% elif needs_context:
specified::${type}::${parse_method}(context, input)
% else:
<specified::${type} as crate::parser::Parse>::parse(context, input)
specified::${type}::${parse_method}(input)
% endif
}
</%def>
@ -971,21 +971,25 @@
name,
first_property,
second_property,
parser_function='crate::parser::Parse::parse',
parser_function,
needs_context=True,
**kwargs
)">
<%call expr="self.shorthand(name, sub_properties=' '.join([first_property, second_property]), **kwargs)">
#[allow(unused_imports)]
use crate::parser::Parse;
#[allow(unused_imports)]
use crate::values::specified;
pub fn parse_value<'i, 't>(
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<Longhands, ParseError<'i>> {
let parse_one = |c: &ParserContext, input: &mut Parser<'i, 't>| -> Result<crate::properties::longhands::${to_rust_ident(first_property)}::SpecifiedValue, ParseError<'i>> {
${parser_function}(c, input)
let parse_one = |_c: &ParserContext, input: &mut Parser<'i, 't>| {
% if needs_context:
${parser_function}(_c, input)
% else:
${parser_function}(input)
% endif
};
let first = parse_one(context, input)?;
@ -1013,26 +1017,26 @@
</%call>
</%def>
<%def name="four_sides_shorthand(name, sub_property_pattern,
parser_function='crate::parser::Parse::parse',
allow_quirks='No', **kwargs)">
<%def name="four_sides_shorthand(name, sub_property_pattern, parser_function,
needs_context=True, allow_quirks='No', **kwargs)">
<% sub_properties=' '.join(sub_property_pattern % side for side in PHYSICAL_SIDES) %>
<%call expr="self.shorthand(name, sub_properties=sub_properties, **kwargs)">
#[allow(unused_imports)]
use crate::parser::Parse;
use crate::values::generics::rect::Rect;
#[allow(unused_imports)]
use crate::values::specified;
pub fn parse_value<'i, 't>(
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<Longhands, ParseError<'i>> {
let rect = Rect::parse_with(context, input, |c, i| -> Result<crate::properties::longhands::${to_rust_ident(sub_property_pattern % "top")}::SpecifiedValue, ParseError<'i>> {
let rect = Rect::parse_with(context, input, |_c, i| {
% if allow_quirks != "No":
${parser_function}_quirky(c, i, specified::AllowQuirks::${allow_quirks})
${parser_function}_quirky(_c, i, specified::AllowQuirks::${allow_quirks})
% elif needs_context:
${parser_function}(_c, i)
% else:
${parser_function}(c, i)
${parser_function}(i)
% endif
})?;
Ok(expanded! {

Просмотреть файл

@ -42,6 +42,7 @@
animation_value_type="discrete" if not is_logical else "none",
logical=is_logical,
logical_group="border-style",
needs_context=False,
)}
${helpers.predefined_type(

Просмотреть файл

@ -71,6 +71,7 @@ ${helpers.predefined_type(
initial_specified_value="specified::Float::None",
spec="https://drafts.csswg.org/css-box/#propdef-float",
animation_value_type="discrete",
needs_context=False,
servo_restyle_damage="rebuild_and_reflow",
gecko_ffi_name="mFloat",
)}
@ -81,6 +82,7 @@ ${helpers.predefined_type(
"computed::Clear::None",
engines="gecko servo-2013",
animation_value_type="discrete",
needs_context=False,
gecko_ffi_name="mBreakType",
spec="https://drafts.csswg.org/css-box/#propdef-clear",
servo_restyle_damage="rebuild_and_reflow",
@ -115,6 +117,7 @@ ${helpers.single_keyword(
"computed::OverflowClipBox::PaddingBox",
engines="gecko",
enabled_in="ua",
needs_context=False,
gecko_pref="layout.css.overflow-clip-box.enabled",
animation_value_type="discrete",
spec="Internal, may be standardized in the future: \
@ -133,6 +136,7 @@ ${helpers.single_keyword(
logical=logical,
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-overflow-3/#propdef-{}".format(full_name),
needs_context=False,
servo_restyle_damage = "reflow",
gecko_pref="layout.css.overflow-logical.enabled" if logical else None,
)}
@ -144,6 +148,7 @@ ${helpers.predefined_type(
"computed::OverflowAnchor::Auto",
engines="gecko",
initial_specified_value="specified::OverflowAnchor::Auto",
needs_context=False,
gecko_pref="layout.css.scroll-anchoring.enabled",
spec="https://drafts.csswg.org/css-scroll-anchoring/#exclusion-api",
animation_value_type="discrete",
@ -463,6 +468,7 @@ ${helpers.predefined_type(
"OverscrollBehavior",
"computed::OverscrollBehavior::Auto",
engines="gecko",
needs_context=False,
logical_group="overscroll-behavior",
logical=logical,
gecko_pref="layout.css.overscroll-behavior.enabled",
@ -488,6 +494,7 @@ ${helpers.predefined_type(
"BreakBetween",
"computed::BreakBetween::Auto",
engines="gecko",
needs_context=False,
spec="https://drafts.csswg.org/css-break/#propdef-break-after",
animation_value_type="discrete",
)}
@ -497,6 +504,7 @@ ${helpers.predefined_type(
"BreakBetween",
"computed::BreakBetween::Auto",
engines="gecko",
needs_context=False,
spec="https://drafts.csswg.org/css-break/#propdef-break-before",
animation_value_type="discrete",
)}
@ -506,6 +514,7 @@ ${helpers.predefined_type(
"BreakWithin",
"computed::BreakWithin::Auto",
engines="gecko",
needs_context=False,
alias="page-break-inside",
spec="https://drafts.csswg.org/css-break/#propdef-break-inside",
animation_value_type="discrete",
@ -519,6 +528,7 @@ ${helpers.predefined_type(
"computed::Resize::None",
engines="gecko",
animation_value_type="discrete",
needs_context=False,
gecko_ffi_name="mResize",
spec="https://drafts.csswg.org/css-ui/#propdef-resize",
)}
@ -574,6 +584,7 @@ ${helpers.predefined_type(
"computed::TransformStyle::Flat",
engines="gecko servo-2013 servo-2020",
spec="https://drafts.csswg.org/css-transforms-2/#transform-style-property",
needs_context=False,
extra_prefixes=transform_extra_prefixes,
flags="CREATES_STACKING_CONTEXT FIXPOS_CB",
animation_value_type="discrete",

Просмотреть файл

@ -84,6 +84,7 @@ ${helpers.predefined_type(
"BorderStyle",
"computed::BorderStyle::None",
engines="gecko",
needs_context=False,
initial_specified_value="specified::BorderStyle::None",
extra_prefixes="moz:layout.css.prefixes.columns",
animation_value_type="discrete",

Просмотреть файл

@ -72,6 +72,7 @@ ${helpers.predefined_type(
"FillRule",
"Default::default()",
engines="gecko",
needs_context=False,
animation_value_type="discrete",
spec="https://www.w3.org/TR/SVG11/painting.html#FillRuleProperty",
)}
@ -164,6 +165,7 @@ ${helpers.predefined_type(
"FillRule",
"Default::default()",
engines="gecko",
needs_context=False,
animation_value_type="discrete",
spec="https://www.w3.org/TR/SVG11/masking.html#ClipRuleProperty",
)}

Просмотреть файл

@ -83,6 +83,7 @@ ${helpers.predefined_type(
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text/#propdef-overflow-wrap",
alias="word-wrap",
needs_context=False,
servo_restyle_damage="rebuild_and_reflow",
)}
@ -94,6 +95,7 @@ ${helpers.predefined_type(
servo_2020_pref="layout.2020.unimplemented",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text/#propdef-word-break",
needs_context=False,
servo_restyle_damage="rebuild_and_reflow",
)}
@ -141,6 +143,7 @@ ${helpers.predefined_type(
"text-align-last",
"TextAlignLast",
"computed::text::TextAlignLast::Auto",
needs_context=False,
engines="gecko",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text/#propdef-text-align-last",
@ -284,6 +287,7 @@ ${helpers.predefined_type(
engines="gecko",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text-3/#line-break-property",
needs_context=False,
)}
// CSS Compatibility
@ -399,6 +403,7 @@ ${helpers.predefined_type(
"TextDecorationSkipInk",
"computed::TextDecorationSkipInk::Auto",
engines="gecko",
needs_context=False,
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink-property",
)}

Просмотреть файл

@ -89,6 +89,7 @@ ${helpers.predefined_type(
engines="gecko",
animation_value_type="discrete",
enabled_in="ua",
needs_context=False,
spec="Internal implementation detail for <ol reversed>",
servo_restyle_damage="rebuild_and_reflow",
)}

Просмотреть файл

@ -37,6 +37,7 @@ ${helpers.predefined_type(
engines="gecko",
extra_prefixes="moz webkit",
animation_value_type="discrete",
needs_context=False,
spec="https://drafts.csswg.org/css-ui-4/#propdef-user-select",
)}

Просмотреть файл

@ -17,7 +17,9 @@ ${helpers.four_sides_shorthand(
${helpers.four_sides_shorthand(
"border-style",
"border-%s-style",
"specified::BorderStyle::parse",
engines="gecko servo-2013 servo-2020",
needs_context=False,
spec="https://drafts.csswg.org/css-backgrounds/#border-style",
)}

Просмотреть файл

@ -8,8 +8,10 @@ ${helpers.two_properties_shorthand(
"overflow",
"overflow-x",
"overflow-y",
"specified::Overflow::parse",
engines="gecko servo-2013 servo-2020",
flags="SHORTHAND_IN_GETCS",
needs_context=False,
spec="https://drafts.csswg.org/css-overflow/#propdef-overflow",
)}
@ -17,8 +19,10 @@ ${helpers.two_properties_shorthand(
"overflow-clip-box",
"overflow-clip-box-block",
"overflow-clip-box-inline",
"specified::OverflowClipBox::parse",
engines="gecko",
enabled_in="ua",
needs_context=False,
gecko_pref="layout.css.overflow-clip-box.enabled",
spec="Internal, may be standardized in the future "
"(https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-clip-box)",
@ -306,7 +310,9 @@ ${helpers.two_properties_shorthand(
"overscroll-behavior",
"overscroll-behavior-x",
"overscroll-behavior-y",
"specified::OverscrollBehavior::parse",
engines="gecko",
needs_context=False,
gecko_pref="layout.css.overscroll-behavior.enabled",
spec="https://wicg.github.io/overscroll-behavior/#overscroll-behavior-properties",
)}