aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/element.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r--components/script/dom/element.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index d9831d79a69..4a94f345b02 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -324,6 +324,8 @@ pub trait LayoutElementHelpers {
#[allow(unsafe_code)]
unsafe fn get_colspan(self) -> u32;
#[allow(unsafe_code)]
+ unsafe fn get_rowspan(self) -> u32;
+ #[allow(unsafe_code)]
unsafe fn html_element_in_html_document_for_layout(&self) -> bool;
fn id_attribute(&self) -> *const Option<Atom>;
fn style_attribute(&self) -> *const Option<Arc<RwLock<PropertyDeclarationBlock>>>;
@@ -627,6 +629,17 @@ impl LayoutElementHelpers for LayoutJS<Element> {
}
}
+ #[allow(unsafe_code)]
+ unsafe fn get_rowspan(self) -> u32 {
+ if let Some(this) = self.downcast::<HTMLTableCellElement>() {
+ this.get_rowspan().unwrap_or(1)
+ } else {
+ // Don't panic since `display` can cause this to be called on arbitrary
+ // elements.
+ 1
+ }
+ }
+
#[inline]
#[allow(unsafe_code)]
unsafe fn html_element_in_html_document_for_layout(&self) -> bool {