mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
script: Remove the quirk of flooring rowSpan by 1 (#37831)
Only Firefox has this quirk, Chrome and Safari don't. So it's simpler to just remove it. Testing: tested by WPT Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
94f35ba998
commit
da364f7a61
3 changed files with 8 additions and 14 deletions
|
@ -7,7 +7,6 @@ use html5ever::{LocalName, Prefix, local_name, ns};
|
|||
use js::rust::HandleObject;
|
||||
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
|
||||
use style::color::AbsoluteColor;
|
||||
use style::context::QuirksMode;
|
||||
|
||||
use super::attr::Attr;
|
||||
use super::element::AttributeMutation;
|
||||
|
@ -208,13 +207,8 @@ impl VirtualMethods for HTMLTableCellElement {
|
|||
// From <https://html.spec.whatwg.org/multipage/#dom-tdth-rowspan>:
|
||||
// > The rowSpan IDL attribute must reflect the rowspan content attribute. It is clamped to
|
||||
// > the range [0, 65534], and its default value is 1.
|
||||
// Note that rowspan = 0 is not supported in quirks mode.
|
||||
let document = self.upcast::<Node>().owner_doc();
|
||||
if document.quirks_mode() == QuirksMode::Quirks {
|
||||
*value = (*value).clamp(1, 65534);
|
||||
} else {
|
||||
*value = (*value).clamp(0, 65534);
|
||||
}
|
||||
// Note Firefox floors by 1 in quirks mode, but like Chrome and Safari we don't do that.
|
||||
*value = (*value).clamp(0, 65534);
|
||||
}
|
||||
attr
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue