mirror of
https://github.com/servo/servo.git
synced 2025-06-21 07:38:59 +01:00
Remove complex_color parameter.
This commit is contained in:
parent
7568a19688
commit
742c45f859
7 changed files with 14 additions and 21 deletions
|
@ -148,7 +148,7 @@ class Longhand(object):
|
||||||
def __init__(self, style_struct, name, spec=None, animation_value_type=None, derived_from=None, keyword=None,
|
def __init__(self, style_struct, name, spec=None, animation_value_type=None, derived_from=None, keyword=None,
|
||||||
predefined_type=None, custom_cascade=False, experimental=False, internal=False,
|
predefined_type=None, custom_cascade=False, experimental=False, internal=False,
|
||||||
need_clone=False, need_index=False, gecko_ffi_name=None, depend_on_viewport_size=False,
|
need_clone=False, need_index=False, gecko_ffi_name=None, depend_on_viewport_size=False,
|
||||||
allowed_in_keyframe_block=True, complex_color=False, cast_type='u8',
|
allowed_in_keyframe_block=True, cast_type='u8',
|
||||||
has_uncacheable_values=False, logical=False, alias=None, extra_prefixes=None, boxed=False,
|
has_uncacheable_values=False, logical=False, alias=None, extra_prefixes=None, boxed=False,
|
||||||
flags=None, allowed_in_page_rule=False, allow_quirks=False, ignored_when_colors_disabled=False,
|
flags=None, allowed_in_page_rule=False, allow_quirks=False, ignored_when_colors_disabled=False,
|
||||||
vector=False):
|
vector=False):
|
||||||
|
@ -169,7 +169,6 @@ class Longhand(object):
|
||||||
self.gecko_ffi_name = gecko_ffi_name or "m" + self.camel_case
|
self.gecko_ffi_name = gecko_ffi_name or "m" + self.camel_case
|
||||||
self.depend_on_viewport_size = depend_on_viewport_size
|
self.depend_on_viewport_size = depend_on_viewport_size
|
||||||
self.derived_from = (derived_from or "").split()
|
self.derived_from = (derived_from or "").split()
|
||||||
self.complex_color = complex_color
|
|
||||||
self.cast_type = cast_type
|
self.cast_type = cast_type
|
||||||
self.logical = arg_to_bool(logical)
|
self.logical = arg_to_bool(logical)
|
||||||
self.alias = alias.split() if alias else []
|
self.alias = alias.split() if alias else []
|
||||||
|
|
|
@ -315,7 +315,7 @@ def set_gecko_property(ffi_name, expr):
|
||||||
}
|
}
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="impl_color_setter(ident, gecko_ffi_name, complex_color=True)">
|
<%def name="impl_color_setter(ident, gecko_ffi_name)">
|
||||||
#[allow(unreachable_code)]
|
#[allow(unreachable_code)]
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
pub fn set_${ident}(&mut self, v: longhands::${ident}::computed_value::T) {
|
pub fn set_${ident}(&mut self, v: longhands::${ident}::computed_value::T) {
|
||||||
|
@ -323,7 +323,7 @@ def set_gecko_property(ffi_name, expr):
|
||||||
}
|
}
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="impl_color_copy(ident, gecko_ffi_name, complex_color=True)">
|
<%def name="impl_color_copy(ident, gecko_ffi_name)">
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
pub fn copy_${ident}_from(&mut self, other: &Self) {
|
pub fn copy_${ident}_from(&mut self, other: &Self) {
|
||||||
let color = ${get_gecko_property(gecko_ffi_name, self_param = "other")};
|
let color = ${get_gecko_property(gecko_ffi_name, self_param = "other")};
|
||||||
|
@ -331,7 +331,7 @@ def set_gecko_property(ffi_name, expr):
|
||||||
}
|
}
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="impl_color_clone(ident, gecko_ffi_name, complex_color=True)">
|
<%def name="impl_color_clone(ident, gecko_ffi_name)">
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T {
|
pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T {
|
||||||
${get_gecko_property(gecko_ffi_name)}.into()
|
${get_gecko_property(gecko_ffi_name)}.into()
|
||||||
|
@ -386,11 +386,11 @@ def set_gecko_property(ffi_name, expr):
|
||||||
% endif
|
% endif
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="impl_color(ident, gecko_ffi_name, need_clone=False, complex_color=True)">
|
<%def name="impl_color(ident, gecko_ffi_name, need_clone=False)">
|
||||||
<%call expr="impl_color_setter(ident, gecko_ffi_name, complex_color)"></%call>
|
<%call expr="impl_color_setter(ident, gecko_ffi_name)"></%call>
|
||||||
<%call expr="impl_color_copy(ident, gecko_ffi_name, complex_color)"></%call>
|
<%call expr="impl_color_copy(ident, gecko_ffi_name)"></%call>
|
||||||
% if need_clone:
|
% if need_clone:
|
||||||
<%call expr="impl_color_clone(ident, gecko_ffi_name, complex_color)"></%call>
|
<%call expr="impl_color_clone(ident, gecko_ffi_name)"></%call>
|
||||||
% endif
|
% endif
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
|
@ -408,7 +408,7 @@ def set_gecko_property(ffi_name, expr):
|
||||||
% endif
|
% endif
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
<%def name="impl_svg_paint(ident, gecko_ffi_name, need_clone=False, complex_color=True)">
|
<%def name="impl_svg_paint(ident, gecko_ffi_name, need_clone=False)">
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
pub fn set_${ident}(&mut self, mut v: longhands::${ident}::computed_value::T) {
|
pub fn set_${ident}(&mut self, mut v: longhands::${ident}::computed_value::T) {
|
||||||
use values::generics::SVGPaintKind;
|
use values::generics::SVGPaintKind;
|
||||||
|
|
|
@ -11,7 +11,6 @@ ${helpers.predefined_type("background-color", "Color",
|
||||||
initial_specified_value="SpecifiedValue::transparent()",
|
initial_specified_value="SpecifiedValue::transparent()",
|
||||||
spec="https://drafts.csswg.org/css-backgrounds/#background-color",
|
spec="https://drafts.csswg.org/css-backgrounds/#background-color",
|
||||||
animation_value_type="IntermediateColor",
|
animation_value_type="IntermediateColor",
|
||||||
complex_color=True,
|
|
||||||
ignored_when_colors_disabled=True,
|
ignored_when_colors_disabled=True,
|
||||||
allow_quirks=True)}
|
allow_quirks=True)}
|
||||||
|
|
||||||
|
|
|
@ -55,8 +55,7 @@ ${helpers.predefined_type("column-rule-color", "Color",
|
||||||
"::cssparser::Color::CurrentColor",
|
"::cssparser::Color::CurrentColor",
|
||||||
initial_specified_value="specified::Color::currentcolor()",
|
initial_specified_value="specified::Color::currentcolor()",
|
||||||
products="gecko", animation_value_type="IntermediateColor", extra_prefixes="moz",
|
products="gecko", animation_value_type="IntermediateColor", extra_prefixes="moz",
|
||||||
complex_color=True, need_clone=True,
|
need_clone=True, ignored_when_colors_disabled=True,
|
||||||
ignored_when_colors_disabled=True,
|
|
||||||
spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule-color")}
|
spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule-color")}
|
||||||
|
|
||||||
${helpers.single_keyword("column-span", "none all",
|
${helpers.single_keyword("column-span", "none all",
|
||||||
|
|
|
@ -689,8 +689,7 @@ ${helpers.predefined_type("text-emphasis-color", "Color",
|
||||||
"::cssparser::Color::CurrentColor",
|
"::cssparser::Color::CurrentColor",
|
||||||
initial_specified_value="specified::Color::currentcolor()",
|
initial_specified_value="specified::Color::currentcolor()",
|
||||||
products="gecko", animation_value_type="IntermediateColor",
|
products="gecko", animation_value_type="IntermediateColor",
|
||||||
complex_color=True, need_clone=True,
|
need_clone=True, ignored_when_colors_disabled=True,
|
||||||
ignored_when_colors_disabled=True,
|
|
||||||
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-emphasis-color")}
|
spec="https://drafts.csswg.org/css-text-decor/#propdef-text-emphasis-color")}
|
||||||
|
|
||||||
|
|
||||||
|
@ -708,8 +707,7 @@ ${helpers.predefined_type(
|
||||||
"-webkit-text-fill-color", "Color",
|
"-webkit-text-fill-color", "Color",
|
||||||
"CSSParserColor::CurrentColor",
|
"CSSParserColor::CurrentColor",
|
||||||
products="gecko", animation_value_type="IntermediateColor",
|
products="gecko", animation_value_type="IntermediateColor",
|
||||||
complex_color=True, need_clone=True,
|
need_clone=True, ignored_when_colors_disabled=True,
|
||||||
ignored_when_colors_disabled=True,
|
|
||||||
spec="https://compat.spec.whatwg.org/#the-webkit-text-fill-color")}
|
spec="https://compat.spec.whatwg.org/#the-webkit-text-fill-color")}
|
||||||
|
|
||||||
${helpers.predefined_type(
|
${helpers.predefined_type(
|
||||||
|
@ -717,8 +715,7 @@ ${helpers.predefined_type(
|
||||||
"CSSParserColor::CurrentColor",
|
"CSSParserColor::CurrentColor",
|
||||||
initial_specified_value="specified::Color::currentcolor()",
|
initial_specified_value="specified::Color::currentcolor()",
|
||||||
products="gecko", animation_value_type="IntermediateColor",
|
products="gecko", animation_value_type="IntermediateColor",
|
||||||
complex_color=True, need_clone=True,
|
need_clone=True, ignored_when_colors_disabled=True,
|
||||||
ignored_when_colors_disabled=True,
|
|
||||||
spec="https://compat.spec.whatwg.org/#the-webkit-text-stroke-color")}
|
spec="https://compat.spec.whatwg.org/#the-webkit-text-stroke-color")}
|
||||||
|
|
||||||
${helpers.predefined_type("-webkit-text-stroke-width",
|
${helpers.predefined_type("-webkit-text-stroke-width",
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
// TODO(pcwalton): `invert`
|
// TODO(pcwalton): `invert`
|
||||||
${helpers.predefined_type("outline-color", "Color", "computed::Color::CurrentColor",
|
${helpers.predefined_type("outline-color", "Color", "computed::Color::CurrentColor",
|
||||||
initial_specified_value="specified::Color::currentcolor()",
|
initial_specified_value="specified::Color::currentcolor()",
|
||||||
animation_value_type="IntermediateColor", complex_color=True, need_clone=True,
|
animation_value_type="IntermediateColor", need_clone=True,
|
||||||
ignored_when_colors_disabled=True,
|
ignored_when_colors_disabled=True,
|
||||||
spec="https://drafts.csswg.org/css-ui/#propdef-outline-color")}
|
spec="https://drafts.csswg.org/css-ui/#propdef-outline-color")}
|
||||||
|
|
||||||
|
|
|
@ -281,7 +281,6 @@ ${helpers.predefined_type(
|
||||||
"text-decoration-color", "Color",
|
"text-decoration-color", "Color",
|
||||||
"computed::Color::CurrentColor",
|
"computed::Color::CurrentColor",
|
||||||
initial_specified_value="specified::Color::currentcolor()",
|
initial_specified_value="specified::Color::currentcolor()",
|
||||||
complex_color=True,
|
|
||||||
products="gecko",
|
products="gecko",
|
||||||
animation_value_type="IntermediateColor",
|
animation_value_type="IntermediateColor",
|
||||||
ignored_when_colors_disabled=True,
|
ignored_when_colors_disabled=True,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue