Commit bcf251c4 authored by robert@webkit.org's avatar robert@webkit.org

Section's collapsed borders painted in wrong place in rtl tables

https://bugs.webkit.org/show_bug.cgi?id=119691

Reviewed by Darin Adler.

Source/WebCore:

Table row-groups can be RTL too, so look to the section rather than the
table when deciding the direction of a row. The section will inherit the
table's direction if it doesn't override it.

Test: fast/table/paint-collapsed-borders-rtl-section.html

* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::hasStartBorderAdjoiningTable):
(WebCore::RenderTableCell::hasEndBorderAdjoiningTable):

LayoutTests:

* fast/table/paint-collapsed-borders-rtl-section-expected.html: Added.
* fast/table/paint-collapsed-borders-rtl-section.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 98e7eeb2
2013-08-13 Robert Hogan <robert@webkit.org>
Section's collapsed borders painted in wrong place in rtl tables
https://bugs.webkit.org/show_bug.cgi?id=119691
Reviewed by Darin Adler.
* fast/table/paint-collapsed-borders-rtl-section-expected.html: Added.
* fast/table/paint-collapsed-borders-rtl-section.html: Added.
2013-08-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
NodeList.item() does not behave according to specification
<!doctype html>
<head>
<style>
table {
border: solid 20px red;
border-collapse: collapse;
}
#tbody1 {
border: solid 20px blue;
}
td {
height: 20px;
width: 20px;
}
</style>
</head>
<body>
<table>
<p> webkit.org/b/119691: Paint collapsed section borders correctly when the section has rtl direction.
<tbody id="tbody1">
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</body
</html>
<!doctype html>
<head>
<style>
table {
border: solid 20px red;
border-collapse: collapse;
}
#tbody1 {
border: solid 20px blue;
direction: rtl;
}
td {
height: 20px;
width: 20px;
}
</style>
</head>
<body>
<table>
<p> webkit.org/b/119691: Paint collapsed section borders correctly when the section has rtl direction.
<tbody id="tbody1">
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</body
</html>
2013-08-13 Robert Hogan <robert@webkit.org>
Section's collapsed borders painted in wrong place in rtl tables
https://bugs.webkit.org/show_bug.cgi?id=119691
Reviewed by Darin Adler.
Table row-groups can be RTL too, so look to the section rather than the
table when deciding the direction of a row. The section will inherit the
table's direction if it doesn't override it.
Test: fast/table/paint-collapsed-borders-rtl-section.html
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::hasStartBorderAdjoiningTable):
(WebCore::RenderTableCell::hasEndBorderAdjoiningTable):
2013-08-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
NodeList.item() does not behave according to specification
......@@ -484,7 +484,7 @@ bool RenderTableCell::hasStartBorderAdjoiningTable() const
{
bool isStartColumn = !col();
bool isEndColumn = table()->colToEffCol(col() + colSpan() - 1) == table()->numEffCols() - 1;
bool hasSameDirectionAsTable = hasSameDirectionAs(table());
bool hasSameDirectionAsTable = hasSameDirectionAs(section());
// The table direction determines the row direction. In mixed directionality, we cannot guarantee that
// we have a common border with the table (think a ltr table with rtl start cell).
......@@ -495,7 +495,7 @@ bool RenderTableCell::hasEndBorderAdjoiningTable() const
{
bool isStartColumn = !col();
bool isEndColumn = table()->colToEffCol(col() + colSpan() - 1) == table()->numEffCols() - 1;
bool hasSameDirectionAsTable = hasSameDirectionAs(table());
bool hasSameDirectionAsTable = hasSameDirectionAs(section());
// The table direction determines the row direction. In mixed directionality, we cannot guarantee that
// we have a common border with the table (think a ltr table with ltr end cell).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment