Skip to content
Permalink
Browse files
2011-04-19 Antoine Labour <piman@chromium.org>
        Reviewed by James Robinson.

        For invisible iframes, propagate compositing to parent instead of setting self
        as root.
        https://bugs.webkit.org/show_bug.cgi?id=58414

        * compositing/iframes/invisible-iframe-expected.checksum: Added.
        * compositing/iframes/invisible-iframe-expected.png: Added.
        * compositing/iframes/invisible-iframe-expected.txt: Added.
        * compositing/iframes/invisible-iframe.html: Added.
        * compositing/iframes/invisible-nested-iframe-expected.checksum: Added.
        * compositing/iframes/invisible-nested-iframe-expected.png: Added.
        * compositing/iframes/invisible-nested-iframe-expected.txt: Added.
        * compositing/iframes/invisible-nested-iframe-hide-expected.txt: Added.
        * compositing/iframes/invisible-nested-iframe-hide.html: Added.
        * compositing/iframes/invisible-nested-iframe-show-expected.txt: Added.
        * compositing/iframes/invisible-nested-iframe-show.html: Added.
        * compositing/iframes/invisible-nested-iframe.html: Added.
        * platform/chromium-gpu/compositing/iframes/invisible-nested-iframe-show-expected.txt: Added.
2011-04-19  Antoine Labour  <piman@chromium.org>

        Reviewed by James Robinson.

        For invisible iframes, propagate compositing to parent instead of setting self
        as root.
        https://bugs.webkit.org/show_bug.cgi?id=58414

        Tests: compositing/iframes/invisible-iframe.html
               compositing/iframes/invisible-nested-iframe-hide.html
               compositing/iframes/invisible-nested-iframe-show.html
               compositing/iframes/invisible-nested-iframe.html

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame):
        Propagate compositing to parent even if frame owner has no renderer.

Canonical link: https://commits.webkit.org/74047@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
jamesr committed Apr 19, 2011
1 parent cadd9cc commit 3a505a27de707219a63e3401f56ecd6c56855fef
@@ -1,3 +1,25 @@
2011-04-19 Antoine Labour <piman@chromium.org>

Reviewed by James Robinson.

For invisible iframes, propagate compositing to parent instead of setting self
as root.
https://bugs.webkit.org/show_bug.cgi?id=58414

* compositing/iframes/invisible-iframe-expected.checksum: Added.
* compositing/iframes/invisible-iframe-expected.png: Added.
* compositing/iframes/invisible-iframe-expected.txt: Added.
* compositing/iframes/invisible-iframe.html: Added.
* compositing/iframes/invisible-nested-iframe-expected.checksum: Added.
* compositing/iframes/invisible-nested-iframe-expected.png: Added.
* compositing/iframes/invisible-nested-iframe-expected.txt: Added.
* compositing/iframes/invisible-nested-iframe-hide-expected.txt: Added.
* compositing/iframes/invisible-nested-iframe-hide.html: Added.
* compositing/iframes/invisible-nested-iframe-show-expected.txt: Added.
* compositing/iframes/invisible-nested-iframe-show.html: Added.
* compositing/iframes/invisible-nested-iframe.html: Added.
* platform/chromium-gpu/compositing/iframes/invisible-nested-iframe-show-expected.txt: Added.

2011-04-19 Chris Rogers <crogers@google.com>

Unreviewed.
@@ -0,0 +1 @@
3a4ec147fd2cd6a126f27183831384b4
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,7 @@
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x230
RenderBlock {HTML} at (0,0) size 800x230
RenderBody {BODY} at (8,10) size 784x210
layer at (18,10) size 210x210
RenderBlock {DIV} at (10,0) size 210x210 [bgcolor=#0000FF]
@@ -0,0 +1,36 @@
<!DOCTYPE html>

<html>
<head>
<style type="text/css" media="screen">
iframe {
border: 10px solid black;
padding: 5px;
height: 150px;
width: 300px;
-webkit-box-shadow: 0 0 20px black;
}
.box {
height: 200px;
width: 200px;
margin: 10px;
padding: 5px;
background-color: blue;
-webkit-transform: translateZ(0);
overflow:hidden;
}
.box:hover {
-webkit-transform: none;
}
</style>
</head>
<body>

<!-- The invisible iframe should not set itself as the root layer. -->
<div style="display: none;">
<iframe src="resources/composited-subframe.html"></iframe>
</div>
<div class="box">
</div>
</body>
</html>
@@ -0,0 +1 @@
3a4ec147fd2cd6a126f27183831384b4
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,7 @@
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x230
RenderBlock {HTML} at (0,0) size 800x230
RenderBody {BODY} at (8,10) size 784x210
layer at (18,10) size 210x210
RenderBlock {DIV} at (10,0) size 210x210 [bgcolor=#0000FF]
@@ -0,0 +1,16 @@
(GraphicsLayer
(bounds 800.00 600.00)
(children 1
(GraphicsLayer
(bounds 800.00 600.00)
(children 1
(GraphicsLayer
(position 18.00 10.00)
(bounds 210.00 210.00)
(drawsContent 1)
)
)
)
)
)

@@ -0,0 +1,59 @@
<!DOCTYPE html>

<html>
<head>
<style type="text/css" media="screen">
iframe {
border: 10px solid black;
padding: 5px;
height: 150px;
width: 300px;
-webkit-box-shadow: 0 0 20px black;
}
.box {
height: 200px;
width: 200px;
margin: 10px;
padding: 5px;
background-color: blue;
-webkit-transform: translateZ(0);
overflow:hidden;
}
.box:hover {
-webkit-transform: none;
}
</style>
<script type="text/javascript" charset="utf-8">

if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}

function doTest()
{
window.setTimeout(function() {
var div = document.getElementById('invisible');
div.style.cssText = "display:none;";
if (window.layoutTestController) {
layoutTestController.display();
document.getElementById('layers').innerHTML = layoutTestController.layerTreeAsText();
layoutTestController.notifyDone();
}
}, 0)
}

window.addEventListener('load', doTest, false);
</script>
</head>
<body>

<!-- The nested iframe should disappear when we set it to "diplay:none". -->
<div id="invisible">
<iframe src="resources/intermediate-frame.html"></iframe>
</div>
<div class="box">
</div>
<pre id="layers">Layer tree appears here in DRT.</pre>
</body>
</html>
@@ -0,0 +1,86 @@

(GraphicsLayer
(bounds 800.00 600.00)
(children 1
(GraphicsLayer
(bounds 800.00 600.00)
(children 2
(GraphicsLayer
(position -12.00 -12.00)
(bounds 370.00 220.00)
(drawsContent 1)
(children 1
(GraphicsLayer
(position 35.00 35.00)
(children 1
(GraphicsLayer
(bounds 285.00 150.00)
(children 1
(GraphicsLayer
(children 1
(GraphicsLayer
(bounds 285.00 192.00)
(children 1
(GraphicsLayer
(bounds 285.00 192.00)
(drawsContent 1)
(children 1
(GraphicsLayer
(position 8.00 8.00)
(bounds 252.00 172.00)
(drawsContent 1)
(children 1
(GraphicsLayer
(position 1.00 1.00)
(children 1
(GraphicsLayer
(bounds 250.00 170.00)
(children 1
(GraphicsLayer
(children 1
(GraphicsLayer
(bounds 250.00 230.00)
(children 1
(GraphicsLayer
(bounds 250.00 230.00)
(drawsContent 1)
(children 1
(GraphicsLayer
(position 18.00 10.00)
(bounds 210.00 210.00)
(drawsContent 1)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
(GraphicsLayer
(position 18.00 202.00)
(bounds 210.00 210.00)
(drawsContent 1)
)
)
)
)
)

@@ -0,0 +1,59 @@
<!DOCTYPE html>

<html>
<head>
<style type="text/css" media="screen">
iframe {
border: 10px solid black;
padding: 5px;
height: 150px;
width: 300px;
-webkit-box-shadow: 0 0 20px black;
}
.box {
height: 200px;
width: 200px;
margin: 10px;
padding: 5px;
background-color: blue;
-webkit-transform: translateZ(0);
overflow:hidden;
}
.box:hover {
-webkit-transform: none;
}
</style>
<script type="text/javascript" charset="utf-8">

if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}

function doTest()
{
window.setTimeout(function() {
var div = document.getElementById('invisible');
div.style.cssText = "";
if (window.layoutTestController) {
layoutTestController.display();
document.getElementById('layers').innerHTML = layoutTestController.layerTreeAsText();
layoutTestController.notifyDone();
}
}, 0)
}

window.addEventListener('load', doTest, false);
</script>
</head>
<body>

<!-- The nested iframe should appear when we remove "diplay:none". -->
<div id="invisible" style="display:none;">
<iframe src="resources/intermediate-frame.html"></iframe>
</div>
<div class="box">
</div>
<pre id="layers">Layer tree appears here in DRT.</pre>
</body>
</html>
@@ -0,0 +1,36 @@
<!DOCTYPE html>

<html>
<head>
<style type="text/css" media="screen">
iframe {
border: 10px solid black;
padding: 5px;
height: 150px;
width: 300px;
-webkit-box-shadow: 0 0 20px black;
}
.box {
height: 200px;
width: 200px;
margin: 10px;
padding: 5px;
background-color: blue;
-webkit-transform: translateZ(0);
overflow:hidden;
}
.box:hover {
-webkit-transform: none;
}
</style>
</head>
<body>

<!-- The nested iframe inside invisible iframe should not set itself as the root layer. -->
<div style="display: none;">
<iframe src="resources/intermediate-frame.html"></iframe>
</div>
<div class="box">
</div>
</body>
</html>

0 comments on commit 3a505a2

Please sign in to comment.