Commit a10ca77a authored by bdash's avatar bdash

2007-04-17 Mitz Pettel <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=13369
          REGRESSION (r13366): Invisible table cell background is painted

        Test: fast/table/invisible-cell-background.html

        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::paintBackgroundsBehindCell): Don't paint any
        background if the cell is not visible. This behavior matches WinIE and Opera.

2007-04-17  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - pixel test for http://bugs.webkit.org/show_bug.cgi?id=13369
          REGRESSION (r13366): Invisible table cell background is painted

        * fast/table/invisible-cell-background-expected.checksum: Added.
        * fast/table/invisible-cell-background-expected.png: Added.
        * fast/table/invisible-cell-background-expected.txt: Added.
        * fast/table/invisible-cell-background.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20931 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d0d95afb
2007-04-17 Mitz Pettel <mitz@webkit.org>
Reviewed by Darin.
- pixel test for http://bugs.webkit.org/show_bug.cgi?id=13369
REGRESSION (r13366): Invisible table cell background is painted
* fast/table/invisible-cell-background-expected.checksum: Added.
* fast/table/invisible-cell-background-expected.png: Added.
* fast/table/invisible-cell-background-expected.txt: Added.
* fast/table/invisible-cell-background.html: Added.
2007-04-17 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
54e7e66d79dbf02e9b4e7b6b9e778e98
\ No newline at end of file
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
RenderBlock {P} at (0,0) size 784x18
RenderText {#text} at (0,0) size 312x18
text run at (0,0) width 312: "This tests that the background of a table cell with "
RenderInline {TT} at (0,0) size 136x15
RenderText {#text} at (312,2) size 136x15
text run at (312,2) width 136: "visibility:hidden"
RenderText {#text} at (448,0) size 107x18
text run at (448,0) width 107: " is never painted."
RenderBlock {P} at (0,34) size 784x18
RenderText {#text} at (0,0) size 460x18
text run at (0,0) width 460: "You should see nine green squares and no red, orange or yellow squares."
RenderTable {TABLE} at (4,68) size 27x25
RenderTableSection {TBODY} at (0,0) size 27x25 [bgcolor=#FFFF00]
RenderTableRow {TR} at (0,0) size 27x25 [bgcolor=#FFA500]
RenderTableCell {TD} at (0,11) size 27x2 [bgcolor=#FF0000] [r=0 c=0 rs=1 cs=1]
RenderTable {TABLE} at (4,97) size 27x25 [bgcolor=#FF0000]
RenderTableSection {TBODY} at (0,0) size 27x25 [bgcolor=#FFFF00]
RenderTableRow {TR} at (0,0) size 27x25 [bgcolor=#FFA500]
RenderTableCell {TD} at (0,11) size 27x2 [bgcolor=#008000] [r=0 c=0 rs=1 cs=1]
RenderTable {TABLE} at (4,126) size 27x25 [bgcolor=#FF0000]
RenderTableSection {TBODY} at (0,0) size 27x25 [bgcolor=#FFFF00]
RenderTableRow {TR} at (0,0) size 27x25 [bgcolor=#FFA500]
RenderTableCell {TD} at (0,11) size 27x2 [bgcolor=#008000] [r=0 c=0 rs=1 cs=1]
RenderTable {TABLE} at (4,155) size 27x25 [bgcolor=#FF0000]
RenderTableSection {TBODY} at (0,0) size 27x25 [bgcolor=#FFFF00]
RenderTableRow {TR} at (0,0) size 27x25 [bgcolor=#FFA500]
RenderTableCell {TD} at (0,11) size 27x2 [bgcolor=#008000] [r=0 c=0 rs=1 cs=1]
RenderTable {TABLE} at (4,184) size 27x25 [bgcolor=#008000]
RenderTableSection {TBODY} at (0,0) size 27x25 [bgcolor=#FF0000]
RenderTableRow {TR} at (0,0) size 27x25 [bgcolor=#FFA500]
RenderTableCell {TD} at (0,11) size 27x2 [r=0 c=0 rs=1 cs=1]
RenderTable {TABLE} at (4,213) size 27x25 [bgcolor=#FF0000]
RenderTableSection {TBODY} at (0,0) size 27x25 [bgcolor=#FFFF00]
RenderTableRow {TR} at (0,0) size 27x25 [bgcolor=#FFA500]
RenderTableCell {TD} at (0,11) size 27x2 [bgcolor=#008000] [r=0 c=0 rs=1 cs=1]
RenderTable {TABLE} at (4,242) size 27x25 [bgcolor=#FF0000]
RenderTableSection {TBODY} at (0,0) size 27x25 [bgcolor=#FFFF00]
RenderTableRow {TR} at (0,0) size 27x25 [bgcolor=#FFA500]
RenderTableCell {TD} at (0,11) size 27x2 [bgcolor=#008000] [r=0 c=0 rs=1 cs=1]
RenderTable {TABLE} at (4,271) size 27x25 [bgcolor=#008000]
RenderTableSection {TBODY} at (0,0) size 27x25 [bgcolor=#FFFF00]
RenderTableRow {TR} at (0,0) size 27x25 [bgcolor=#FFA500]
RenderTableCell {TD} at (0,11) size 27x2 [bgcolor=#FF0000] [r=0 c=0 rs=1 cs=1]
RenderTable {TABLE} at (4,300) size 27x25 [bgcolor=#FF0000]
RenderTableSection {TBODY} at (0,0) size 27x25 [bgcolor=#FFFF00]
RenderTableRow {TR} at (0,0) size 27x25 [bgcolor=#FFA500]
RenderTableCell {TD} at (0,11) size 27x2 [bgcolor=#008000] [r=0 c=0 rs=1 cs=1]
RenderTable {TABLE} at (4,329) size 27x25 [bgcolor=#008000]
RenderTableSection {TBODY} at (0,0) size 27x25 [bgcolor=#FFFF00]
RenderTableRow {TR} at (0,0) size 27x25 [bgcolor=#FFA500]
RenderTableCell {TD} at (0,11) size 27x2 [bgcolor=#FF0000] [r=0 c=0 rs=1 cs=1]
<html>
<head>
<title></title>
<style>
table { margin: 4px; border-collapse: collapse; }
tbody { background-color: yellow; }
tr { background-color: orange; }
td { width: 25px; height: 25px; }
.green { background-color: green; }
.red { background-color: red; }
</style>
</head>
<body>
<p>
This tests that the background of a table cell with <tt>visibility:hidden</tt> is never painted.
</p>
<p>
You should see nine green squares and no red, orange or yellow squares.
</p>
<table style="visibility: hidden;">
<tbody>
<tr>
<td class="red"></td>
</tr>
</tbody>
</table>
<table style="visibility: hidden;" class="red">
<tbody style="visibility: visible;">
<tr>
<td class="green"></td>
</tr>
</tbody>
</table>
<table style="visibility: hidden;" class="red">
<tbody>
<tr style="visibility: visible;">
<td class="green"></td>
</tr>
</tbody>
</table>
<table style="visibility: hidden;" class="red">
<tbody>
<tr>
<td style="visibility: visible;" class="green"></td>
</tr>
</tbody>
</table>
<table class="green">
<tbody style="visibility: hidden;" class="red">
<tr>
<td></td>
</tr>
</tbody>
</table>
<table class="red">
<tbody style="visibility: hidden;">
<tr style="visibility: visible;">
<td class="green"></td>
</tr>
</tbody>
</table>
<table class="red">
<tbody style="visibility: hidden;">
<tr>
<td style="visibility: visible;" class="green"></td>
</tr>
</tbody>
</table>
<table class="green">
<tbody>
<tr style="visibility: hidden;">
<td class="red"></td>
</tr>
</tbody>
</table>
<table class="red">
<tbody>
<tr style="visibility: hidden;">
<td style="visibility: visible;" class="green"></td>
</tr>
</tbody>
</table>
<table class="green">
<tbody>
<tr>
<td style="visibility: hidden;" class="red"></td>
</tr>
</tbody>
</table>
</body>
</html>
2007-04-17 Mitz Pettel <mitz@webkit.org>
Reviewed by Darin.
- fix http://bugs.webkit.org/show_bug.cgi?id=13369
REGRESSION (r13366): Invisible table cell background is painted
Test: fast/table/invisible-cell-background.html
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintBackgroundsBehindCell): Don't paint any
background if the cell is not visible. This behavior matches WinIE and Opera.
2007-04-17 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
......@@ -759,6 +759,9 @@ void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& paintInfo, int tx, i
if (!backgroundObject)
return;
if (style()->visibility() != VISIBLE)
return;
RenderTable* tableElt = table();
if (!tableElt->collapseBorders() && style()->emptyCells() == HIDE && !firstChild())
return;
......
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