Introduce a get_colspan method on LayoutJS<Element>.

This commit is contained in:
Ms2ger 2015-11-14 21:18:45 +01:00
parent 8f2a3a64f1
commit 5417df6397
3 changed files with 20 additions and 3 deletions

View file

@ -20,7 +20,6 @@ use model::MaybeAuto;
use std::fmt;
use std::sync::Arc;
use style::computed_values::{border_collapse, border_top_style};
use style::legacy::UnsignedIntegerAttribute;
use style::properties::ComputedValues;
use table::InternalTable;
use table_row::{CollapsedBorder, CollapsedBorderProvenance};
@ -52,8 +51,7 @@ impl TableCellFlow {
TableCellFlow {
block_flow: BlockFlow::from_fragment(fragment, None),
collapsed_borders: CollapsedBordersForCell::new(),
column_span: node.get_unsigned_integer_attribute(UnsignedIntegerAttribute::ColSpan)
.unwrap_or(1),
column_span: node.get_colspan(),
visible: visible,
}
}

View file

@ -1039,6 +1039,12 @@ impl<'ln> ThreadSafeLayoutNode<'ln> {
iframe_element.pipeline_id().unwrap()
}
}
pub fn get_colspan(&self) -> u32 {
unsafe {
self.get_jsmanaged().downcast::<Element>().unwrap().get_colspan()
}
}
}
pub struct ThreadSafeLayoutNodeChildrenIterator<'a> {