--- a/servo/components/style/properties/data.py
+++ b/servo/components/style/properties/data.py
@@ -173,17 +173,17 @@ class Longhand(object):
# > but does accept the `animation-play-state` property and interprets it specially.
self.allowed_in_keyframe_block = allowed_in_keyframe_block \
and allowed_in_keyframe_block != "False"
# This is done like this since just a plain bool argument seemed like
# really random.
if animation_value_type is None:
raise TypeError("animation_value_type should be specified for (" + name + ")")
- animation_value_types = ["none", "normal", "discrete"]
+ animation_value_types = ["none", "discrete", "ComputedValue"]
if animation_value_type not in animation_value_types:
raise TypeError("animation_value_type should be one of (" +
str(animation_value_types) + ")")
self.animation_value_type = animation_value_type
self.animatable = animation_value_type != "none"
if self.logical:
# Logical properties will be animatable (i.e. the animation type is
--- a/servo/components/style/properties/longhand/background.mako.rs
+++ b/servo/components/style/properties/longhand/background.mako.rs
@@ -5,17 +5,17 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
<% data.new_style_struct("Background", inherited=False) %>
${helpers.predefined_type("background-color", "CSSColor",
"::cssparser::Color::RGBA(::cssparser::RGBA::transparent())",
initial_specified_value="SpecifiedValue::transparent()",
spec="https://drafts.csswg.org/css-backgrounds/#background-color",
- animation_value_type="normal", complex_color=True)}
+ animation_value_type="ComputedValue", complex_color=True)}
<%helpers:vector_longhand name="background-image" animation_value_type="none"
spec="https://drafts.csswg.org/css-backgrounds/#the-background-image"
has_uncacheable_values="${product == 'gecko'}">
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
use values::specified::Image;
@@ -84,17 +84,17 @@
computed_value::T(None) => SpecifiedValue(None),
computed_value::T(Some(ref image)) =>
SpecifiedValue(Some(ToComputedValue::from_computed_value(image))),
}
}
}
</%helpers:vector_longhand>
-<%helpers:vector_longhand name="background-position-x" animation_value_type="normal"
+<%helpers:vector_longhand name="background-position-x" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-backgrounds-4/#propdef-background-position-x"
delegate_animate="True">
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
use values::specified::position::HorizontalPosition;
#[allow(missing_docs)]
@@ -135,17 +135,17 @@
#[allow(missing_docs)]
pub fn parse(context: &ParserContext, input: &mut Parser)
-> Result<SpecifiedValue, ()> {
HorizontalPosition::parse(context, input)
}
</%helpers:vector_longhand>
-<%helpers:vector_longhand name="background-position-y" animation_value_type="normal"
+<%helpers:vector_longhand name="background-position-y" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-backgrounds-4/#propdef-background-position-y"
delegate_animate="True">
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
use values::specified::position::VerticalPosition;
#[allow(missing_docs)]
@@ -318,17 +318,17 @@
animation_value_type="none")}
${helpers.single_keyword("background-origin",
"padding-box border-box content-box",
vector=True, extra_prefixes="webkit",
spec="https://drafts.csswg.org/css-backgrounds/#the-background-origin",
animation_value_type="none")}
-<%helpers:vector_longhand name="background-size" animation_value_type="normal" extra_prefixes="webkit"
+<%helpers:vector_longhand name="background-size" animation_value_type="ComputedValue" extra_prefixes="webkit"
spec="https://drafts.csswg.org/css-backgrounds/#the-background-size">
use cssparser::Token;
use std::ascii::AsciiExt;
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
#[allow(missing_docs)]
--- a/servo/components/style/properties/longhand/border.mako.rs
+++ b/servo/components/style/properties/longhand/border.mako.rs
@@ -15,33 +15,33 @@
else:
return "https://drafts.csswg.org/css-backgrounds/#border-%s-%s" % (side[0], kind)
%>
% for side in ALL_SIDES:
${helpers.predefined_type("border-%s-color" % side[0], "CSSColor",
"::cssparser::Color::CurrentColor",
alias=maybe_moz_logical_alias(product, side, "-moz-border-%s-color"),
spec=maybe_logical_spec(side, "color"),
- animation_value_type="normal", logical = side[1])}
+ animation_value_type="ComputedValue", logical = side[1])}
% endfor
% for side in ALL_SIDES:
${helpers.predefined_type("border-%s-style" % side[0], "BorderStyle",
"specified::BorderStyle::none",
need_clone=True,
alias=maybe_moz_logical_alias(product, side, "-moz-border-%s-style"),
spec=maybe_logical_spec(side, "style"),
animation_value_type="none", logical = side[1])}
% endfor
${helpers.gecko_keyword_conversion(Keyword('border-style',
"none solid double dotted dashed hidden groove ridge inset outset"),
type="::values::specified::BorderStyle")}
% for side in ALL_SIDES:
- <%helpers:longhand name="border-${side[0]}-width" animation_value_type="normal" logical="${side[1]}"
+ <%helpers:longhand name="border-${side[0]}-width" animation_value_type="ComputedValue" logical="${side[1]}"
alias="${maybe_moz_logical_alias(product, side, '-moz-border-%s-width')}"
spec="${maybe_logical_spec(side, 'width')}">
use app_units::Au;
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
use values::specified::BorderWidth;
@@ -65,17 +65,17 @@
// FIXME(#4126): when gfx supports painting it, make this Size2D<LengthOrPercentage>
% for corner in ["top-left", "top-right", "bottom-right", "bottom-left"]:
${helpers.predefined_type("border-" + corner + "-radius", "BorderRadiusSize",
"computed::BorderRadiusSize::zero()",
"parse", extra_prefixes="webkit",
spec="https://drafts.csswg.org/css-backgrounds/#border-%s-radius" % corner,
boxed=True,
- animation_value_type="normal")}
+ animation_value_type="ComputedValue")}
% endfor
${helpers.single_keyword("box-decoration-break", "slice clone",
gecko_enum_prefix="StyleBoxDecorationBreak",
gecko_inexhaustive=True,
spec="https://drafts.csswg.org/css-break/#propdef-box-decoration-break",
products="gecko", animation_value_type="none")}
--- a/servo/components/style/properties/longhand/box.mako.rs
+++ b/servo/components/style/properties/longhand/box.mako.rs
@@ -206,17 +206,17 @@
#[inline]
pub fn derive_from_display(context: &mut Context) {
let d = context.style().get_box().clone_display();
context.mutate_style().mutate_box().set__servo_display_for_hypothetical_box(d);
}
</%helpers:longhand>
-<%helpers:longhand name="vertical-align" animation_value_type="normal"
+<%helpers:longhand name="vertical-align" animation_value_type="ComputedValue"
spec="https://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align">
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
<% vertical_align = data.longhands_by_name["vertical-align"] %>
<% vertical_align.keyword = Keyword("vertical-align",
"baseline sub super top text-top middle bottom text-bottom",
@@ -1095,32 +1095,32 @@
${helpers.predefined_type("scroll-snap-destination",
"Position",
"computed::Position::zero()",
products="gecko",
boxed="True",
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-destination)",
- animation_value_type="normal")}
+ animation_value_type="ComputedValue")}
${helpers.predefined_type("scroll-snap-coordinate",
"Position",
"computed::Position::zero()",
vector=True,
products="gecko",
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-destination)",
- animation_value_type="normal",
+ animation_value_type="ComputedValue",
allow_empty=True,
delegate_animate=True)}
<%helpers:longhand name="transform" extra_prefixes="webkit"
- animation_value_type="normal"
+ animation_value_type="ComputedValue"
flags="CREATES_STACKING_CONTEXT FIXPOS_CB"
spec="https://drafts.csswg.org/css-transforms/#propdef-transform">
use app_units::Au;
use values::computed::{LengthOrPercentageOrNumber as ComputedLoPoNumber, LengthOrNumber as ComputedLoN};
use values::computed::{LengthOrPercentage as ComputedLoP, Length as ComputedLength};
use values::specified::{Angle, Length, LengthOrPercentage};
use values::specified::{LengthOrNumber, LengthOrPercentageOrNumber as LoPoNumber, Number};
use style_traits::ToCss;
@@ -2089,19 +2089,19 @@
${helpers.predefined_type("perspective",
"LengthOrNone",
"Either::Second(None_)",
"parse_non_negative_length",
gecko_ffi_name="mChildPerspective",
spec="https://drafts.csswg.org/css-transforms/#perspective",
extra_prefixes="moz webkit",
flags="CREATES_STACKING_CONTEXT FIXPOS_CB",
- animation_value_type="normal")}
+ animation_value_type="ComputedValue")}
-<%helpers:longhand name="perspective-origin" boxed="True" animation_value_type="normal" extra_prefixes="moz webkit"
+<%helpers:longhand name="perspective-origin" boxed="True" animation_value_type="ComputedValue" extra_prefixes="moz webkit"
spec="https://drafts.csswg.org/css-transforms/#perspective-origin-property">
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
use values::specified::{LengthOrPercentage, Percentage};
pub mod computed_value {
use properties::animated_properties::Interpolate;
@@ -2189,17 +2189,17 @@
${helpers.single_keyword("transform-style",
"auto flat preserve-3d" if product == "servo" else
"flat preserve-3d",
spec="https://drafts.csswg.org/css-transforms/#transform-style-property",
extra_prefixes="moz webkit",
flags="CREATES_STACKING_CONTEXT FIXPOS_CB",
animation_value_type="none")}
-<%helpers:longhand name="transform-origin" animation_value_type="normal" extra_prefixes="moz webkit" boxed="True"
+<%helpers:longhand name="transform-origin" animation_value_type="ComputedValue" extra_prefixes="moz webkit" boxed="True"
spec="https://drafts.csswg.org/css-transforms/#transform-origin-property">
use app_units::Au;
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
use values::specified::{NoCalcLength, LengthOrPercentage, Percentage};
pub mod computed_value {
--- a/servo/components/style/properties/longhand/color.mako.rs
+++ b/servo/components/style/properties/longhand/color.mako.rs
@@ -3,17 +3,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
<%namespace name="helpers" file="/helpers.mako.rs" />
<% data.new_style_struct("Color", inherited=True) %>
<% from data import to_rust_ident %>
-<%helpers:longhand name="color" need_clone="True" animation_value_type="normal"
+<%helpers:longhand name="color" need_clone="True" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-color/#color">
use cssparser::RGBA;
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
use values::specified::{Color, CSSColor, CSSRGBA};
impl ToComputedValue for SpecifiedValue {
--- a/servo/components/style/properties/longhand/column.mako.rs
+++ b/servo/components/style/properties/longhand/column.mako.rs
@@ -7,46 +7,46 @@
<% data.new_style_struct("Column", inherited=False) %>
${helpers.predefined_type("column-width",
"length::LengthOrAuto",
"Either::Second(Auto)",
initial_specified_value="Either::Second(Auto)",
parse_method="parse_non_negative_length",
extra_prefixes="moz",
- animation_value_type="normal",
+ animation_value_type="ComputedValue",
experimental=True,
spec="https://drafts.csswg.org/css-multicol/#propdef-column-width")}
${helpers.predefined_type("column-count",
"IntegerOrAuto",
"Either::Second(Auto)",
parse_method="parse_positive",
initial_specified_value="Either::Second(Auto)",
experimental="True",
- animation_value_type="normal",
+ animation_value_type="ComputedValue",
extra_prefixes="moz",
spec="https://drafts.csswg.org/css-multicol/#propdef-column-count")}
${helpers.predefined_type("column-gap",
"length::LengthOrNormal",
"Either::Second(Normal)",
parse_method='parse_non_negative_length',
extra_prefixes="moz",
experimental=True,
- animation_value_type="normal",
+ animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-multicol/#propdef-column-gap")}
${helpers.single_keyword("column-fill", "balance auto", extra_prefixes="moz",
products="gecko", animation_value_type="none",
spec="https://drafts.csswg.org/css-multicol/#propdef-column-fill")}
// https://drafts.csswg.org/css-multicol-1/#propdef-column-rule-width
-<%helpers:longhand name="column-rule-width" products="gecko" animation_value_type="normal" extra_prefixes="moz"
+<%helpers:longhand name="column-rule-width" products="gecko" animation_value_type="ComputedValue" extra_prefixes="moz"
spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule-width">
use app_units::Au;
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
use values::specified::BorderWidth;
pub mod computed_value {
@@ -70,17 +70,17 @@
BorderWidth::parse(context, input)
}
</%helpers:longhand>
// https://drafts.csswg.org/css-multicol-1/#crc
${helpers.predefined_type("column-rule-color", "CSSColor",
"::cssparser::Color::CurrentColor",
initial_specified_value="specified::CSSColor::currentcolor()",
- products="gecko", animation_value_type="normal", extra_prefixes="moz",
+ products="gecko", animation_value_type="ComputedValue", extra_prefixes="moz",
complex_color=True, need_clone=True,
spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule-color")}
// It's not implemented in servo or gecko yet.
${helpers.single_keyword("column-span", "none all",
products="none", animation_value_type="none",
spec="https://drafts.csswg.org/css-multicol/#propdef-column-span")}
--- a/servo/components/style/properties/longhand/effects.mako.rs
+++ b/servo/components/style/properties/longhand/effects.mako.rs
@@ -5,22 +5,22 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
// Box-shadow, etc.
<% data.new_style_struct("Effects", inherited=False) %>
${helpers.predefined_type("opacity",
"Opacity",
"1.0",
- animation_value_type="normal",
+ animation_value_type="ComputedValue",
flags="CREATES_STACKING_CONTEXT",
spec="https://drafts.csswg.org/css-color/#opacity")}
<%helpers:vector_longhand name="box-shadow" allow_empty="True"
- animation_value_type="normal" extra_prefixes="webkit"
+ animation_value_type="ComputedValue" extra_prefixes="webkit"
spec="https://drafts.csswg.org/css-backgrounds/#box-shadow">
use cssparser;
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
pub type SpecifiedValue = specified::Shadow;
--- a/servo/components/style/properties/longhand/font.mako.rs
+++ b/servo/components/style/properties/longhand/font.mako.rs
@@ -346,17 +346,17 @@
"normal small-caps",
extra_gecko_values="all-small petite-caps unicase titling-caps",
gecko_constant_prefix="NS_FONT_VARIANT_CAPS",
gecko_ffi_name="mFont.variantCaps",
spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-caps",
custom_consts=font_variant_caps_custom_consts,
animation_value_type="none")}
-<%helpers:longhand name="font-weight" need_clone="True" animation_value_type="normal"
+<%helpers:longhand name="font-weight" need_clone="True" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-fonts/#propdef-font-weight">
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
use properties::longhands::system_font::SystemFont;
no_viewport_percentage!(SpecifiedValue);
@@ -544,17 +544,17 @@
% for weight in range(100, 901, 100):
computed_value::T::Weight${weight} => SpecifiedValue::Weight${weight},
% endfor
}
}
}
</%helpers:longhand>
-<%helpers:longhand name="font-size" need_clone="True" animation_value_type="normal"
+<%helpers:longhand name="font-size" need_clone="True" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-fonts/#propdef-font-size">
use app_units::Au;
use properties::longhands::system_font::SystemFont;
use properties::style_structs::Font;
use std::fmt;
use style_traits::ToCss;
use values::{FONT_MEDIUM_PX, HasViewportPercentage};
use values::specified::{FontRelativeLength, LengthOrPercentage, Length};
@@ -929,17 +929,17 @@
let computed = longhands::font_size::get_initial_specified_value()
.to_computed_value(context);
context.mutate_style().mutate_${data.current_style_struct.name_lower}()
.set_font_size(computed);
context.mutate_style().font_size_keyword = Some((Default::default(), 1.));
}
</%helpers:longhand>
-<%helpers:longhand products="gecko" name="font-size-adjust" animation_value_type="normal"
+<%helpers:longhand products="gecko" name="font-size-adjust" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-fonts/#propdef-font-size-adjust">
use properties::longhands::system_font::SystemFont;
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
no_viewport_percentage!(SpecifiedValue);
--- a/servo/components/style/properties/longhand/inherited_box.mako.rs
+++ b/servo/components/style/properties/longhand/inherited_box.mako.rs
@@ -6,17 +6,17 @@
<% data.new_style_struct("InheritedBox", inherited=True, gecko_name="Visibility") %>
// TODO: collapse. Well, do tables first.
${helpers.single_keyword("visibility",
"visible hidden",
extra_gecko_values="collapse",
gecko_ffi_name="mVisible",
- animation_value_type="normal",
+ animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-box/#propdef-visibility")}
// CSS Writing Modes Level 3
// https://drafts.csswg.org/css-writing-modes-3
${helpers.single_keyword("writing-mode",
"horizontal-tb vertical-rl vertical-lr",
extra_gecko_values="sideways-rl sideways-lr",
extra_gecko_aliases="lr=horizontal-tb lr-tb=horizontal-tb \
--- a/servo/components/style/properties/longhand/inherited_svg.mako.rs
+++ b/servo/components/style/properties/longhand/inherited_svg.mako.rs
@@ -65,17 +65,17 @@
boxed=True,
spec="https://www.w3.org/TR/SVG2/painting.html#SpecifyingStrokePaint")}
${helpers.predefined_type(
"stroke-width", "LengthOrPercentage",
"computed::LengthOrPercentage::one()",
"parse_numbers_are_pixels_non_negative",
products="gecko",
- animation_value_type="normal",
+ animation_value_type="ComputedValue",
spec="https://www.w3.org/TR/SVG2/painting.html#StrokeWidth")}
${helpers.single_keyword("stroke-linecap", "butt round square",
products="gecko", animation_value_type="none",
spec="https://www.w3.org/TR/SVG11/painting.html#StrokeLinecapProperty")}
${helpers.single_keyword("stroke-linejoin", "miter round bevel",
products="gecko", animation_value_type="none",
@@ -101,17 +101,17 @@
space_separated_allowed="True",
spec="https://www.w3.org/TR/SVG2/painting.html#StrokeDashing")}
${helpers.predefined_type(
"stroke-dashoffset", "LengthOrPercentage",
"computed::LengthOrPercentage::zero()",
"parse_numbers_are_pixels",
products="gecko",
- animation_value_type="normal",
+ animation_value_type="ComputedValue",
spec="https://www.w3.org/TR/SVG2/painting.html#StrokeDashing")}
// Section 14 - Clipping, Masking and Compositing
${helpers.single_keyword("clip-rule", "nonzero evenodd",
products="gecko",
gecko_enum_prefix="StyleFillRule",
gecko_inexhaustive=True,
animation_value_type="none",
--- a/servo/components/style/properties/longhand/inherited_text.mako.rs
+++ b/servo/components/style/properties/longhand/inherited_text.mako.rs
@@ -1,17 +1,17 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
<%namespace name="helpers" file="/helpers.mako.rs" />
<% from data import Keyword %>
<% data.new_style_struct("InheritedText", inherited=True, gecko_name="Text") %>
-<%helpers:longhand name="line-height" animation_value_type="normal"
+<%helpers:longhand name="line-height" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css2/visudet.html#propdef-line-height">
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
impl HasViewportPercentage for SpecifiedValue {
fn has_viewport_percentage(&self) -> bool {
match *self {
@@ -178,17 +178,17 @@
gecko_constant_prefix="NS_STYLE_TEXT_SIZE_ADJUST",
products="gecko", animation_value_type="none",
spec="https://drafts.csswg.org/css-size-adjust/#adjustment-control",
alias="-webkit-text-size-adjust")}
${helpers.predefined_type("text-indent",
"LengthOrPercentage",
"computed::LengthOrPercentage::Length(Au(0))",
- animation_value_type="normal",
+ animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-text/#propdef-text-indent")}
// Also known as "word-wrap" (which is more popular because of IE), but this is the preferred
// name per CSS-TEXT 6.2.
${helpers.single_keyword("overflow-wrap",
"normal break-word",
gecko_constant_prefix="NS_STYLE_OVERFLOWWRAP",
animation_value_type="none",
@@ -401,17 +401,17 @@
impl ComputedValueAsSpecified for SpecifiedValue {}
pub use self::computed_value::T as SpecifiedValue;
pub fn parse(_context: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue, ()> {
computed_value::T::parse(input)
}
% endif
</%helpers:longhand>
-<%helpers:longhand name="letter-spacing" animation_value_type="normal"
+<%helpers:longhand name="letter-spacing" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-text/#propdef-letter-spacing">
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
impl HasViewportPercentage for SpecifiedValue {
fn has_viewport_percentage(&self) -> bool {
match *self {
@@ -487,17 +487,17 @@
if input.try(|input| input.expect_ident_matching("normal")).is_ok() {
Ok(SpecifiedValue::Normal)
} else {
specified::Length::parse(context, input).map(SpecifiedValue::Specified)
}
}
</%helpers:longhand>
-<%helpers:longhand name="word-spacing" animation_value_type="normal"
+<%helpers:longhand name="word-spacing" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-text/#propdef-word-spacing">
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
impl HasViewportPercentage for SpecifiedValue {
fn has_viewport_percentage(&self) -> bool {
match *self {
@@ -706,17 +706,17 @@
SpecifiedValue::pre |
SpecifiedValue::pre_wrap => true,
}
}
}
% endif
</%helpers:single_keyword_computed>
-<%helpers:longhand name="text-shadow" animation_value_type="normal"
+<%helpers:longhand name="text-shadow" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-shadow">
use cssparser;
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
impl HasViewportPercentage for SpecifiedValue {
fn has_viewport_percentage(&self) -> bool {
@@ -1199,17 +1199,17 @@
}
}
% endif
</%helpers:longhand>
${helpers.predefined_type("text-emphasis-color", "CSSColor",
"::cssparser::Color::CurrentColor",
initial_specified_value="specified::CSSColor::currentcolor()",
- products="gecko", animation_value_type="normal",
+ products="gecko", animation_value_type="ComputedValue",
complex_color=True, need_clone=True,
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-emphasis-color")}
${helpers.predefined_type(
"-moz-tab-size", "LengthOrNumber",
"::values::Either::Second(8.0)",
"parse_non_negative",
@@ -1217,25 +1217,25 @@
spec="https://drafts.csswg.org/css-text-3/#tab-size-property")}
// CSS Compatibility
// https://compat.spec.whatwg.org
${helpers.predefined_type(
"-webkit-text-fill-color", "CSSColor",
"CSSParserColor::CurrentColor",
- products="gecko", animation_value_type="normal",
+ products="gecko", animation_value_type="ComputedValue",
complex_color=True, need_clone=True,
spec="https://compat.spec.whatwg.org/#the-webkit-text-fill-color")}
${helpers.predefined_type(
"-webkit-text-stroke-color", "CSSColor",
"CSSParserColor::CurrentColor",
initial_specified_value="specified::CSSColor::currentcolor()",
- products="gecko", animation_value_type="normal",
+ products="gecko", animation_value_type="ComputedValue",
complex_color=True, need_clone=True,
spec="https://compat.spec.whatwg.org/#the-webkit-text-stroke-color")}
<%helpers:longhand products="gecko" name="-webkit-text-stroke-width" animation_value_type="none"
spec="https://compat.spec.whatwg.org/#the-webkit-text-stroke-width">
use app_units::Au;
use std::fmt;
use style_traits::ToCss;
--- a/servo/components/style/properties/longhand/margin.mako.rs
+++ b/servo/components/style/properties/longhand/margin.mako.rs
@@ -10,11 +10,11 @@
<%
spec = "https://drafts.csswg.org/css-box/#propdef-margin-%s" % side[0]
if side[1]:
spec = "https://drafts.csswg.org/css-logical-props/#propdef-margin-%s" % side[1]
%>
${helpers.predefined_type("margin-%s" % side[0], "LengthOrPercentageOrAuto",
"computed::LengthOrPercentageOrAuto::Length(Au(0))",
alias=maybe_moz_logical_alias(product, side, "-moz-margin-%s"),
- animation_value_type="normal", logical = side[1], spec = spec,
+ animation_value_type="ComputedValue", logical = side[1], spec = spec,
allowed_in_page_rule=True)}
% endfor
--- a/servo/components/style/properties/longhand/outline.mako.rs
+++ b/servo/components/style/properties/longhand/outline.mako.rs
@@ -7,17 +7,17 @@
<% data.new_style_struct("Outline",
inherited=False,
additional_methods=[Method("outline_has_nonzero_width", "bool")]) %>
// TODO(pcwalton): `invert`
${helpers.predefined_type("outline-color", "CSSColor", "computed::CSSColor::CurrentColor",
initial_specified_value="specified::CSSColor::currentcolor()",
- animation_value_type="normal", complex_color=True, need_clone=True,
+ animation_value_type="ComputedValue", complex_color=True, need_clone=True,
spec="https://drafts.csswg.org/css-ui/#propdef-outline-color")}
<%helpers:longhand name="outline-style" need_clone="True" animation_value_type="none"
spec="https://drafts.csswg.org/css-ui/#propdef-outline-style">
use std::fmt;
use style_traits::ToCss;
use values::specified::BorderStyle;
@@ -59,17 +59,17 @@
Err(())
} else {
Ok(result)
}
})
}
</%helpers:longhand>
-<%helpers:longhand name="outline-width" animation_value_type="normal"
+<%helpers:longhand name="outline-width" animation_value_type="ComputedValue"
spec="https://drafts.csswg.org/css-ui/#propdef-outline-width">
use app_units::Au;
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
impl ToCss for SpecifiedValue {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
@@ -123,10 +123,10 @@
${helpers.predefined_type("-moz-outline-radius-" + corner, "BorderRadiusSize",
"computed::BorderRadiusSize::zero()",
"parse", products="gecko",
boxed=True,
animation_value_type="none",
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius)")}
% endfor
-${helpers.predefined_type("outline-offset", "Length", "Au(0)", products="servo gecko", animation_value_type="normal",
+${helpers.predefined_type("outline-offset", "Length", "Au(0)", products="servo gecko", animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-ui/#propdef-outline-offset")}
--- a/servo/components/style/properties/longhand/padding.mako.rs
+++ b/servo/components/style/properties/longhand/padding.mako.rs
@@ -11,12 +11,12 @@
spec = "https://drafts.csswg.org/css-box/#propdef-padding-%s" % side[0]
if side[1]:
spec = "https://drafts.csswg.org/css-logical-props/#propdef-padding-%s" % side[1]
%>
${helpers.predefined_type("padding-%s" % side[0], "LengthOrPercentage",
"computed::LengthOrPercentage::Length(Au(0))",
"parse_non_negative",
alias=maybe_moz_logical_alias(product, side, "-moz-padding-%s"),
- animation_value_type="normal",
+ animation_value_type="ComputedValue",
logical = side[1],
spec = spec)}
% endfor
--- a/servo/components/style/properties/longhand/pointing.mako.rs
+++ b/servo/components/style/properties/longhand/pointing.mako.rs
@@ -172,11 +172,11 @@
gecko_inexhaustive=True,
animation_value_type="none",
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-user-focus)")}
${helpers.predefined_type("caret-color",
"ColorOrAuto",
"Either::Second(Auto)",
spec="https://drafts.csswg.org/css-ui/#caret-color",
- animation_value_type="normal",
+ animation_value_type="ComputedValue",
boxed=True,
products="gecko")}
--- a/servo/components/style/properties/longhand/position.mako.rs
+++ b/servo/components/style/properties/longhand/position.mako.rs
@@ -8,31 +8,31 @@
<% data.new_style_struct("Position", inherited=False) %>
// "top" / "left" / "bottom" / "right"
% for side in PHYSICAL_SIDES:
${helpers.predefined_type(side, "LengthOrPercentageOrAuto",
"computed::LengthOrPercentageOrAuto::Auto",
spec="https://www.w3.org/TR/CSS2/visuren.html#propdef-%s" % side,
- animation_value_type="normal")}
+ animation_value_type="ComputedValue")}
% endfor
// offset-* logical properties, map to "top" / "left" / "bottom" / "right"
% for side in LOGICAL_SIDES:
${helpers.predefined_type("offset-%s" % side, "LengthOrPercentageOrAuto",
"computed::LengthOrPercentageOrAuto::Auto",
spec="https://drafts.csswg.org/css-logical-props/#propdef-offset-%s" % side,
- animation_value_type="normal", logical=True)}
+ animation_value_type="ComputedValue", logical=True)}
% endfor
${helpers.predefined_type("z-index", "IntegerOrAuto",
"Either::Second(Auto)",
spec="https://www.w3.org/TR/CSS2/visuren.html#z-index",
flags="CREATES_STACKING_CONTEXT",
- animation_value_type="normal")}
+ animation_value_type="ComputedValue")}
// CSS Flexible Box Layout Module Level 1
// http://www.w3.org/TR/css3-flexbox/
// Flex container properties
${helpers.single_keyword("flex-direction", "row row-reverse column column-reverse",
spec="https://drafts.csswg.org/css-flexbox/#flex-direction-property",
@@ -91,23 +91,23 @@
animation_value_type="none")}
% endif
// Flex item properties
${helpers.predefined_type("flex-grow", "Number",
"0.0", "parse_non_negative",
spec="https://drafts.csswg.org/css-flexbox/#flex-grow-property",
extra_prefixes="webkit",
- animation_value_type="normal")}
+ animation_value_type="ComputedValue")}
${helpers.predefined_type("flex-shrink", "Number",
"1.0", "parse_non_negative",
spec="https://drafts.csswg.org/css-flexbox/#flex-shrink-property",
extra_prefixes="webkit",
- animation_value_type="normal")}
+ animation_value_type="ComputedValue")}
// https://drafts.csswg.org/css-align/#align-self-property
% if product == "servo":
// FIXME: Update Servo to support the same syntax as Gecko.
${helpers.single_keyword("align-self", "auto stretch flex-start flex-end center baseline",
need_clone=True,
extra_prefixes="webkit",
spec="https://drafts.csswg.org/css-flexbox/#propdef-align-self",
@@ -125,58 +125,58 @@
initial_value="specified::AlignJustifySelf::auto()",
spec="https://drafts.csswg.org/css-align/#justify-self-property",
animation_value_type="none")}
% endif
// https://drafts.csswg.org/css-flexbox/#propdef-order
${helpers.predefined_type("order", "Integer", "0",
extra_prefixes="webkit",
- animation_value_type="normal",
+ animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-flexbox/#order-property")}
// FIXME: Gecko doesn't support content value yet.
// FIXME: This property should be animatable.
${helpers.predefined_type("flex-basis",
"LengthOrPercentageOrAuto" if product == "gecko" else
"LengthOrPercentageOrAutoOrContent",
"computed::LengthOrPercentageOrAuto::Auto" if product == "gecko" else
"computed::LengthOrPercentageOrAutoOrContent::Auto",
"parse_non_negative",
spec="https://drafts.csswg.org/css-flexbox/#flex-basis-property",
extra_prefixes="webkit",
- animation_value_type="normal" if product == "gecko" else "none")}
+ animation_value_type="ComputedValue" if product == "gecko" else "none")}
% for (size, logical) in ALL_SIZES:
<%
spec = "https://drafts.csswg.org/css-box/#propdef-%s"
if logical:
spec = "https://drafts.csswg.org/css-logical-props/#propdef-%s"
%>
// width, height, block-size, inline-size
${helpers.predefined_type("%s" % size,
"LengthOrPercentageOrAuto",
"computed::LengthOrPercentageOrAuto::Auto",
"parse_non_negative",
spec=spec % size,
- animation_value_type="normal", logical = logical)}
+ animation_value_type="ComputedValue", logical = logical)}
% if product == "gecko":
% for min_max in ["min", "max"]:
<%
MinMax = min_max.title()
initial = "None" if "max" == min_max else "Auto"
%>
// min-width, min-height, min-block-size, min-inline-size,
// max-width, max-height, max-block-size, max-inline-size
//
// Keyword values are only valid in the inline direction; they must
// be replaced with auto/none in block.
<%helpers:longhand name="${min_max}-${size}" spec="${spec % ('%s-%s' % (min_max, size))}"
- animation_value_type="normal" logical="${logical}" predefined_type="${MinMax}Length">
+ animation_value_type="ComputedValue" logical="${logical}" predefined_type="${MinMax}Length">
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
use values::specified::${MinMax}Length;
impl HasViewportPercentage for SpecifiedValue {
fn has_viewport_percentage(&self) -> bool {
@@ -248,23 +248,23 @@
% endfor
% else:
// servo versions (no keyword support)
${helpers.predefined_type("min-%s" % size,
"LengthOrPercentage",
"computed::LengthOrPercentage::Length(Au(0))",
"parse_non_negative",
spec=spec % ("min-%s" % size),
- animation_value_type="normal", logical = logical)}
+ animation_value_type="ComputedValue", logical = logical)}
${helpers.predefined_type("max-%s" % size,
"LengthOrPercentageOrNone",
"computed::LengthOrPercentageOrNone::None",
"parse_non_negative",
spec=spec % ("min-%s" % size),
- animation_value_type="normal", logical = logical)}
+ animation_value_type="ComputedValue", logical = logical)}
% endif
% endfor
${helpers.single_keyword("box-sizing",
"content-box border-box",
extra_prefixes="moz webkit",
spec="https://drafts.csswg.org/css-ui/#propdef-box-sizing",
animation_value_type="none")}
@@ -274,24 +274,24 @@
spec="https://drafts.csswg.org/css-images/#propdef-object-fit")}
${helpers.predefined_type("object-position",
"Position",
"computed::Position::zero()",
products="gecko",
boxed="True",
spec="https://drafts.csswg.org/css-images-3/#the-object-position",
- animation_value_type="normal")}
+ animation_value_type="ComputedValue")}
% for kind in ["row", "column"]:
${helpers.predefined_type("grid-%s-gap" % kind,
"LengthOrPercentage",
"computed::LengthOrPercentage::Length(Au(0))",
spec="https://drafts.csswg.org/css-grid/#propdef-grid-%s-gap" % kind,
- animation_value_type="normal",
+ animation_value_type="ComputedValue",
products="gecko")}
% for range in ["start", "end"]:
${helpers.predefined_type("grid-%s-%s" % (kind, range),
"GridLine",
"Default::default()",
animation_value_type="none",
spec="https://drafts.csswg.org/css-grid/#propdef-grid-%s-%s" % (kind, range),
--- a/servo/components/style/properties/longhand/svg.mako.rs
+++ b/servo/components/style/properties/longhand/svg.mako.rs
@@ -108,17 +108,17 @@
}
#[inline]
pub fn get_initial_specified_value() -> SpecifiedValue {
SpecifiedValue::Other(RepeatKeyword::NoRepeat, None)
}
</%helpers:vector_longhand>
-<%helpers:vector_longhand name="mask-position-x" products="gecko" animation_value_type="normal" extra_prefixes="webkit"
+<%helpers:vector_longhand name="mask-position-x" products="gecko" animation_value_type="ComputedValue" extra_prefixes="webkit"
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-position">
pub use properties::longhands::background_position_x::single_value::get_initial_value;
pub use properties::longhands::background_position_x::single_value::get_initial_position_value;
pub use properties::longhands::background_position_x::single_value::get_initial_specified_value;
pub use properties::longhands::background_position_x::single_value::parse;
pub use properties::longhands::background_position_x::single_value::SpecifiedValue;
pub use properties::longhands::background_position_x::single_value::computed_value;
use properties::animated_properties::{ComputeDistance, Interpolate, RepeatableListInterpolate};
@@ -136,17 +136,17 @@
impl ComputeDistance for MaskPositionX {
#[inline]
fn compute_distance(&self, _other: &Self) -> Result<f64, ()> {
Err(())
}
}
</%helpers:vector_longhand>
-<%helpers:vector_longhand name="mask-position-y" products="gecko" animation_value_type="normal" extra_prefixes="webkit"
+<%helpers:vector_longhand name="mask-position-y" products="gecko" animation_value_type="ComputedValue" extra_prefixes="webkit"
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-position">
pub use properties::longhands::background_position_y::single_value::get_initial_value;
pub use properties::longhands::background_position_y::single_value::get_initial_position_value;
pub use properties::longhands::background_position_y::single_value::get_initial_specified_value;
pub use properties::longhands::background_position_y::single_value::parse;
pub use properties::longhands::background_position_y::single_value::SpecifiedValue;
pub use properties::longhands::background_position_y::single_value::computed_value;
use properties::animated_properties::{ComputeDistance, Interpolate, RepeatableListInterpolate};
@@ -182,17 +182,17 @@
"border-box content-box padding-box",
extra_gecko_values="fill-box stroke-box view-box",
vector=True,
products="gecko",
extra_prefixes="webkit",
animation_value_type="none",
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-origin")}
-<%helpers:longhand name="mask-size" products="gecko" animation_value_type="normal" extra_prefixes="webkit"
+<%helpers:longhand name="mask-size" products="gecko" animation_value_type="ComputedValue" extra_prefixes="webkit"
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-size">
use properties::longhands::background_size;
pub use ::properties::longhands::background_size::SpecifiedValue;
pub use ::properties::longhands::background_size::single_value as single_value;
pub use ::properties::longhands::background_size::computed_value as computed_value;
#[inline]
pub fn get_initial_value() -> computed_value::T {
--- a/servo/components/style/properties/longhand/text.mako.rs
+++ b/servo/components/style/properties/longhand/text.mako.rs
@@ -223,17 +223,17 @@
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-style")}
${helpers.predefined_type(
"text-decoration-color", "CSSColor",
"computed::CSSColor::CurrentColor",
initial_specified_value="specified::CSSColor::currentcolor()",
complex_color=True,
products="gecko",
- animation_value_type="normal",
+ animation_value_type="ComputedValue",
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-color")}
<%helpers:longhand name="initial-letter"
animation_value_type="none"
products="gecko"
spec="https://drafts.csswg.org/css-inline/#sizing-drop-initials">
use std::fmt;
use style_traits::ToCss;