script: Only enforce rowSpan >= 1 in actual quirks mode (#37820)

We were also enforcing that in limited-quirks mode, but no other browser
does that. In fact, Blink and WebKit don't have this quirk at all, so we
should consider removing it too, but for now restrict it to quirks mode
like Firefox.

Testing: adding new tests
Part of #37813

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-07-02 11:52:00 +02:00 committed by GitHub
parent 4cbadde144
commit 95d9d3a412
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 26 additions and 3 deletions

View file

@ -210,7 +210,7 @@ impl VirtualMethods for HTMLTableCellElement {
// > 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::NoQuirks {
if document.quirks_mode() == QuirksMode::Quirks {
*value = (*value).clamp(1, 65534);
} else {
*value = (*value).clamp(0, 65534);