Bug 1241840 - Set table cell colspan=0 to 1 instead per the HTML spec. r=bz

This commit is contained in:
Mats Palmgren
2016-01-27 17:02:12 +01:00
parent a18803a6b1
commit e69230933d
4 changed files with 32 additions and 5 deletions

View File

@@ -388,9 +388,7 @@ HTMLTableCellElement::ParseAttribute(int32_t aNamespaceID,
if (res) {
int32_t val = aResult.GetIntegerValue();
// reset large colspan values as IE and opera do
// quirks mode does not honor the special html 4 value of 0
if (val > MAX_COLSPAN || val < 0 ||
(0 == val && InNavQuirksMode(OwnerDoc()))) {
if (val > MAX_COLSPAN || val <= 0) {
aResult.SetTo(1, &aValue);
}
}