haikuwebkit/LayoutTests/compositing/nested-direct-image-composi...

60 lines
962 B
HTML
Raw Permalink Normal View History

Coordinated Graphics: Remove an invisible TiledBackingStore of CoordinatedGraphicsLayer. https://bugs.webkit.org/show_bug.cgi?id=101424 Patch by Huang Dongsung <luxtella@company100.net> on 2012-11-08 Reviewed by Noam Rosenthal. Source/WebCore: This patch adds ASSERT to TextureMapperLayer while fixing this bug in WebKit2. * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::paintSelf): Source/WebKit2: We must remove an invisible TiledBackingStore of CoordinatedGraphicsLayer. Currently, CoordinatedGraphicsLayer only removes a TiledBackingStore if !drawsContent() while TextureMapperLayer::updateBackingStore() removes a backing store if (!m_state.drawsContent || !m_state.contentsVisible || m_size.isEmpty()). CoordinatedGraphicsLayer must have the same behavior. In addition, this patch makes LayerTreeRenderer remove a backing store from GraphicsLayerTextureMapper when CoordinatedBackingStore does not have any tiles. Test: compositing/nested-direct-image-compositing.html * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp: (WebKit::CoordinatedBackingStore::removeTile): (WebKit::CoordinatedBackingStore::isEmpty): (WebKit): (WebKit::CoordinatedBackingStore::commitTileOperations): * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h: (CoordinatedBackingStore): * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::removeBackingStoreIfNeeded): (WebKit): (WebKit::LayerTreeRenderer::removeTile): * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h: (LayerTreeRenderer): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::adjustContentsScale): LayoutTests: Coordinated Graphics had a bug when a compositing div has a compositing img with an absolute position property. This test is added to prevent from a regression. * compositing/nested-direct-image-compositing-expected.png: Added. * compositing/nested-direct-image-compositing-expected.txt: Added. * compositing/nested-direct-image-compositing.html: Added. Canonical link: https://commits.webkit.org/119744@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@133955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-11-08 22:37:57 +00:00
<!DOCTYPE html>
<html>
<head>
<title>Check to disappear the afterimage after changing the style of an img tag.</title>
<style type="text/css">
div.cell
{
-webkit-transform: translate3d(0, 0, 0);
}
img
{
position: absolute;
-webkit-transform: translate3d(0, 0, 0);
}
div.magnify img
{
-webkit-transform: scale(2.0);
}
</style>
</head>
<body>
<div class="cell magnify" id="cell">
<img src="resources/simple_image.png">
</div>
<script type="text/javascript">
function updateStack()
{
var cell = document.getElementById("cell");
cell.className = "cell";
setTimeout(function() {
if (window.testRunner) {
window.testRunner.notifyDone();
}
}, 10);
}
window.onload = function ()
{
if (window.testRunner) {
window.testRunner.dumpAsText(true);
window.testRunner.waitUntilDone();
}
setTimeout(function() {
updateStack();
}, 200);
}
</script>
</body>
</html>