style: Move clear property out of gecko.mako.rs

Differential Revision: https://phabricator.services.mozilla.com/D158225
This commit is contained in:
Ting-Yu Lin 2022-09-29 03:40:56 +00:00 committed by Martin Robinson
parent f4e10192ca
commit fea3f9fbc1
4 changed files with 4 additions and 10 deletions

View file

@ -1127,7 +1127,7 @@ fn static_assert() {
${impl_copy_animation_value(ident, gecko_ffi_name)} ${impl_copy_animation_value(ident, gecko_ffi_name)}
</%def> </%def>
<% skip_box_longhands= """display clear""" %> <% skip_box_longhands= """display""" %>
<%self:impl_trait style_struct_name="Box" skip_longhands="${skip_box_longhands}"> <%self:impl_trait style_struct_name="Box" skip_longhands="${skip_box_longhands}">
#[inline] #[inline]
pub fn set_display(&mut self, v: longhands::display::computed_value::T) { pub fn set_display(&mut self, v: longhands::display::computed_value::T) {
@ -1159,13 +1159,6 @@ fn static_assert() {
pub fn clone_display(&self) -> longhands::display::computed_value::T { pub fn clone_display(&self) -> longhands::display::computed_value::T {
self.gecko.mDisplay self.gecko.mDisplay
} }
<% clear_keyword = Keyword(
"clear",
"Left Right None Both",
gecko_enum_prefix="StyleClear",
) %>
${impl_keyword('clear', 'mBreakType', clear_keyword)}
</%self:impl_trait> </%self:impl_trait>
<%def name="simple_image_array_property(name, shorthand, field_name)"> <%def name="simple_image_array_property(name, shorthand, field_name)">

View file

@ -80,7 +80,7 @@ ${helpers.predefined_type(
engines="gecko servo", engines="gecko servo",
animation_value_type="discrete", animation_value_type="discrete",
gecko_ffi_name="mBreakType", gecko_ffi_name="mBreakType",
spec="https://drafts.csswg.org/css-box/#propdef-clear", spec="https://drafts.csswg.org/css2/#propdef-clear",
servo_restyle_damage="rebuild_and_reflow", servo_restyle_damage="rebuild_and_reflow",
)} )}

View file

@ -152,6 +152,7 @@ impl ToComputedValue for SpecifiedFloat {
ToResolvedValue, ToResolvedValue,
)] )]
/// A computed value for the `clear` property. /// A computed value for the `clear` property.
#[repr(u8)]
pub enum Clear { pub enum Clear {
None, None,
Left, Left,

View file

@ -1684,7 +1684,7 @@ pub enum Float {
#[derive( #[derive(
Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem, Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem,
)] )]
/// https://drafts.csswg.org/css-box/#propdef-clear /// https://drafts.csswg.org/css2/#propdef-clear
pub enum Clear { pub enum Clear {
None, None,
Left, Left,