2009-04-17 Simon Fraser <simon.fraser@apple.com>
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 19 Apr 2009 05:00:39 +0000 (05:00 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 19 Apr 2009 05:00:39 +0000 (05:00 +0000)
commitb9e6709acb8cf020688bbe7c7a35ca2b33ed98ae
treedb1a07c3a569a00f977d677274eafb0d7b553be3
parentba6557e75c6ec612e5a605291955521a6b346101
2009-04-17  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Antti Koivisto.

        https://bugs.webkit.org/show_bug.cgi?id=25066

        When a <video> element gained a RenderLayer via opacity, reflection etc., the
        layer hierarchy was not correctly updated because RenderMedia skipped a level
        when asked for its children; it skipped m_controlsShadowRoot's renderer, which
        actually has a layer.

        Test: fast/layers/video-layer.html

        * rendering/MediaControlElements.cpp:
        (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
        Don't manually call setParent() on the renderer. It will happen later
        as a result of addChild().

        * rendering/RenderMedia.cpp:
        (WebCore::RenderMedia::createControlsShadowRoot):
        Add m_controlsShadowRoot's renderer as a child.

        * rendering/RenderMedia.h:
        (WebCore::RenderMedia::children):
        Now maintain a RenderObjectChildList, m_children, and remove the unneeded
        removeChild() method. Make the two children() methods inline.

        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::moveLayers):
        Assert if moveLayers() is called with an oldParent that is not the
        layer's actual parent (which would have revealed this bug).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@42651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/layers/video-layer.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/layers/video-layer-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/layers/video-layer-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/layers/video-layer-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/MediaControlElements.cpp
WebCore/rendering/RenderMedia.cpp
WebCore/rendering/RenderMedia.h
WebCore/rendering/RenderObject.cpp