2009-04-20 Simon Fraser <simon.fraser@apple.com>

        Reviewed by Eric Seidel

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

        outlineBoundsForRepaint() should compute a quad relative to the
        repaintContainer. This fixes the repaint issues originally fixed in
        https://bugs.webkit.org/show_bug.cgi?id=12885 for elements in compositing layers.
        Failure was only apparent when building with ACCELERATED_COMPOSITING enabled.

        Tests: compositing/repaint/content-into-overflow.html
               compositing/repaint/overflow-into-content.html

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::outlineBoundsForRepaint):

git-svn-id: svn://svn.chromium.org/blink/trunk@42675 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 0049c5b0
2009-04-20 Simon Fraser <simon.fraser@apple.com>
Reviewed by Eric Seidel
https://bugs.webkit.org/show_bug.cgi?id=25282
outlineBoundsForRepaint() should compute a quad relative to the
repaintContainer. This fixes the repaint issues originally fixed in
https://bugs.webkit.org/show_bug.cgi?id=12885 for elements in compositing layers.
* compositing/repaint/content-into-overflow.html: Added.
* compositing/repaint/overflow-into-content.html: Added.
* platform/mac/compositing/repaint/content-into-overflow-expected.txt: Added.
* platform/mac/compositing/repaint/overflow-into-content-expected.txt: Added.
2009-04-19 Dan Bernstein <mitz@apple.com> 2009-04-19 Dan Bernstein <mitz@apple.com>
Reviewed by Mark Rowe. Reviewed by Mark Rowe.
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test for bug 25282 (bug 12885 with a repaint container)</title>
<style type="text/css">
div.wrapper {
height: 420px;
width: 120px;
margin: 20px;
-webkit-transform: translateZ(0);
}
div.outer { position: absolute; }
div.wide { width: 100px; height: 50px; }
div.narrow { width: 50px; }
div.tall { width: 50px; height: 100px; }
div.short { height: 50px; width: 50px; }
#main-content { float: left; width: 100px; height: 80px; }
#target3 { display: none; clear: both; height: 20px; background: green; }
</style>
<script>
if (window.layoutTestController)
layoutTestController.waitUntilDone();
function repaintTest()
{
document.getElementById('target1').style.width = 'auto';
document.getElementById('target2').style.height = 'auto';
document.getElementById('target3').style.display = 'block';
if (window.layoutTestController)
layoutTestController.notifyDone();
}
function runRepaintTest()
{
setTimeout(repaintTest, 0);
}
</script>
</head>
<body onload="runRepaintTest();">
<div class="wrapper">
<div class="outer" style="border: medium solid green; top: 8px; height: 100px;">
<div class="narrow" id="target1">
<div class="wide"></div>
</div>
</div>
<div class="outer" style="border: medium solid green; top: 158px; width: 100px;">
<div class="short" id="target2">
<div class="tall"></div>
</div>
</div>
<div class="outer" style="top: 308px;">
<div style="background: green;">
<div style="position: relative;">
<div id="main-content">
</div>
</div>
<div id="target3"></div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test for bug 25282 (bug 12885 with a repaint container)</title>
<style type="text/css">
div.wrapper {
height: 420px;
width: 120px;
margin: 20px;
-webkit-transform: translateZ(0);
}
div.outer { position: absolute; }
div.wide { width: 100px; height: 50px; }
div.narrow { width: 50px; }
div.tall { width: 50px; height: 100px; }
div.short { height: 50px; width: 50px; }
#main-content { float: left; width: 100px; height: 80px; }
#target3 { display: none; clear: both; height: 20px; background: green; }
</style>
<script>
if (window.layoutTestController)
layoutTestController.waitUntilDone();
function repaintTest()
{
document.getElementById('target1').style.width = '';
document.getElementById('target2').style.height = '';
document.getElementById('target3').style.display = '';
if (window.layoutTestController)
layoutTestController.notifyDone();
}
function runRepaintTest()
{
setTimeout(repaintTest, 0);
}
</script>
</head>
<body onload="runRepaintTest();">
<div class="wrapper">
<div class="outer" style="border: medium solid green; top: 8px; height: 100px;">
<div class="narrow" id="target1" style="width: auto;">
<div class="wide"></div>
</div>
</div>
<div class="outer" style="border: medium solid green; top: 158px; width: 100px;">
<div class="short" id="target2" style="height: auto;">
<div class="tall"></div>
</div>
</div>
<div class="outer" style="top: 308px;">
<div style="background: green;">
<div style="position: relative;">
<div id="main-content">
</div>
</div>
<div id="target3" style="display: block;"></div>
</div>
</div>
</div>
</body>
</html>
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x460
RenderBlock {HTML} at (0,0) size 800x460
RenderBody {BODY} at (8,20) size 784x420
layer at (28,20) size 120x420
RenderBlock {DIV} at (20,0) size 120x420
layer at (28,28) size 106x106
RenderBlock (positioned) {DIV} at (0,8) size 106x106 [border: (3px solid #008000)]
RenderBlock {DIV} at (3,3) size 100x50
RenderBlock {DIV} at (0,0) size 100x50
layer at (28,178) size 106x106
RenderBlock (positioned) {DIV} at (0,158) size 106x106 [border: (3px solid #008000)]
RenderBlock {DIV} at (3,3) size 50x100
RenderBlock {DIV} at (0,0) size 50x100
layer at (28,328) size 100x100
RenderBlock (positioned) {DIV} at (0,308) size 100x100
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#008000]
RenderBlock {DIV} at (0,80) size 100x20
layer at (28,328) size 100x80
RenderBlock (relative positioned) {DIV} at (0,0) size 100x0
RenderBlock (floating) {DIV} at (0,0) size 100x80
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x460
RenderBlock {HTML} at (0,0) size 800x460
RenderBody {BODY} at (8,20) size 784x420
layer at (28,20) size 120x420
RenderBlock {DIV} at (20,0) size 120x420
layer at (28,28) size 103x106
RenderBlock (positioned) {DIV} at (0,8) size 56x106 [border: (3px solid #008000)]
RenderBlock {DIV} at (3,3) size 50x50
RenderBlock {DIV} at (0,0) size 100x50
layer at (28,178) size 106x103
RenderBlock (positioned) {DIV} at (0,158) size 106x56 [border: (3px solid #008000)]
RenderBlock {DIV} at (3,3) size 50x50
RenderBlock {DIV} at (0,0) size 50x100
layer at (28,328) size 100x80
RenderBlock (positioned) {DIV} at (0,308) size 100x80
RenderBlock {DIV} at (0,0) size 100x0 [bgcolor=#008000]
layer at (28,328) size 100x80
RenderBlock (relative positioned) {DIV} at (0,0) size 100x0
RenderBlock (floating) {DIV} at (0,0) size 100x80
2009-04-20 Simon Fraser <simon.fraser@apple.com>
Reviewed by Eric Seidel
https://bugs.webkit.org/show_bug.cgi?id=25282
outlineBoundsForRepaint() should compute a quad relative to the
repaintContainer. This fixes the repaint issues originally fixed in
https://bugs.webkit.org/show_bug.cgi?id=12885 for elements in compositing layers.
Failure was only apparent when building with ACCELERATED_COMPOSITING enabled.
Tests: compositing/repaint/content-into-overflow.html
compositing/repaint/overflow-into-content.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::outlineBoundsForRepaint):
2009-04-20 Sam Weinig <sam@webkit.org> 2009-04-20 Sam Weinig <sam@webkit.org>
Rubber-stamped by Tim Hatcher. Rubber-stamped by Tim Hatcher.
...@@ -341,14 +341,13 @@ FloatQuad RenderBox::absoluteContentQuad() const ...@@ -341,14 +341,13 @@ FloatQuad RenderBox::absoluteContentQuad() const
return localToAbsoluteQuad(FloatRect(rect)); return localToAbsoluteQuad(FloatRect(rect));
} }
IntRect RenderBox::outlineBoundsForRepaint(RenderBoxModelObject* repaintContainer) const
IntRect RenderBox::outlineBoundsForRepaint(RenderBoxModelObject* /*repaintContainer*/) const
{ {
IntRect box = borderBoundingBox(); IntRect box = borderBoundingBox();
adjustRectForOutlineAndShadow(box); adjustRectForOutlineAndShadow(box);
FloatQuad absOutlineQuad = localToAbsoluteQuad(FloatRect(box)); FloatQuad containerRelativeQuad = localToContainerQuad(FloatRect(box), repaintContainer);
box = absOutlineQuad.enclosingBoundingBox(); box = containerRelativeQuad.enclosingBoundingBox();
// FIXME: layoutDelta needs to be applied in parts before/after transforms and // FIXME: layoutDelta needs to be applied in parts before/after transforms and
// repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308 // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308
......
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