mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
Bug 1374233 - Part 6: Add PositiveInteger and PositiveIntegerOrAuto for column-count.
column-count should be a positive integer or auto. MozReview-Commit-ID: 9LFvrYo8De5
This commit is contained in:
parent
190cd5b952
commit
9d69cb2866
7 changed files with 49 additions and 9 deletions
|
@ -5423,8 +5423,8 @@ clip-path
|
|||
use gecko_bindings::structs::{NS_STYLE_COLUMN_COUNT_AUTO, nsStyleColumn_kMaxColumnCount};
|
||||
|
||||
self.gecko.mColumnCount = match v {
|
||||
Either::First(number) => unsafe {
|
||||
cmp::min(number as u32, nsStyleColumn_kMaxColumnCount)
|
||||
Either::First(integer) => unsafe {
|
||||
cmp::min(integer.0 as u32, nsStyleColumn_kMaxColumnCount)
|
||||
},
|
||||
Either::Second(Auto) => NS_STYLE_COLUMN_COUNT_AUTO
|
||||
};
|
||||
|
@ -5437,7 +5437,7 @@ clip-path
|
|||
if self.gecko.mColumnCount != NS_STYLE_COLUMN_COUNT_AUTO {
|
||||
debug_assert!((self.gecko.mColumnCount as i32) >= 0 &&
|
||||
(self.gecko.mColumnCount as i32) < i32::max_value());
|
||||
Either::First(self.gecko.mColumnCount as i32)
|
||||
Either::First((self.gecko.mColumnCount as i32).into())
|
||||
} else {
|
||||
Either::Second(Auto)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue