Title: [171292] trunk/Source/WebCore
- Revision
- 171292
- Author
- [email protected]
- Date
- 2014-07-20 23:16:44 -0700 (Sun, 20 Jul 2014)
Log Message
Unreviewed Fix test crashes when cloning video layer since r171286
https://bugs.webkit.org/show_bug.cgi?id=135112
Unreviewed. Fix crashing tests by conditionalizing inline video layer change.
compositing/video/video-reflection.html [ Crash ]
media/video-layer-crash.html [ Crash ]
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: add conditional
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: ditto
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): ditto
(WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): ditto
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer): ditto
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (171291 => 171292)
--- trunk/Source/WebCore/ChangeLog 2014-07-21 05:36:59 UTC (rev 171291)
+++ trunk/Source/WebCore/ChangeLog 2014-07-21 06:16:44 UTC (rev 171292)
@@ -23,6 +23,21 @@
2014-07-20 Jeremy Jones <[email protected]>
+ Fix test crashes when cloning video layer since r171286
+ https://bugs.webkit.org/show_bug.cgi?id=135112
+
+ Unreviewed. Fix crashing tests by conditionalizing inline video layer change.
+ compositing/video/video-reflection.html [ Crash ]
+ media/video-layer-crash.html [ Crash ]
+
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: add conditional
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: ditto
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): ditto
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): ditto
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer): ditto
+
+2014-07-20 Jeremy Jones <[email protected]>
+
Disable ff/rw based on canPlayFastForward and canPlayFastRewind.
https://bugs.webkit.org/show_bug.cgi?id=134894
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h (171291 => 171292)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h 2014-07-21 05:36:59 UTC (rev 171291)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h 2014-07-21 06:16:44 UTC (rev 171292)
@@ -276,8 +276,8 @@
RetainPtr<AVPlayer> m_avPlayer;
RetainPtr<AVPlayerItem> m_avPlayerItem;
RetainPtr<AVPlayerLayer> m_videoLayer;
+#if PLATFORM(IOS)
RetainPtr<PlatformLayer> m_videoInlineLayer;
-#if PLATFORM(IOS)
RetainPtr<PlatformLayer> m_videoFullscreenLayer;
FloatRect m_videoFullscreenFrame;
MediaPlayer::VideoGravity m_videoFullscreenGravity;
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (171291 => 171292)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2014-07-21 05:36:59 UTC (rev 171291)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2014-07-21 06:16:44 UTC (rev 171292)
@@ -586,26 +586,27 @@
m_videoLayer = adoptNS([[AVPlayerLayer alloc] init]);
[m_videoLayer setPlayer:m_avPlayer.get()];
[m_videoLayer setBackgroundColor:cachedCGColor(Color::black, ColorSpaceDeviceRGB)];
- m_videoInlineLayer = adoptNS([[WebVideoContainerLayer alloc] init]);
#ifndef NDEBUG
[m_videoLayer setName:@"MediaPlayerPrivate AVPlayerLayer"];
#endif
[m_videoLayer addObserver:m_objcObserver.get() forKeyPath:@"readyForDisplay" options:NSKeyValueObservingOptionNew context:(void *)MediaPlayerAVFoundationObservationContextAVPlayerLayer];
updateVideoLayerGravity();
IntSize defaultSize = player()->mediaPlayerClient() ? player()->mediaPlayerClient()->mediaPlayerContentBoxRect().pixelSnappedSize() : IntSize();
- [m_videoInlineLayer setFrame:CGRectMake(0, 0, defaultSize.width(), defaultSize.height())];
LOG(Media, "MediaPlayerPrivateAVFoundationObjC::createVideoLayer(%p) - returning %p", this, m_videoLayer.get());
#if PLATFORM(IOS)
+ m_videoInlineLayer = adoptNS([[WebVideoContainerLayer alloc] init]);
+ [m_videoInlineLayer setFrame:CGRectMake(0, 0, defaultSize.width(), defaultSize.height())];
if (m_videoFullscreenLayer) {
[m_videoLayer setFrame:[m_videoFullscreenLayer bounds]];
[m_videoFullscreenLayer insertSublayer:m_videoLayer.get() atIndex:0];
- } else
-#endif
- {
+ } else {
[m_videoInlineLayer insertSublayer:m_videoLayer.get() atIndex:0];
[m_videoLayer setFrame:m_videoInlineLayer.get().bounds];
}
+#else
+ [m_videoLayer setFrame:CGRectMake(0, 0, defaultSize.width(), defaultSize.height())];
+#endif
}
void MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer()
@@ -621,10 +622,10 @@
#if PLATFORM(IOS)
if (m_videoFullscreenLayer)
[m_videoLayer removeFromSuperlayer];
+ m_videoInlineLayer = nil;
#endif
m_videoLayer = nil;
- m_videoInlineLayer = nil;
}
bool MediaPlayerPrivateAVFoundationObjC::hasAvailableVideoFrame() const
@@ -955,7 +956,11 @@
PlatformLayer* MediaPlayerPrivateAVFoundationObjC::platformLayer() const
{
+#if PLATFORM(IOS)
return m_haveBeenAskedToCreateLayer ? m_videoInlineLayer.get() : nullptr;
+#else
+ return m_haveBeenAskedToCreateLayer ? m_videoLayer.get() : nullptr;
+#endif
}
#if PLATFORM(IOS)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes