mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
style: Implement the counter-set property.
Bug: 1518201 Reviewed-by: emilio
This commit is contained in:
parent
14b176019c
commit
4b4b5b6a1d
7 changed files with 27 additions and 18 deletions
|
@ -4559,7 +4559,7 @@ clip-path
|
|||
</%self:impl_trait>
|
||||
|
||||
<%self:impl_trait style_struct_name="Counters"
|
||||
skip_longhands="content counter-increment counter-reset">
|
||||
skip_longhands="content counter-increment counter-reset counter-set">
|
||||
pub fn ineffective_content_property(&self) -> bool {
|
||||
self.gecko.mContents.is_empty()
|
||||
}
|
||||
|
@ -4788,7 +4788,7 @@ clip-path
|
|||
)
|
||||
}
|
||||
|
||||
% for counter_property in ["Increment", "Reset"]:
|
||||
% for counter_property in ["Increment", "Reset", "Set"]:
|
||||
pub fn set_counter_${counter_property.lower()}(
|
||||
&mut self,
|
||||
v: longhands::counter_${counter_property.lower()}::computed_value::T
|
||||
|
|
|
@ -27,9 +27,18 @@ ${helpers.predefined_type(
|
|||
|
||||
${helpers.predefined_type(
|
||||
"counter-reset",
|
||||
"CounterReset",
|
||||
"CounterSetOrReset",
|
||||
initial_value="Default::default()",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-lists-3/#propdef-counter-reset",
|
||||
servo_restyle_damage="rebuild_and_reflow",
|
||||
)}
|
||||
|
||||
${helpers.predefined_type(
|
||||
"counter-set",
|
||||
"CounterSetOrReset",
|
||||
initial_value="Default::default()",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-lists-3/#propdef-counter-set",
|
||||
servo_restyle_damage="rebuild_and_reflow",
|
||||
)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue