mirror of
https://github.com/servo/servo.git
synced 2025-06-12 10:24:43 +00:00
Accept zero values on some width
/height
attributes on table elements (#33425)
We were incorrectly using `AttrValue::from_nonzero_dimension` to parse some attributes, instead of `AttrValue::from_dimension`. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
4839cdf176
commit
b048bf80a4
7 changed files with 4 additions and 35 deletions
|
@ -101,7 +101,7 @@ impl VirtualMethods for HTMLTableColElement {
|
|||
}
|
||||
attr
|
||||
},
|
||||
local_name!("width") => AttrValue::from_nonzero_dimension(value.into()),
|
||||
local_name!("width") => AttrValue::from_dimension(value.into()),
|
||||
_ => self
|
||||
.super_type()
|
||||
.unwrap()
|
||||
|
|
|
@ -521,7 +521,7 @@ impl VirtualMethods for HTMLTableElement {
|
|||
match *local_name {
|
||||
local_name!("border") => AttrValue::from_u32(value.into(), 1),
|
||||
local_name!("width") => AttrValue::from_nonzero_dimension(value.into()),
|
||||
local_name!("height") => AttrValue::from_nonzero_dimension(value.into()),
|
||||
local_name!("height") => AttrValue::from_dimension(value.into()),
|
||||
local_name!("bgcolor") => AttrValue::from_legacy_color(value.into()),
|
||||
_ => self
|
||||
.super_type()
|
||||
|
|
|
@ -182,7 +182,7 @@ impl VirtualMethods for HTMLTableRowElement {
|
|||
fn parse_plain_attribute(&self, local_name: &LocalName, value: DOMString) -> AttrValue {
|
||||
match *local_name {
|
||||
local_name!("bgcolor") => AttrValue::from_legacy_color(value.into()),
|
||||
local_name!("height") => AttrValue::from_nonzero_dimension(value.into()),
|
||||
local_name!("height") => AttrValue::from_dimension(value.into()),
|
||||
_ => self
|
||||
.super_type()
|
||||
.unwrap()
|
||||
|
|
|
@ -120,7 +120,7 @@ impl VirtualMethods for HTMLTableSectionElement {
|
|||
fn parse_plain_attribute(&self, local_name: &LocalName, value: DOMString) -> AttrValue {
|
||||
match *local_name {
|
||||
local_name!("bgcolor") => AttrValue::from_legacy_color(value.into()),
|
||||
local_name!("height") => AttrValue::from_nonzero_dimension(value.into()),
|
||||
local_name!("height") => AttrValue::from_dimension(value.into()),
|
||||
_ => self
|
||||
.super_type()
|
||||
.unwrap()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue