Bug 831232 - Improve spec conformance for table@border; r=dbaron

This commit is contained in:
Ms2ger 2013-02-07 09:08:57 +01:00
parent eae2596df5
commit 43ee0627f0
7 changed files with 187 additions and 4 deletions

View File

@ -34,3 +34,6 @@ skip-if(Android||B2G) == 649134-2.html 649134-2-ref.html
== hidden-2.svg hidden-2-ref.svg
== href-attr-change-restyles.html href-attr-change-restyles-ref.html
== figure.html figure-ref.html
== table-border-1.html table-border-1-ref.html
== table-border-2.html table-border-2-ref.html
!= table-border-2.html table-border-2-notref.html

View File

@ -0,0 +1,46 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Table borders</title>
<style>
table {
border-width: 1px;
border-style: outset;
}
td {
border-width: 1px;
border-style: inset;
}
</style>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>

View File

@ -0,0 +1,36 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Table borders</title>
<table border>
<tr><td>Test
</table>
<table border="">
<tr><td>Test
</table>
<table border=null>
<tr><td>Test
</table>
<table border=undefined>
<tr><td>Test
</table>
<table border=foo>
<tr><td>Test
</table>
<table border=1>
<tr><td>Test
</table>
<table border=1foo>
<tr><td>Test
</table>
<table border=1%>
<tr><td>Test
</table>
<table border=-1>
<tr><td>Test
</table>
<table border=-1foo>
<tr><td>Test
</table>
<table border=-1%>
<tr><td>Test
</table>

View File

@ -0,0 +1,40 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Table borders</title>
<style>
table {
border-width: 1px;
border-style: outset;
}
td {
border-width: 1px;
border-style: inset;
}
</style>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>

View File

@ -0,0 +1,30 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Table borders</title>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>
<table>
<tr><td>Test
</table>

View File

@ -0,0 +1,30 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Table borders</title>
<table border=0>
<tr><td>Test
</table>
<table border=0foo>
<tr><td>Test
</table>
<table border=0%>
<tr><td>Test
</table>
<table border=+0>
<tr><td>Test
</table>
<table border=+0foo>
<tr><td>Test
</table>
<table border=+0%>
<tr><td>Test
</table>
<table border=-0>
<tr><td>Test
</table>
<table border=-0foo>
<tr><td>Test
</table>
<table border=-0%>
<tr><td>Test
</table>

View File

@ -917,12 +917,10 @@ HTMLTableElement::ParseAttribute(int32_t aNamespaceID,
/* ignore summary, just a string */
if (aNamespaceID == kNameSpaceID_None) {
if (aAttribute == nsGkAtoms::cellspacing ||
aAttribute == nsGkAtoms::cellpadding) {
aAttribute == nsGkAtoms::cellpadding ||
aAttribute == nsGkAtoms::border) {
return aResult.ParseNonNegativeIntValue(aValue);
}
if (aAttribute == nsGkAtoms::border) {
return aResult.ParseIntWithBounds(aValue, 0);
}
if (aAttribute == nsGkAtoms::height) {
return aResult.ParseSpecialIntValue(aValue);
}