Bug 1359822 - Match standard for colSpan/rowSpan, r=mystor
MozReview-Commit-ID: 6bNJL3QkLg2
This commit is contained in:
committed by
Michael Layzell
parent
263f31081b
commit
ae54180eeb
@@ -398,26 +398,16 @@ HTMLTableCellElement::ParseAttribute(int32_t aNamespaceID,
|
||||
return aResult.ParseIntWithBounds(aValue, 0);
|
||||
}
|
||||
if (aAttribute == nsGkAtoms::colspan) {
|
||||
bool res = aResult.ParseIntWithBounds(aValue, -1);
|
||||
if (res) {
|
||||
int32_t val = aResult.GetIntegerValue();
|
||||
// reset large colspan values as IE and opera do
|
||||
if (val > MAX_COLSPAN || val <= 0) {
|
||||
aResult.SetTo(1, &aValue);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
aResult.ParseClampedNonNegativeInt(aValue, 1, 1, MAX_COLSPAN);
|
||||
return true;
|
||||
}
|
||||
if (aAttribute == nsGkAtoms::rowspan) {
|
||||
bool res = aResult.ParseIntWithBounds(aValue, -1, MAX_ROWSPAN);
|
||||
if (res) {
|
||||
int32_t val = aResult.GetIntegerValue();
|
||||
// quirks mode does not honor the special html 4 value of 0
|
||||
if (val < 0 || (0 == val && InNavQuirksMode(OwnerDoc()))) {
|
||||
aResult.SetTo(1, &aValue);
|
||||
}
|
||||
aResult.ParseClampedNonNegativeInt(aValue, 1, 0, MAX_ROWSPAN);
|
||||
// quirks mode does not honor the special html 4 value of 0
|
||||
if (aResult.GetIntegerValue() == 0 && InNavQuirksMode(OwnerDoc())) {
|
||||
aResult.SetTo(1, &aValue);
|
||||
}
|
||||
return res;
|
||||
return true;
|
||||
}
|
||||
if (aAttribute == nsGkAtoms::height) {
|
||||
return aResult.ParseSpecialIntValue(aValue);
|
||||
|
||||
Reference in New Issue
Block a user