mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Simplify counter CSS properties
This commit is contained in:
parent
2f8cd0fe22
commit
df11a7fec7
7 changed files with 120 additions and 186 deletions
|
@ -5669,9 +5669,8 @@ clip-path
|
|||
v: longhands::counter_${counter_property.lower()}::computed_value::T
|
||||
) {
|
||||
unsafe {
|
||||
bindings::Gecko_ClearAndResizeCounter${counter_property}s(&mut self.gecko,
|
||||
v.get_values().len() as u32);
|
||||
for (i, &(ref name, value)) in v.get_values().into_iter().enumerate() {
|
||||
bindings::Gecko_ClearAndResizeCounter${counter_property}s(&mut self.gecko, v.len() as u32);
|
||||
for (i, &(ref name, value)) in v.iter().enumerate() {
|
||||
self.gecko.m${counter_property}s[i].mCounter.assign(name.0.as_slice());
|
||||
self.gecko.m${counter_property}s[i].mValue = value;
|
||||
}
|
||||
|
|
|
@ -236,14 +236,18 @@
|
|||
}
|
||||
</%helpers:longhand>
|
||||
|
||||
${helpers.predefined_type("counter-increment",
|
||||
"CounterIncrement",
|
||||
initial_value="computed::CounterIncrement::none()",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-lists/#propdef-counter-increment")}
|
||||
${helpers.predefined_type(
|
||||
"counter-increment",
|
||||
"CounterIncrement",
|
||||
initial_value="Default::default()",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-lists/#propdef-counter-increment",
|
||||
)}
|
||||
|
||||
${helpers.predefined_type("counter-reset",
|
||||
"CounterReset",
|
||||
initial_value="computed::CounterReset::none()",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-lists-3/#propdef-counter-reset")}
|
||||
${helpers.predefined_type(
|
||||
"counter-reset",
|
||||
"CounterReset",
|
||||
initial_value="Default::default()",
|
||||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-lists-3/#propdef-counter-reset",
|
||||
)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue