2011-05-13 Jer Noble <jer.noble@apple.com>
authorJer Noble <jer.noble@apple.com>
Mon, 16 May 2011 17:50:54 +0000 (17:50 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Fri, 3 Jun 2011 20:37:11 +0000 (17:37 -0300)
commit9f2e6b1f702a5d518586a36c8999173456bfc128
tree1af1bc664f0119b8e3bdd76a887d2e759b2b7b5e
parent178109ae8b55f7bdf6e9fda9678f77dfc3e72a55
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: http://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