Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Overlap map for compositing should ignore empty layers
https://bugs.webkit.org/show_bug.cgi?id=63499 Reviewed by Simon Fraser. Source/WebCore: Test: compositing/layer-creation/overlap-empty-layer.html * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::addToOverlapMap): (WebCore::RenderLayerCompositor::computeCompositingRequirements): LayoutTests: * compositing/layer-creation/overlap-empty-layer-expected.txt: Added. * compositing/layer-creation/overlap-empty-layer.html: Added. Canonical link: https://commits.webkit.org/97606@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
5 changed files
with
100 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
LayoutTests/compositing/layer-creation/overlap-empty-layer-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
(GraphicsLayer | ||
(bounds 842.00 600.00) | ||
(children 1 | ||
(GraphicsLayer | ||
(bounds 842.00 600.00) | ||
(children 1 | ||
(GraphicsLayer | ||
(position 8.00 8.00) | ||
(bounds 784.00 0.00) | ||
(transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [50.00 50.00 0.00 1.00]) | ||
(children 1 | ||
(GraphicsLayer | ||
(position 200.00 200.00) | ||
(bounds 80.00 80.00) | ||
(drawsContent 1) | ||
) | ||
) | ||
) | ||
) | ||
) | ||
) | ||
) | ||
|
51 changes: 51 additions & 0 deletions
51
LayoutTests/compositing/layer-creation/overlap-empty-layer.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<html> | ||
<head> | ||
<style> | ||
body { | ||
overflow: hidden; | ||
} | ||
|
||
#container { | ||
-webkit-transform: translate(50px, 50px); | ||
} | ||
|
||
#composited { | ||
-webkit-transform:translateZ(0); | ||
position:absolute; | ||
top: 200px; | ||
left: 200px; | ||
width: 80px; | ||
height: 80px; | ||
background-color: blue; | ||
} | ||
|
||
#overlap { | ||
position: absolute; | ||
top: 0px; | ||
left: 0px; | ||
width: 100px; | ||
height: 100px; | ||
background-color: blue; | ||
} | ||
</style> | ||
<script> | ||
if (window.layoutTestController) { | ||
layoutTestController.dumpAsText(false); | ||
window.addEventListener('load', function() { | ||
document.getElementById("layertree").innerText = layoutTestController.layerTreeAsText(); | ||
}, false); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<div id="container"> | ||
<div id="composited"></div> | ||
</div> | ||
|
||
<!-- This overlaps all of container, but not the composited child. --> | ||
<!-- It should not get its own composited layer. --> | ||
<div id="overlap"></div> | ||
|
||
<pre id="layertree"></pre> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters