Title: [123793] trunk
Revision
123793
Author
commit-qu...@webkit.org
Date
2012-07-26 14:18:53 -0700 (Thu, 26 Jul 2012)

Log Message

Outline is always painted on the first table row regardless of the row it's set on
https://bugs.webkit.org/show_bug.cgi?id=92389

Patch by Pravin D <pravind....@gmail.com> on 2012-07-26
Reviewed by Eric Seidel.

Source/WebCore:

The outlines of all the rows are drawn on the row instead of their respective rows.
The paint offset for the outlines does not take the row location into account.

Test: fast/table/table-row-outline-paint.html

* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::paintOutlineForRowIfNeeded):
The row's location is taken into account for calculating the correct paint offset
for its outline.

LayoutTests:

* fast/table/table-row-outline-paint.html: Added.
* platform/chromium-linux/fast/table/table-row-outline-paint-expected.png: Added.
* platform/chromium-linux/fast/table/table-row-outline-paint-expected.txt: Added.
  Paint phase issue.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (123792 => 123793)


--- trunk/LayoutTests/ChangeLog	2012-07-26 21:16:08 UTC (rev 123792)
+++ trunk/LayoutTests/ChangeLog	2012-07-26 21:18:53 UTC (rev 123793)
@@ -1,3 +1,15 @@
+2012-07-26  Pravin D  <pravind....@gmail.com>
+
+        Outline is always painted on the first table row regardless of the row it's set on
+        https://bugs.webkit.org/show_bug.cgi?id=92389
+
+        Reviewed by Eric Seidel.
+
+        * fast/table/table-row-outline-paint.html: Added.
+        * platform/chromium-linux/fast/table/table-row-outline-paint-expected.png: Added.
+        * platform/chromium-linux/fast/table/table-row-outline-paint-expected.txt: Added.
+          Paint phase issue.
+
 2012-07-26  Andrew Wilson  <atwil...@chromium.org>
 
         Unreviewed chromium expectations change to mark inspector tests as SLOW.

Added: trunk/LayoutTests/fast/table/table-row-outline-paint.html (0 => 123793)


--- trunk/LayoutTests/fast/table/table-row-outline-paint.html	                        (rev 0)
+++ trunk/LayoutTests/fast/table/table-row-outline-paint.html	2012-07-26 21:18:53 UTC (rev 123793)
@@ -0,0 +1,27 @@
+<!DOCTYPE>
+<title> Test for bug https://bugs.webkit.org/show_bug.cgi?id=92389</title>
+<body>
+<style>
+    td {
+        width: 50px;
+        height: 50px;
+        border: 1px solid;
+    }
+    .outline-first {
+        outline: 5px solid green;
+    }
+    .outline-second {
+        outline: 5px solid yellow;
+    }
+</style>
+<table>
+    <tr class="outline-first">
+        <td></td>
+        <td></td>
+    </tr>
+    <tr class="outline-second">
+        <td></td>
+        <td></td>
+    </tr>
+</table>
+</body>

Added: trunk/LayoutTests/platform/chromium-linux/fast/table/table-row-outline-paint-expected.png (0 => 123793)


--- trunk/LayoutTests/platform/chromium-linux/fast/table/table-row-outline-paint-expected.png	                        (rev 0)
+++ trunk/LayoutTests/platform/chromium-linux/fast/table/table-row-outline-paint-expected.png	2012-07-26 21:18:53 UTC (rev 123793)
@@ -0,0 +1,5 @@
+\x89PNG
+
+
+IHDR X\x9Av\x82psBIT|d\x88	pHYs\xC4\xC4\x95+)tEXtchecksum0da238eb8f8c570d2b80cdd4f45f8730\x90\xC1!\xE9IDATx\x9C\xEDݱn\xC20@Q\\xE5\xBF_\xEER\xCAд\\xA3\xF4\x9C-\xC2óX\xB8rƜs^\xAB\xFEd\x90 @f\xDB_\x8C\xDBX5̫\xF7\xD0rd\x90 @F\x80\x99\xEDh\xC1\xFDA\xE51\xCE\xF9\x80\xFA\xFD\x8F\xE0O\xBF?/\xE0
+\xC8\xDE\xFD\xC7\xECY<F\xC7\xD9\xF7\xAB\xB9\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2\xC8 #@\x80\x8C2Ȍ9\xE7\xDC]\xAE\x9B\x84\xE6\xF1x"' @F\x80d\x90َ\x8C[1\xAF6\xAF\xAB'' @H\x80\x99_\xFC\xC8\xD7\xC7c\x8C˷\xA5'\xB0\xDF\xD3\xD9\xF7\xF7\xD3w' @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @f\xFB\xCB\xE21ƫ\xE6xg\xDF\xAC6\xE6\x9Csw\xB9n\x98\xC7K\xE0\x89܂d\x90 @F\x80\x99\x87\xB7`y(x' @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80\x99O\xCD\xC29\xAEv\xD0A0IEND\xAEB`\x82
\ No newline at end of file

Added: trunk/LayoutTests/platform/chromium-linux/fast/table/table-row-outline-paint-expected.txt (0 => 123793)


--- trunk/LayoutTests/platform/chromium-linux/fast/table/table-row-outline-paint-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/chromium-linux/fast/table/table-row-outline-paint-expected.txt	2012-07-26 21:18:53 UTC (rev 123793)
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderTable {TABLE} at (0,0) size 114x106
+        RenderTableSection {TBODY} at (0,0) size 114x106
+          RenderTableRow {TR} at (0,2) size 114x50
+            RenderTableCell {TD} at (2,25) size 54x4 [border: (1px solid #000000)] [r=0 c=0 rs=1 cs=1]
+            RenderTableCell {TD} at (58,25) size 54x4 [border: (1px solid #000000)] [r=0 c=1 rs=1 cs=1]
+          RenderTableRow {TR} at (0,54) size 114x50
+            RenderTableCell {TD} at (2,77) size 54x4 [border: (1px solid #000000)] [r=1 c=0 rs=1 cs=1]
+            RenderTableCell {TD} at (58,77) size 54x4 [border: (1px solid #000000)] [r=1 c=1 rs=1 cs=1]

Modified: trunk/Source/WebCore/ChangeLog (123792 => 123793)


--- trunk/Source/WebCore/ChangeLog	2012-07-26 21:16:08 UTC (rev 123792)
+++ trunk/Source/WebCore/ChangeLog	2012-07-26 21:18:53 UTC (rev 123793)
@@ -1,3 +1,20 @@
+2012-07-26  Pravin D  <pravind....@gmail.com>
+
+        Outline is always painted on the first table row regardless of the row it's set on
+        https://bugs.webkit.org/show_bug.cgi?id=92389
+
+        Reviewed by Eric Seidel.
+
+        The outlines of all the rows are drawn on the row instead of their respective rows.
+        The paint offset for the outlines does not take the row location into account.
+
+        Test: fast/table/table-row-outline-paint.html
+
+        * rendering/RenderTableRow.cpp:
+        (WebCore::RenderTableRow::paintOutlineForRowIfNeeded):
+        The row's location is taken into account for calculating the correct paint offset
+        for its outline.
+
 2012-07-26  Antoine Labour  <pi...@chromium.org>
 
         [chromium] Combine color matrix filters and apply them in a single pass.

Modified: trunk/Source/WebCore/rendering/RenderTableRow.cpp (123792 => 123793)


--- trunk/Source/WebCore/rendering/RenderTableRow.cpp	2012-07-26 21:16:08 UTC (rev 123792)
+++ trunk/Source/WebCore/rendering/RenderTableRow.cpp	2012-07-26 21:18:53 UTC (rev 123793)
@@ -217,9 +217,10 @@
 
 void RenderTableRow::paintOutlineForRowIfNeeded(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
 {
+    LayoutPoint adjustedPaintOffset = paintOffset + location();
     PaintPhase paintPhase = paintInfo.phase;
     if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && style()->visibility() == VISIBLE)
-        paintOutline(paintInfo.context, LayoutRect(paintOffset, size()));
+        paintOutline(paintInfo.context, LayoutRect(adjustedPaintOffset, size()));
 }
 
 void RenderTableRow::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to