Title: [172244] trunk/Source/WebCore
Revision
172244
Author
jeremyj...@apple.com
Date
2014-08-07 13:41:23 -0700 (Thu, 07 Aug 2014)

Log Message

Disable implicit animations on video layer.
https://bugs.webkit.org/show_bug.cgi?id=135679

Reviewed by Eric Carlson.

Disable implicit animations on AVPlayerLayer except when setting fullscreen frame.
This prevents unwanted animations.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): disable implicit animations
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame): allow implicit animations while changing fullscreen frame.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (172243 => 172244)


--- trunk/Source/WebCore/ChangeLog	2014-08-07 20:37:40 UTC (rev 172243)
+++ trunk/Source/WebCore/ChangeLog	2014-08-07 20:41:23 UTC (rev 172244)
@@ -1,3 +1,17 @@
+2014-08-06  Jeremy Jones  <jere...@apple.com>
+
+        Disable implicit animations on video layer.
+        https://bugs.webkit.org/show_bug.cgi?id=135679
+
+        Reviewed by Eric Carlson.
+
+        Disable implicit animations on AVPlayerLayer except when setting fullscreen frame.
+        This prevents unwanted animations.
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): disable implicit animations
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame): allow implicit animations while changing fullscreen frame.
+
 2014-08-07  Gordon Sheridan  <gordon_sheri...@apple.com>
 
         Provide methods to clear undesired references to HistoryItems that have been removed from the back/forard list.

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (172243 => 172244)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2014-08-07 20:37:40 UTC (rev 172243)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2014-08-07 20:41:23 UTC (rev 172244)
@@ -54,6 +54,7 @@
 #import "UUID.h"
 #import "VideoTrackPrivateAVFObjC.h"
 #import "WebCoreAVFResourceLoader.h"
+#import "WebCoreCALayerExtras.h"
 #import "WebCoreSystemInterface.h"
 #import <objc/runtime.h>
 #import <runtime/DataView.h>
@@ -595,6 +596,7 @@
     LOG(Media, "MediaPlayerPrivateAVFoundationObjC::createVideoLayer(%p) - returning %p", this, m_videoLayer.get());
 
 #if PLATFORM(IOS)
+    [m_videoLayer web_disableAllActions];
     m_videoInlineLayer = adoptNS([[WebVideoContainerLayer alloc] init]);
     [m_videoInlineLayer setFrame:CGRectMake(0, 0, defaultSize.width(), defaultSize.height())];
     if (m_videoFullscreenLayer) {
@@ -1003,10 +1005,11 @@
         return;
 
     if (m_videoLayer) {
+        [m_videoLayer setStyle:nil]; // This enables actions, i.e. implicit animations.
         [CATransaction begin];
-        [CATransaction setDisableActions:YES];
         [m_videoLayer setFrame:CGRectMake(0, 0, frame.width(), frame.height())];
         [CATransaction commit];
+        [m_videoLayer web_disableAllActions];
     }
     syncTextTrackBounds();
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to