Title: [154013] trunk
Revision
154013
Author
[email protected]
Date
2013-08-13 11:07:00 -0700 (Tue, 13 Aug 2013)

Log Message

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.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (154012 => 154013)


--- trunk/LayoutTests/ChangeLog	2013-08-13 17:58:53 UTC (rev 154012)
+++ trunk/LayoutTests/ChangeLog	2013-08-13 18:07:00 UTC (rev 154013)
@@ -1,3 +1,13 @@
+2013-08-13  Robert Hogan  <[email protected]>
+
+        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  <[email protected]>
 
         NodeList.item() does not behave according to specification

Added: trunk/LayoutTests/fast/table/paint-collapsed-borders-rtl-section-expected.html (0 => 154013)


--- trunk/LayoutTests/fast/table/paint-collapsed-borders-rtl-section-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/table/paint-collapsed-borders-rtl-section-expected.html	2013-08-13 18:07:00 UTC (rev 154013)
@@ -0,0 +1,39 @@
+<!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>

Added: trunk/LayoutTests/fast/table/paint-collapsed-borders-rtl-section.html (0 => 154013)


--- trunk/LayoutTests/fast/table/paint-collapsed-borders-rtl-section.html	                        (rev 0)
+++ trunk/LayoutTests/fast/table/paint-collapsed-borders-rtl-section.html	2013-08-13 18:07:00 UTC (rev 154013)
@@ -0,0 +1,40 @@
+<!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>

Modified: trunk/Source/WebCore/ChangeLog (154012 => 154013)


--- trunk/Source/WebCore/ChangeLog	2013-08-13 17:58:53 UTC (rev 154012)
+++ trunk/Source/WebCore/ChangeLog	2013-08-13 18:07:00 UTC (rev 154013)
@@ -1,3 +1,20 @@
+2013-08-13  Robert Hogan  <[email protected]>
+
+        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  <[email protected]>
 
         NodeList.item() does not behave according to specification

Modified: trunk/Source/WebCore/rendering/RenderTableCell.cpp (154012 => 154013)


--- trunk/Source/WebCore/rendering/RenderTableCell.cpp	2013-08-13 17:58:53 UTC (rev 154012)
+++ trunk/Source/WebCore/rendering/RenderTableCell.cpp	2013-08-13 18:07:00 UTC (rev 154013)
@@ -484,7 +484,7 @@
 {
     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 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).
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to