aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmltableelement.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-12-07 23:01:35 -0800
committerPatrick Walton <pcwalton@mimiga.net>2014-12-15 17:41:51 -0800
commit56b78de5bce995198fbeb41adc58d7625ec93372 (patch)
tree3267aae2b7b71c577accf5307eb2a1fa707dbd05 /components/script/dom/htmltableelement.rs
parent14bafb11bec973cd1362ff38a8e4aa2385c6ff37 (diff)
downloadservo-56b78de5bce995198fbeb41adc58d7625ec93372.tar.gz
servo-56b78de5bce995198fbeb41adc58d7625ec93372.zip
style: Implement basic column spans.
This patch provides some of the groundwork for column spans greater than 1. It implements the column-span CSS property (prefixed so as not to be exposed to content) as well as the corresponding colspan attribute; although the former is not well-specified outside of CSS multi-column layout, INTRINSIC refers to it. Although width is distributed to spanning columns, they do not yet contribute minimum and preferred widths; this will be implemented in a follow-up. Additionally, this patch cleans up some miscellaneous formatting issues and improves the handling of table rowgroups.
Diffstat (limited to 'components/script/dom/htmltableelement.rs')
-rw-r--r--components/script/dom/htmltableelement.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/components/script/dom/htmltableelement.rs b/components/script/dom/htmltableelement.rs
index 4ece4c8b9f9..d88017fe151 100644
--- a/components/script/dom/htmltableelement.rs
+++ b/components/script/dom/htmltableelement.rs
@@ -108,6 +108,7 @@ impl HTMLTableElementHelpers for HTMLTableElement {
fn get_border(&self) -> Option<u32> {
self.border.get()
}
+
fn get_width(&self) -> LengthOrPercentageOrAuto {
self.width.get()
}
@@ -135,6 +136,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLTableElement> {
.as_slice()
.chars()).unwrap_or(1)))
}
+ &atom!("width") => self.width.set(str::parse_length(attr.value().as_slice())),
_ => ()
}
}
@@ -148,6 +150,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLTableElement> {
match attr.local_name() {
&atom!("bgcolor") => self.background_color.set(None),
&atom!("border") => self.border.set(None),
+ &atom!("width") => self.width.set(AutoLpa),
_ => ()
}
}