mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #19529 - DonatJR:counter-reset-out-of-mako, r=emilio
style: moved css longhand counter-reset out of mako <!-- Please describe your changes on the following line: --> This is a sub-PR of #19015 Code does not yet compile with `build-geckolib`. r? emilio --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #19387 <!-- Either: --> - [x] These changes do not require tests <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19529) <!-- Reviewable:end -->
This commit is contained in:
commit
38ef515463
11 changed files with 240 additions and 151 deletions
|
@ -1035,8 +1035,8 @@ impl BaseFlow {
|
|||
}
|
||||
}
|
||||
|
||||
if !style.get_counters().counter_reset.0.is_empty() ||
|
||||
!style.get_counters().counter_increment.0.is_empty() {
|
||||
if !style.get_counters().counter_reset.get_values().is_empty() ||
|
||||
!style.get_counters().counter_increment.get_values().is_empty() {
|
||||
flags.insert(FlowFlags::AFFECTS_COUNTERS)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -272,7 +272,7 @@ impl<'a, 'b> ResolveGeneratedContentFragmentMutator<'a, 'b> {
|
|||
}
|
||||
self.traversal.list_item.truncate_to_level(self.level);
|
||||
|
||||
for &(ref counter_name, value) in &fragment.style().get_counters().counter_reset.0 {
|
||||
for &(ref counter_name, value) in fragment.style().get_counters().counter_reset.get_values() {
|
||||
let counter_name = &*counter_name.0;
|
||||
if let Some(ref mut counter) = self.traversal.counters.get_mut(counter_name) {
|
||||
counter.reset(self.level, value);
|
||||
|
@ -284,7 +284,7 @@ impl<'a, 'b> ResolveGeneratedContentFragmentMutator<'a, 'b> {
|
|||
self.traversal.counters.insert(counter_name.to_owned(), counter);
|
||||
}
|
||||
|
||||
for &(ref counter_name, value) in &fragment.style().get_counters().counter_increment.0 {
|
||||
for &(ref counter_name, value) in fragment.style().get_counters().counter_increment.get_values() {
|
||||
let counter_name = &*counter_name.0;
|
||||
if let Some(ref mut counter) = self.traversal.counters.get_mut(counter_name) {
|
||||
counter.increment(self.level, value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue