mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Introduce enum CounterBound for the bounds in counter_style::Ranges
This commit is contained in:
parent
e3f69668ae
commit
0b3a5b42ba
2 changed files with 28 additions and 11 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
use byteorder::{BigEndian, WriteBytesExt};
|
||||
use computed_values::{font_stretch, font_style, font_weight};
|
||||
use counter_style;
|
||||
use counter_style::{self, CounterBound};
|
||||
use cssparser::UnicodeRange;
|
||||
use font_face::{FontFaceRuleData, Source, FontDisplay, FontWeight};
|
||||
use gecko_bindings::bindings;
|
||||
|
@ -324,8 +324,8 @@ impl ToNsCssValue for counter_style::Ranges {
|
|||
nscssvalue.set_auto();
|
||||
} else {
|
||||
nscssvalue.set_pair_list(self.0.into_iter().map(|range| {
|
||||
fn set_bound(bound: Option<i32>, nscssvalue: &mut nsCSSValue) {
|
||||
if let Some(finite) = bound {
|
||||
fn set_bound(bound: CounterBound, nscssvalue: &mut nsCSSValue) {
|
||||
if let CounterBound::Integer(finite) = bound {
|
||||
nscssvalue.set_integer(finite)
|
||||
} else {
|
||||
nscssvalue.set_enum(structs::NS_STYLE_COUNTER_RANGE_INFINITE as i32)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue