Commit 508c6cd9 authored by jer.noble@apple.com's avatar jer.noble@apple.com
Browse files

2011-06-09 Jer Noble <jer.noble@apple.com>

        Reviewed by Darin Adler.

        AVPlayerLayer is adding a "fade" animation during Safari full-screen
        https://bugs.webkit.org/show_bug.cgi?id=62433

        CoreAnimation will add default animations when certain properties are changed, unless
        those changes are wrapped in a CATransaction which has had its disableActions property set
        to true.  Wrap each of these three property changes in a CATransaction and disable its actions,
        so that the default "fade" animation is not created in response.

        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController enterFullScreen:]): Wrap with CATransaction.
        (-[WKFullScreenWindowController _swapView:with:]): Ditto:
        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
        (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@88599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f5d6e38d
......@@ -393,8 +393,11 @@ PlatformLayer* MediaPlayerPrivateAVFoundationObjC::platformLayer() const
void MediaPlayerPrivateAVFoundationObjC::platformSetVisible(bool isVisible)
{
[CATransaction begin];
[CATransaction setDisableActions:YES];
if (m_videoLayer)
[m_videoLayer.get() setHidden:!isVisible];
[CATransaction commit];
}
void MediaPlayerPrivateAVFoundationObjC::platformPlay()
......
2011-06-09 Jer Noble <jer.noble@apple.com>
Reviewed by Darin Adler.
AVPlayerLayer is adding a "fade" animation during Safari full-screen
https://bugs.webkit.org/show_bug.cgi?id=62433
CoreAnimation will add default animations when certain properties are changed, unless
those changes are wrapped in a CATransaction which has had its disableActions property set
to true. Wrap each of these three property changes in a CATransaction and disable its actions,
so that the default "fade" animation is not created in response.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController enterFullScreen:]): Wrap with CATransaction.
(-[WKFullScreenWindowController _swapView:with:]): Ditto:
* WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
(WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Ditto.
2011-06-10 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
......
......@@ -194,14 +194,15 @@ static void exitCompositedModeRepaintCompleted(WKErrorRef, void* context);
// monitors, we must create a window large enough to contain the destination
// frame and the initial frame.
NSRect windowFrame = NSUnionRect(screenFrame, webViewFrame);
[CATransaction begin];
[CATransaction setDisableActions:YES];
[[self window] setFrame:windowFrame display:YES];
CALayer* backgroundLayer = [[self _fullScreenWindow] backgroundLayer];
NSRect backgroundFrame = {[[self window] convertScreenToBase:screenFrame.origin], screenFrame.size};
backgroundFrame = [[[self window] contentView] convertRectFromBase:backgroundFrame];
[CATransaction begin];
[CATransaction setDisableActions:YES];
[backgroundLayer setFrame:NSRectToCGRect(backgroundFrame)];
[CATransaction commit];
......@@ -583,10 +584,13 @@ static void exitCompositedModeRepaintCompleted(WKErrorRef, void* context)
- (void)_swapView:(NSView*)view with:(NSView*)otherView
{
[CATransaction begin];
[CATransaction setDisableActions:YES];
[otherView setFrame:[view frame]];
[otherView setAutoresizingMask:[view autoresizingMask]];
[otherView removeFromSuperview];
[[view superview] replaceSubview:view with:otherView];
[CATransaction commit];
}
#pragma mark -
......
......@@ -186,9 +186,12 @@ void WebFullScreenManagerMac::setRootFullScreenLayer(WebCore::GraphicsLayer* lay
m_page->send(Messages::WebFullScreenManagerProxy::EnterAcceleratedCompositingMode(m_layerTreeContext));
}
[CATransaction begin];
[CATransaction setDisableActions:YES];
m_rootLayer->removeAllChildren();
m_rootLayer->addChild(layer);
m_rootLayer->syncCompositingState();
[CATransaction commit];
[[NSNotificationCenter defaultCenter] postNotificationName:@"WebKitLayerHostChanged" object:m_rootLayer->platformLayer() userInfo:nil];
}
......
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