Skip to content
Permalink
Browse files
2011-05-29 Jer Noble <jer.noble@apple.com>
        Reviewed by Simon Fraser.

        REGRESSION (r86924): webkitRequestFullScreen does not work properly (black screen, can’t interact)
        https://bugs.webkit.org/show_bug.cgi?id=61710

        When taking the documentElement full screen, we don't create a RenderFullScreen
        object and thus never enter accelerated compositing mode for the animation. Tell
        the WKFullScreenWindowController to enter accelerated compositing mode anyway
        (with an empty layer context) so as to fulfill its expectations and cause the
        full screen animation to complete.

        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Added a
            comment explaining when we expect the animation to complete.
        (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]):
            Remove an ASSERT which is no longer valid.
        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
        (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): Tell the UIProcess
            to enter then exit full-screen mode.
        (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.

Canonical link: https://commits.webkit.org/77147@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@87652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
jernoble committed May 29, 2011
1 parent 6e9551b commit 48b89a9f94f9161fa1e8c2126407b37762230455
@@ -1,3 +1,26 @@
2011-05-29 Jer Noble <jer.noble@apple.com>

Reviewed by Simon Fraser.

REGRESSION (r86924): webkitRequestFullScreen does not work properly (black screen, can’t interact)
https://bugs.webkit.org/show_bug.cgi?id=61710

When taking the documentElement full screen, we don't create a RenderFullScreen
object and thus never enter accelerated compositing mode for the animation. Tell
the WKFullScreenWindowController to enter accelerated compositing mode anyway
(with an empty layer context) so as to fulfill its expectations and cause the
full screen animation to complete.

* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Added a
comment explaining when we expect the animation to complete.
(-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]):
Remove an ASSERT which is no longer valid.
* WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
(WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): Tell the UIProcess
to enter then exit full-screen mode.
(WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.

2011-05-29 Darin Adler <darin@apple.com>

Reviewed by Dan Bernstein.
@@ -272,6 +272,8 @@ - (void)finishedEnterFullScreenAnimation:(bool)completed
#endif
[self _manager]->didEnterFullScreen();
}

// Complete the animation once -(void)exitCompositingMode is called.
}

- (void)exitFullScreen
@@ -362,8 +364,6 @@ - (void)enterAcceleratedCompositingMode:(const WebKit::LayerTreeContext&)layerTr
{
if (_layerHostingView)
return;

ASSERT(!layerTreeContext.isEmpty());

// Create an NSView that will host our layer tree.
_layerHostingView.adoptNS([[NSView alloc] initWithFrame:[[self window] frame]]);
@@ -190,8 +190,10 @@ - (void)invalidate

if (!m_rootLayer || m_rootLayer->children().isEmpty()) {
// If we don't have a root layer, we can't animate in and out of full screen
m_page->send(Messages::WebFullScreenManagerProxy::EnterAcceleratedCompositingMode(m_layerTreeContext));
this->beganEnterFullScreenAnimation();
this->finishedEnterFullScreenAnimation(true);
m_page->send(Messages::WebFullScreenManagerProxy::ExitAcceleratedCompositingMode());
return;
}

@@ -211,8 +213,10 @@ - (void)invalidate

if (!m_rootLayer || m_rootLayer->children().isEmpty()) {
// If we don't have a root layer, we can't animate in and out of full screen
m_page->send(Messages::WebFullScreenManagerProxy::EnterAcceleratedCompositingMode(m_layerTreeContext));
this->beganExitFullScreenAnimation();
this->finishedExitFullScreenAnimation(true);
m_page->send(Messages::WebFullScreenManagerProxy::ExitAcceleratedCompositingMode());
return;
}

0 comments on commit 48b89a9

Please sign in to comment.