Commit 5a4bdf3e authored by mitz@apple.com's avatar mitz@apple.com

WebCore:

        Reviewed by Antti Koivisto.

        - fix a bug in invisible layer culling: dynamically changing a 
          descendant of an invisible layer to be visible did not work

        Test: fast/layers/layer-content-visibility-change.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::setHasVisibleContent): If we got visible content,
        make sure that our stacking context rebuilds its z-order lists to
        include us.

LayoutTests:

        Reviewed by Antti Koivisto.

        - test that dynamically changing a descendant of an invisible layer to
          be visible works

        * fast/layers/layer-content-visibility-change.html: Added.
        * platform/mac/fast/layers/layer-content-visibility-change-expected.checksum: Added.
        * platform/mac/fast/layers/layer-content-visibility-change-expected.png: Added.
        * platform/mac/fast/layers/layer-content-visibility-change-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 356b4e99
2007-11-09 Dan Bernstein <mitz@apple.com>
Reviewed by Antti Koivisto.
- test that dynamically changing a descendant of an invisible layer to
be visible works
* fast/layers/layer-content-visibility-change.html: Added.
* platform/mac/fast/layers/layer-content-visibility-change-expected.checksum: Added.
* platform/mac/fast/layers/layer-content-visibility-change-expected.png: Added.
* platform/mac/fast/layers/layer-content-visibility-change-expected.txt: Added.
2007-11-09 Beth Dakin <bdakin@apple.com>
Reviewed by Oliver.
......
<div style="position: relative;">
<div style="width: 100px; height: 100px; background-color: red;"></div>
<div style="visibility: hidden; position: absolute; top: 0;">
<div id="inner" style="width: 100px; height: 100px; background-color: green;"></div>
</div>
</div>
<script>
function test()
{
document.getElementById("inner").style.visibility = "visible";
}
if (window.layoutTestController) {
document.body.offsetTop;
layoutTestController.display();
test();
} else
setTimeout(test, 0);
</script>
e1a695f3d1889abdff11e18becb6e3f0
\ No newline at end of file
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
layer at (8,8) size 784x100
RenderBlock (relative positioned) {DIV} at (0,0) size 784x100
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]
layer at (8,8) size 100x100
RenderBlock (positioned) {DIV} at (0,0) size 100x100
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#008000]
2007-11-09 Dan Bernstein <mitz@apple.com>
Reviewed by Antti Koivisto.
- fix a bug in invisible layer culling: dynamically changing a
descendant of an invisible layer to be visible did not work
Test: fast/layers/layer-content-visibility-change.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setHasVisibleContent): If we got visible content,
make sure that our stacking context rebuilds its z-order lists to
include us.
2007-11-09 David Hyatt <hyatt@apple.com>
Clean up matrix() parsing. Make sure the first four arguments can be lengths or numbers. The last two
......
......@@ -245,7 +245,7 @@ void RenderLayer::updateTransform()
}
}
void RenderLayer::setHasVisibleContent(bool b)
void RenderLayer::setHasVisibleContent(bool b)
{
if (m_hasVisibleContent == b && !m_visibleContentStatusDirty)
return;
......@@ -254,6 +254,10 @@ void RenderLayer::setHasVisibleContent(bool b)
if (m_hasVisibleContent) {
m_repaintRect = renderer()->absoluteClippedOverflowRect();
m_outlineBox = renderer()->absoluteOutlineBox();
if (!isOverflowOnly()) {
if (RenderLayer* sc = stackingContext())
sc->dirtyZOrderLists();
}
}
if (parent())
parent()->childVisibilityChanged(m_hasVisibleContent);
......
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