haikuwebkit/ManualTests/resize-repaint.html

27 lines
520 B
HTML
Raw Permalink Normal View History

Fix repaint issues when resizing a window with centered content, for platforms with a tile cache https://bugs.webkit.org/show_bug.cgi?id=105073 Reviewed by Dan Bernstein. Add a manual test for window resize with a centered element. * ManualTests/resize-repaint.html: Added. Source/WebCore: There were several issues with the "do full repaint" code path in FrameView::layout(). These caused repaint issues when resizing the web view, especially for platforms that use a tile cache. First, the m_doFullRepaint flag wold get clobbered on resize-layouts, because the call to adjustViewSize() re-enters layout(), and resets the m_doFullRepaint member variable to false, even if the outer call had previously set it to true. This would cause us to lose track of whether we needed to do a full repaint. The patch fixes this by restoring m_doFullRepaint to the value it had before the call to adjustViewSize(). The second problem was that full repaints would not propagate to compositing layers. They only repainted the RenderView, and on platforms that use a tile cache, this only repaints the top portion of that tile cache. This was fixed by sending a NeedsFullRepaintInBacking flag down into RenderLayer::updateLayerPositions(), and using that to do a full repaint on all compositing layers. Sending this new flag down into updateAfterLayout() prompted some boolean/flags cleanup with propagated into several files. This also allowed me to no longer include RenderLayerBacking.h in RenderLayerCompositor.h, but that required header cleanup in several files. Automated testing is not possible because WebKitTestRunner resizes the window asynchronously (bug 105101). Added manual test. * page/FrameView.cpp: (WebCore::updateLayerPositionFlags): (WebCore::FrameView::layout): * page/scrolling/ScrollingCoordinator.cpp: * page/scrolling/mac/ScrollingCoordinatorMac.mm: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): (WebCore::RenderLayer::updateCompositingLayersAfterScroll): * rendering/RenderLayer.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateAfterLayout): (WebCore::RenderLayerBacking::contentChanged): * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry): * rendering/RenderLayerCompositor.h: * rendering/RenderObject.cpp: * rendering/RenderView.cpp: Source/WebKit/chromium: Include RenderLayerBacking.h, which is no longer included by RenderLayerCompositor.h. * tests/ScrollingCoordinatorChromiumTest.cpp: Canonical link: https://commits.webkit.org/123324@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-12-15 22:11:27 +00:00
<!DOCTYPE html>
<html>
<head>
<style>
.container {
width: 700px;
height: 2000px;
margin: 0 auto;
background-color: silver;
}
</style>
<script>
function doTest()
{
window.scrollTo(0, 400);
window.resizeTo(1000, 600);
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<div class="container"></div>
<pre id="layers">Layer tree goes here</p>
</body>
</html>