2009-01-10 Simon Fraser <simon.fraser@apple.com>

        Reviewed by Dan Bernstein

        https://bugs.webkit.org/show_bug.cgi?id=23222

        We need to disable LayoutState when an object has transforms,
        because LayoutState is not transform-aware and therefore
        repaint rects can be computed incorrectly.

        Test: fast/repaint/transform-disable-layoutstate.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::layoutBlock):
        (WebCore::RenderBlock::layoutOnlyPositionedObjects):
        * rendering/RenderFlexibleBox.cpp:
        (WebCore::RenderFlexibleBox::layoutBlock):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39781 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6d1e5af6
2009-01-10 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dan Bernstein
https://bugs.webkit.org/show_bug.cgi?id=23222
Test for repainting which is affected by LayoutState under an element
with a CSS transform.
* fast/repaint/transform-disable-layoutstate.html: Added.
* platform/mac/fast/repaint/transform-disable-layoutstate-expected.checksum: Added.
* platform/mac/fast/repaint/transform-disable-layoutstate-expected.png: Added.
* platform/mac/fast/repaint/transform-disable-layoutstate-expected.txt: Added.
2009-01-09 Sam Weinig <sam@webkit.org>
Check in correct results for failing test.
......
<!DOCTYPE html>
<html>
<head>
<script src="repaint.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
function repaintTest()
{
document.getElementById('target').style.height='10px';
}
</script>
</head>
<body onload="runRepaintTest()">
<div id="container" style="width: 500px; -webkit-transform: translate(50px, 80px)">
<div style="padding-bottom: 100px; background: silver;">
<div style="float: right; height: 50px; width: 50px; background: green;"></div>
<div style="clear: right; border: 4px solid blue;">
<div style="height: 55px;" id="target">
</div>
</div>
</div>
</div>
</body>
</html>
464a6d24fe5a672bbdea95ce96f49f56
\ No newline at end of file
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x184
RenderBlock {HTML} at (0,0) size 800x184
RenderBody {BODY} at (8,8) size 784x168
layer at (8,8) size 500x168
RenderBlock {DIV} at (0,0) size 500x168
RenderBlock {DIV} at (0,0) size 500x168 [bgcolor=#C0C0C0]
RenderBlock (floating) {DIV} at (450,0) size 50x50 [bgcolor=#008000]
RenderBlock {DIV} at (0,50) size 500x18 [border: (4px solid #0000FF)]
RenderBlock {DIV} at (4,4) size 492x10
2009-01-10 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dan Bernstein
https://bugs.webkit.org/show_bug.cgi?id=23222
We need to disable LayoutState when an object has transforms,
because LayoutState is not transform-aware and therefore
repaint rects can be computed incorrectly.
Test: fast/repaint/transform-disable-layoutstate.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::layoutOnlyPositionedObjects):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
2009-01-09 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by Simon Hausmann.
......@@ -595,7 +595,7 @@ void RenderBlock::layoutBlock(bool relayoutChildren)
oldOutlineBox = absoluteOutlineBounds();
}
LayoutStateMaintainer statePusher(view(), this, IntSize(xPos(), yPos()), !m_hasColumns && !hasReflection());
LayoutStateMaintainer statePusher(view(), this, IntSize(xPos(), yPos()), !m_hasColumns && !hasTransform() && !hasReflection());
int oldWidth = m_width;
int oldColumnWidth = desiredColumnWidth();
......@@ -1390,7 +1390,7 @@ bool RenderBlock::layoutOnlyPositionedObjects()
if (!posChildNeedsLayout() || normalChildNeedsLayout() || selfNeedsLayout())
return false;
LayoutStateMaintainer statePusher(view(), this, IntSize(xPos(), yPos()), !m_hasColumns);
LayoutStateMaintainer statePusher(view(), this, IntSize(xPos(), yPos()), !m_hasColumns && !hasTransform() && !hasReflection());
if (needsPositionedMovementLayout()) {
tryLayoutDoingPositionedMovementOnly();
......
......@@ -220,7 +220,7 @@ void RenderFlexibleBox::layoutBlock(bool relayoutChildren)
oldOutlineBox = absoluteOutlineBounds();
}
LayoutStateMaintainer statePusher(view(), this, IntSize(m_x, m_y), !hasReflection());
LayoutStateMaintainer statePusher(view(), this, IntSize(m_x, m_y), !hasTransform() && !hasReflection());
int previousWidth = m_width;
int previousHeight = m_height;
......
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