Commit 941fec3a authored by bdash's avatar bdash
Browse files

2007-06-20 Mitz Pettel <mitz@webkit.org>

        Reviewed by Beth.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14056
          REGRESSION (r21113-21143): TR background not repainted via style class change

        Test: fast/repaint/table-row.html

        * rendering/RenderTableRow.cpp:
        (WebCore::RenderTableRow::layout): Added a repaint to make up for the case where the
        table row also needs layout, so it doesn't get a repaint in setStyle().

2007-06-20  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Beth.

        - repaint test for http://bugs.webkit.org/show_bug.cgi?id=14056
          REGRESSION (r21113-21143): TR background not repainted via style class change

        * fast/repaint/table-row-expected.checksum: Added.
        * fast/repaint/table-row-expected.png: Added.
        * fast/repaint/table-row-expected.txt: Added.
        * fast/repaint/table-row.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7891c027
2007-06-20 Mitz Pettel <mitz@webkit.org>
Reviewed by Beth.
- repaint test for http://bugs.webkit.org/show_bug.cgi?id=14056
REGRESSION (r21113-21143): TR background not repainted via style class change
* fast/repaint/table-row-expected.checksum: Added.
* fast/repaint/table-row-expected.png: Added.
* fast/repaint/table-row-expected.txt: Added.
* fast/repaint/table-row.html: Added.
2007-06-20 Mark Rowe <mrowe@apple.com>
 
Reviewed by Mitz.
ac66aaa28edfc2c9d5ac82f93c227eb6
\ 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
RenderTable {TABLE} at (0,0) size 106x104
RenderTableSection {TBODY} at (0,0) size 106x104
RenderTableRow {TR} at (0,2) size 106x100 [bgcolor=#008000]
RenderTableCell {TD} at (2,51) size 102x2 [r=0 c=0 rs=1 cs=1]
<html>
<head>
<title>Test for http://bugs.webkit.org/show_bug.cgi?id=14056</title>
<script src="repaint.js" type="text/javascript"></script>
<script type="text/javascript">
function repaintTest()
{
var div = document.getElementById("target");
div.className = "green";
}
</script>
<style>
tr {
background-color: red;
}
td {
width: 100px;
height: 100px;
}
.green {
background-color:green;
min-height: 500px;
}
</style>
</head>
<body onload="runRepaintTest()">
<table>
<tr id="target">
<td>
</td>
</tr>
</table>
</body>
</html>
2007-06-20 Mitz Pettel <mitz@webkit.org>
Reviewed by Beth.
- fix http://bugs.webkit.org/show_bug.cgi?id=14056
REGRESSION (r21113-21143): TR background not repainted via style class change
Test: fast/repaint/table-row.html
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout): Added a repaint to make up for the case where the
table row also needs layout, so it doesn't get a repaint in setStyle().
2007-06-20 Mitz Pettel <mitz@webkit.org>
 
Reviewed by Adele.
......@@ -133,6 +133,18 @@ void RenderTableRow::layout()
}
}
// We only ever need to repaint if our cells didn't, which menas that they didn't need
// layout, so we know that our bounds didn't change. This code is just making up for
// the fact that we did not repaint in setStyle() because we had a layout hint.
// We cannot call repaint() because our absoluteClippedOverflowRect() is taken from the
// parent table, and being mid-layout, that is invalid. Instead, we repaint our cells.
if (selfNeedsLayout() && checkForRepaintDuringLayout()) {
for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
if (child->isTableCell())
child->repaint();
}
}
view()->popLayoutState();
setNeedsLayout(false);
}
......
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