mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Use u32 for TableColumnFragmentInfo::span.
This commit is contained in:
parent
6d7dead4ef
commit
3dd3ad728e
2 changed files with 3 additions and 3 deletions
|
@ -672,7 +672,7 @@ impl UnscannedTextFragmentInfo {
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
pub struct TableColumnFragmentInfo {
|
pub struct TableColumnFragmentInfo {
|
||||||
/// the number of columns a <col> element should span
|
/// the number of columns a <col> element should span
|
||||||
pub span: int,
|
pub span: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TableColumnFragmentInfo {
|
impl TableColumnFragmentInfo {
|
||||||
|
@ -681,7 +681,7 @@ impl TableColumnFragmentInfo {
|
||||||
let span = {
|
let span = {
|
||||||
let element = node.as_element();
|
let element = node.as_element();
|
||||||
element.get_attr(&ns!(""), &atom!("span")).and_then(|string| {
|
element.get_attr(&ns!(""), &atom!("span")).and_then(|string| {
|
||||||
let n: Option<int> = FromStr::from_str(string).ok();
|
let n: Option<u32> = FromStr::from_str(string).ok();
|
||||||
n
|
n
|
||||||
}).unwrap_or(0)
|
}).unwrap_or(0)
|
||||||
};
|
};
|
||||||
|
|
|
@ -69,7 +69,7 @@ impl Flow for TableColGroupFlow {
|
||||||
for fragment in self.cols.iter() {
|
for fragment in self.cols.iter() {
|
||||||
// Retrieve the specified value from the appropriate CSS property.
|
// Retrieve the specified value from the appropriate CSS property.
|
||||||
let inline_size = fragment.style().content_inline_size();
|
let inline_size = fragment.style().content_inline_size();
|
||||||
let span: int = match fragment.specific {
|
let span = match fragment.specific {
|
||||||
SpecificFragmentInfo::TableColumn(col_fragment) => max(col_fragment.span, 1),
|
SpecificFragmentInfo::TableColumn(col_fragment) => max(col_fragment.span, 1),
|
||||||
_ => panic!("non-table-column fragment inside table column?!"),
|
_ => panic!("non-table-column fragment inside table column?!"),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue