2011-05-13 Jer Noble <jer.noble@apple.com>
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 May 2011 17:50:54 +0000 (17:50 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 May 2011 17:50:54 +0000 (17:50 +0000)
commit05514342abdfa719c5d18bec22e0b76ff96243e9
treee4a81967f3bcd19fe1e05ab90c97ba04d546bec5
parent61eddf6f707f804aaa0522f25fee4e043d32f20b
2011-05-13  Jer Noble  <jer.noble@apple.com>

        Reviewed by Simon Fraser.

        Video is blank, controller is misplaced on trailers.apple.com movie in fullscreen (with two screens)
        https://bugs.webkit.org/show_bug.cgi?id=60826

        Listen for a WebKitLayerHostChanged notification and, if the affected layer is an
        ancestor layer of the qtMovieLayer, tear down the layer and recreate it the
        next time setVisible(true) is called.

        * dom/Document.cpp:
        (WebCore::Document::webkitDidEnterFullScreenForElement):  Call setFullScreenRootLayer(0)
            before disabling animation on the full screen renderer.
        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivateQTKit::createQTMovie): Register an observer for the new
            WebKitLayerHostChanged notification.
        (WebCore::layerIsDescendentOf): Added.
        (WebCore::MediaPlayerPrivateQTKit::layerHostChanged): Added.  If the changed
            layer is an ancestor of the movie layer, tear down rendering and re-
            create the next time setVisible(true) is called.
        (-[WebCoreMovieObserver layerHostChanged:]):  Added ObjC listener wrapper.
2011-05-13  Jer Noble  <jer.noble@apple.com>

        Reviewed by Simon Fraser.

        Video is blank, controller is misplaced on trailers.apple.com movie in fullscreen (with two screens)
        https://bugs.webkit.org/show_bug.cgi?id=60826

        Emit a notification when moving a CALayer from the WebProcess's main
        layer host to a new context.  This allows listeners to invalidate their
        layers which may not support moving between different CAContexts (as is
        the case with QTMovieLayer).  In order to allow listeners to determine if they
        are affected, the notification will pass the root CALayer in a userInfo
        dictionary.

        In WebFullScreenManagerMac, move from storing a pointer to a non-refcounted
        class (GraphicsLayer) to a retainable class (PlatformLayer).

        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
        (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): No need to initialize
            m_fullScreenRootLayer now that it is a RetainPtr<>.
        (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Emit a notification
            after either creating or destroying the full screen layer host.
        (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation):
        (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.h
Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm