Bug 1241840 - Set table cell colspan=0 to 1 instead per the HTML spec. r=bz
This commit is contained in:
@@ -110,7 +110,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=410052
|
|||||||
[ 0, 1, 2, -1, -1],
|
[ 0, 1, 2, -1, -1],
|
||||||
[-1, -1, -1, -1, -1],
|
[-1, -1, -1, -1, -1],
|
||||||
[ 3, 4, 5, -1, -1],
|
[ 3, 4, 5, -1, -1],
|
||||||
[ 6, 7, 7, 7, 7],
|
[ 6, 7, -1, -1, -1],
|
||||||
[ 6, 8, 9, -1, -1],
|
[ 6, 8, 9, -1, -1],
|
||||||
[ 6, 10, 9, 11, 12]
|
[ 6, 10, 9, 11, 12]
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -388,9 +388,7 @@ HTMLTableCellElement::ParseAttribute(int32_t aNamespaceID,
|
|||||||
if (res) {
|
if (res) {
|
||||||
int32_t val = aResult.GetIntegerValue();
|
int32_t val = aResult.GetIntegerValue();
|
||||||
// reset large colspan values as IE and opera do
|
// 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) {
|
||||||
if (val > MAX_COLSPAN || val < 0 ||
|
|
||||||
(0 == val && InNavQuirksMode(OwnerDoc()))) {
|
|
||||||
aResult.SetTo(1, &aValue);
|
aResult.SetTo(1, &aValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1193,7 +1193,7 @@ nsMathMLmtdFrame::GetColSpan()
|
|||||||
if (!value.IsEmpty()) {
|
if (!value.IsEmpty()) {
|
||||||
nsresult error;
|
nsresult error;
|
||||||
colspan = value.ToInteger(&error);
|
colspan = value.ToInteger(&error);
|
||||||
if (NS_FAILED(error) || colspan < 0 || colspan > MAX_COLSPAN)
|
if (NS_FAILED(error) || colspan <= 0 || colspan > MAX_COLSPAN)
|
||||||
colspan = 1;
|
colspan = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -615,3 +615,32 @@
|
|||||||
[th.rowSpan: IDL set to 4294967295 followed by getAttribute()]
|
[th.rowSpan: IDL set to 4294967295 followed by getAttribute()]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[td.colSpan: setAttribute() to 0 followed by IDL get]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[td.colSpan: setAttribute() to "-0" followed by IDL get]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[td.colSpan: setAttribute() to "0" followed by IDL get]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[td.colSpan: IDL set to 0 followed by IDL get]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[td.colSpan: IDL set to "-0" followed by IDL get]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[th.colSpan: setAttribute() to 0 followed by IDL get]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[th.colSpan: setAttribute() to "-0" followed by IDL get]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[th.colSpan: setAttribute() to "0" followed by IDL get]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[th.colSpan: IDL set to 0 followed by IDL get]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[th.colSpan: IDL set to "-0" followed by IDL get]
|
||||||
|
expected: FAIL
|
||||||
|
|||||||
Reference in New Issue
Block a user