2010-10-05 Fady Samuel <fsamuel@chromium.org>
authorfsamuel@chromium.org <fsamuel@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Oct 2010 23:55:13 +0000 (23:55 +0000)
committerfsamuel@chromium.org <fsamuel@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Oct 2010 23:55:13 +0000 (23:55 +0000)
        Reviewed by Darin Adler.

        REGRESSION (r65539): One pixel white gaps when scrolling Trac changeset pages
        https://bugs.webkit.org/show_bug.cgi?id=45131

        Added a layout test to check for paint rects that touch the border of an adjacent sell,
        when border-collapse: separate is set for the table.

        * fast/table/simple_paint.html:
            Don't do rtl as it doesn't exercise some of the new  paint code.
        * fast/table/simple_paint_separate_borders-expected.checksum: Added.
        * fast/table/simple_paint_separate_borders-expected.png: Added.
        * fast/table/simple_paint_separate_borders-expected.txt: Added.
        * fast/table/simple_paint_separate_borders.html: Added.
2010-10-05  Fady Samuel  <fsamuel@chromium.org>

        Reviewed by Darin Adler.

        REGRESSION (r65539): One pixel white gaps when scrolling Trac changeset pages
        https://bugs.webkit.org/show_bug.cgi?id=45131

        When border-collapse: separate property is set on the table, paintObject
        may skip repainting cells, if the dirty region only touches one row/col of pixels.

        Test: fast/table/simple_paint_separate_borders.html

        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::paintObject):
            Don't subtract one from the right and bottom of the dirty paint rect.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@69161 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/table/simple_paint-expected.checksum
LayoutTests/fast/table/simple_paint-expected.png
LayoutTests/fast/table/simple_paint.html
WebCore/ChangeLog
WebCore/rendering/RenderTableSection.cpp

index 8a49a1d0a066a88a2922f3cf0969fa9904de7caf..92b75288c88f914c7acbf5cf69946455f5a4e05c 100644 (file)
@@ -1,3 +1,20 @@
+2010-10-05  Fady Samuel  <fsamuel@chromium.org>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (r65539): One pixel white gaps when scrolling Trac changeset pages
+        https://bugs.webkit.org/show_bug.cgi?id=45131
+
+        Added a layout test to check for paint rects that touch the border of an adjacent sell,
+        when border-collapse: separate is set for the table. 
+
+        * fast/table/simple_paint.html: 
+            Don't do rtl as it doesn't exercise some of the new  paint code.
+        * fast/table/simple_paint_separate_borders-expected.checksum: Added.
+        * fast/table/simple_paint_separate_borders-expected.png: Added.
+        * fast/table/simple_paint_separate_borders-expected.txt: Added.
+        * fast/table/simple_paint_separate_borders.html: Added.
+
 2010-10-04  Ryosuke Niwa  <rniwa@webkit.org>
 
         Reviewed by Tony Chang.
index 0e88c80fdbe99503ac7f5bf302f622d8a11e0d1f..59e4a18309c295c2c8fa2749246f54b23f7a270c 100644 (file)
@@ -1 +1 @@
-58a97402f46fee222b81aecc51b9f92c
\ No newline at end of file
+6c6f52d4891de4b265db2c5c3a3f53d5
\ No newline at end of file
index e9b4b6effb0cfcdefd232916dce7424e116c61e1..1e3e01d30566793c91fcee23f7d5a0d7343cbee9 100644 (file)
Binary files a/LayoutTests/fast/table/simple_paint-expected.png and b/LayoutTests/fast/table/simple_paint-expected.png differ
index 44ffe4ce4ae555d202c5e8bd25caa734a60c3181..75e5bd4c27d63ba92ebdb5900020187093b95cb0 100644 (file)
@@ -1,18 +1,27 @@
 <html>
 <head>
 <title>Simple Table Painting</title>
-  <style>
-    table.testtable { border: 1px solid black; border-collapse:collapse; background-color: green; }
-    table.testtable td { border: 1px solid black;  font-size: 20px; background-color: green; width:60px; height:60px; direction:rtl;}
-    body { margin: 0px 0px 0px 0px; }
-  </style>
-  <script>
-      if (window.layoutTestController) {
-          window.layoutTestController.waitUntilDone();
-      }
-  </script>
+    <style>
+      table.testtable { border: 1px solid black; border-collapse:collapse; background-color: green; }
+      table.testtable td { border: 1px solid black;  font-size: 20px; background-color: green; width:60px; height:60px; direction:rtl;}
+      body { margin: 0px; }
+    </style>
+    <script>
+        if (window.layoutTestController) {
+            window.layoutTestController.waitUntilDone();
+        }
+        function repaintTest() {
+            var testCell = document.getElementById("testcell");
+            var offset = document.body.offsetTop;
+            testCell.style.backgroundColor = "green";
+            if (window.layoutTestController) {
+                window.layoutTestController.notifyDone();
+            }
+        }
+    </script>
+    <script type="text/javascript" src="../repaint/resources/repaint.js"></script>
 </head>
-  <body>
+    <body onload="runRepaintTest()">
     <table class="testtable">
       <tr>
         <td></td>
       </tr>
     </table>
     <script>
-      var testCell = document.getElementById("testcell");
-      var offset = document.body.offsetTop;
-      testCell.style.backgroundColor = "green";
-      if (window.layoutTestController) {
-          window.layoutTestController.notifyDone();
-      }
+
     </script>
   </body>
 </html>
index 8897a4176e808ffad556249fd312cf6dd3732e81..1fde5693a464301f4edb779425b230b8d3013b8a 100644 (file)
@@ -1,3 +1,19 @@
+2010-10-05  Fady Samuel  <fsamuel@chromium.org>
+
+        Reviewed by Darin Adler.
+
+        REGRESSION (r65539): One pixel white gaps when scrolling Trac changeset pages
+        https://bugs.webkit.org/show_bug.cgi?id=45131
+
+        When border-collapse: separate property is set on the table, paintObject
+        may skip repainting cells, if the dirty region only touches one row/col of pixels.
+
+        Test: fast/table/simple_paint_separate_borders.html
+
+        * rendering/RenderTableSection.cpp:
+        (WebCore::RenderTableSection::paintObject):  
+            Don't subtract one from the right and bottom of the dirty paint rect.
+
 2010-10-05  Sanjeev Radhakrishnan  <sanjeevr@chromium.org>
 
         Reviewed by Darin Fisher.
index 7c4d0c4bac19760c5c5328987256380423ab33e9..ed4f527c8879dcfdc9563b267a78ad5ae0d84491 100644 (file)
@@ -1032,9 +1032,9 @@ void RenderTableSection::paintObject(PaintInfo& paintInfo, int tx, int ty)
         if (startrow == m_rowPos.size() || (startrow > 0 && (m_rowPos[startrow] >  top)))
           --startrow;
 
-        int bottom = relativeY + h + os - 1;
+        int bottom = relativeY + h + os;
         endrow = std::lower_bound(m_rowPos.begin(), m_rowPos.end(), bottom) - m_rowPos.begin();
-        if ((endrow == m_rowPos.size()) || (endrow > 0 && m_rowPos[endrow - 1] == bottom))
+        if (endrow == m_rowPos.size())
           --endrow;
 
         if (!endrow && ty + m_rowPos[0] - table()->outerBorderTop() <= y + h + os)
@@ -1051,9 +1051,9 @@ void RenderTableSection::paintObject(PaintInfo& paintInfo, int tx, int ty)
         if ((startcol == columnPos.size()) || (startcol > 0 && (columnPos[startcol] > left)))
             --startcol;
 
-        int right = relativeX + w + os - 1;
+        int right = relativeX + w + os;
         endcol = std::lower_bound(columnPos.begin(), columnPos.end(), right) - columnPos.begin();
-        if (endcol == columnPos.size() || (endcol > 0 && (columnPos[endcol - 1] == right)))
+        if (endcol == columnPos.size())
             --endcol;
 
         if (!endcol && tx + table()->columnPositions()[0] - table()->outerBorderLeft() <= y + w + os)