Title: [88599] trunk/Source
- Revision
- 88599
- Author
- [email protected]
- Date
- 2011-06-10 23:23:20 -0700 (Fri, 10 Jun 2011)
Log Message
2011-06-09 Jer Noble <[email protected]>
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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm (88598 => 88599)
--- trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm 2011-06-11 06:04:28 UTC (rev 88598)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm 2011-06-11 06:23:20 UTC (rev 88599)
@@ -393,8 +393,11 @@
void MediaPlayerPrivateAVFoundationObjC::platformSetVisible(bool isVisible)
{
+ [CATransaction begin];
+ [CATransaction setDisableActions:YES];
if (m_videoLayer)
[m_videoLayer.get() setHidden:!isVisible];
+ [CATransaction commit];
}
void MediaPlayerPrivateAVFoundationObjC::platformPlay()
Modified: trunk/Source/WebKit2/ChangeLog (88598 => 88599)
--- trunk/Source/WebKit2/ChangeLog 2011-06-11 06:04:28 UTC (rev 88598)
+++ trunk/Source/WebKit2/ChangeLog 2011-06-11 06:23:20 UTC (rev 88599)
@@ -1,3 +1,21 @@
+2011-06-09 Jer Noble <[email protected]>
+
+ 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 <[email protected]>
Reviewed by Sam Weinig.
Modified: trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm (88598 => 88599)
--- trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm 2011-06-11 06:04:28 UTC (rev 88598)
+++ trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm 2011-06-11 06:23:20 UTC (rev 88599)
@@ -194,14 +194,15 @@
// 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 @@
- (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 -
Modified: trunk/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm (88598 => 88599)
--- trunk/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm 2011-06-11 06:04:28 UTC (rev 88598)
+++ trunk/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm 2011-06-11 06:23:20 UTC (rev 88599)
@@ -186,9 +186,12 @@
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];
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes