Title: [259561] trunk/Source/WebCore
- Revision
- 259561
- Author
- peng.l...@apple.com
- Date
- 2020-04-05 21:02:43 -0700 (Sun, 05 Apr 2020)
Log Message
The value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first attempt to enter PiP
https://bugs.webkit.org/show_bug.cgi?id=204979
Reviewed by Darin Adler.
We should use "#if HAVE(AVOBSERVATIONCONTROLLER)" instead of
"#if HAVE(HAVE_AVOBSERVATIONCONTROLLER)".
Source/WebCore:
* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerViewController initWithFullscreenInterface:]):
(VideoFullscreenInterfaceAVKit::doEnterFullscreen):
Source/WebCore/PAL:
* pal/spi/cocoa/AVKitSPI.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (259560 => 259561)
--- trunk/Source/WebCore/ChangeLog 2020-04-06 03:02:54 UTC (rev 259560)
+++ trunk/Source/WebCore/ChangeLog 2020-04-06 04:02:43 UTC (rev 259561)
@@ -1,3 +1,17 @@
+2020-04-05 Peng Liu <peng.l...@apple.com>
+
+ The value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first attempt to enter PiP
+ https://bugs.webkit.org/show_bug.cgi?id=204979
+
+ Reviewed by Darin Adler.
+
+ We should use "#if HAVE(AVOBSERVATIONCONTROLLER)" instead of
+ "#if HAVE(HAVE_AVOBSERVATIONCONTROLLER)".
+
+ * platform/ios/VideoFullscreenInterfaceAVKit.mm:
+ (-[WebAVPlayerViewController initWithFullscreenInterface:]):
+ (VideoFullscreenInterfaceAVKit::doEnterFullscreen):
+
2020-04-05 Wenson Hsieh <wenson_hs...@apple.com>
Address review comments after r259550
Modified: trunk/Source/WebCore/PAL/ChangeLog (259560 => 259561)
--- trunk/Source/WebCore/PAL/ChangeLog 2020-04-06 03:02:54 UTC (rev 259560)
+++ trunk/Source/WebCore/PAL/ChangeLog 2020-04-06 04:02:43 UTC (rev 259561)
@@ -1,3 +1,15 @@
+2020-04-05 Peng Liu <peng.l...@apple.com>
+
+ The value of [AVPlayerViewController isPictureInPicturePossible] is NO in the first attempt to enter PiP
+ https://bugs.webkit.org/show_bug.cgi?id=204979
+
+ Reviewed by Darin Adler.
+
+ We should use "#if HAVE(AVOBSERVATIONCONTROLLER)" instead of
+ "#if HAVE(HAVE_AVOBSERVATIONCONTROLLER)".
+
+ * pal/spi/cocoa/AVKitSPI.h:
+
2020-04-03 David Kilzer <ddkil...@apple.com>
[Xcode] Replace ASAN_OTHER_CFLAGS and ASAN_OTHER_CPLUSPLUSFLAGS with $(inherited)
Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h (259560 => 259561)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h 2020-04-06 03:02:54 UTC (rev 259560)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h 2020-04-06 04:02:43 UTC (rev 259561)
@@ -54,19 +54,25 @@
@end
#endif // USE(APPLE_INTERNAL_SDK)
-#if HAVE(HAVE_AVOBSERVATIONCONTROLLER)
+#if HAVE(AVOBSERVATIONCONTROLLER)
#if USE(APPLE_INTERNAL_SDK)
#import <AVKit/AVObservationController.h>
#else
+
@class AVKeyValueChange;
+NS_ASSUME_NONNULL_BEGIN
+
@interface AVObservationController<Owner> : NSObject
- (instancetype)initWithOwner:(Owner)owner NS_DESIGNATED_INITIALIZER;
- (id)startObserving:(id)object keyPath:(NSString *)keyPath includeInitialValue:(BOOL)shouldIncludeInitialValue observationHandler:(void (^)(Owner owner, id observed, AVKeyValueChange *change))observationHandler;
- (void)stopAllObservation;
@end
+
+NS_ASSUME_NONNULL_END
+
#endif
-#endif // HAVE(HAVE_AVOBSERVATIONCONTROLLER)
+#endif // HAVE(AVOBSERVATIONCONTROLLER)
#if PLATFORM(IOS_FAMILY)
#import <AVKit/AVKit.h>
Modified: trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm (259560 => 259561)
--- trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm 2020-04-06 03:02:54 UTC (rev 259560)
+++ trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm 2020-04-06 04:02:43 UTC (rev 259561)
@@ -59,7 +59,7 @@
#import <pal/ios/UIKitSoftLink.h>
SOFTLINK_AVKIT_FRAMEWORK()
-#if HAVE(HAVE_AVOBSERVATIONCONTROLLER)
+#if HAVE(AVOBSERVATIONCONTROLLER)
SOFT_LINK_CLASS_OPTIONAL(AVKit, AVObservationController)
#endif
SOFT_LINK_CLASS_OPTIONAL(AVKit, AVPictureInPictureController)
@@ -545,7 +545,7 @@
VideoFullscreenInterfaceAVKit *_fullscreenInterface;
RetainPtr<UIViewController> _presentingViewController;
RetainPtr<AVPlayerViewController> _avPlayerViewController;
-#if HAVE(HAVE_AVOBSERVATIONCONTROLLER)
+#if HAVE(AVOBSERVATIONCONTROLLER)
RetainPtr<NSTimer> _startPictureInPictureTimer;
RetainPtr<AVObservationController> _avPlayerViewControllerObservationController;
#endif
@@ -560,7 +560,7 @@
_fullscreenInterface = interface;
_avPlayerViewController = adoptNS([allocAVPlayerViewControllerInstance() initWithPlayerLayerView:interface->playerLayerView()]);
_avPlayerViewController.get().modalPresentationStyle = UIModalPresentationOverFullScreen;
-#if HAVE(HAVE_AVOBSERVATIONCONTROLLER)
+#if HAVE(AVOBSERVATIONCONTROLLER)
_avPlayerViewControllerObservationController = adoptNS([allocAVObservationControllerInstance() initWithOwner:_avPlayerViewController.get()]);
#endif
#if PLATFORM(WATCHOS)
@@ -570,7 +570,7 @@
return self;
}
-#if HAVE(HAVE_AVOBSERVATIONCONTROLLER)
+#if HAVE(AVOBSERVATIONCONTROLLER)
- (void)dealloc
{
[_startPictureInPictureTimer invalidate];
@@ -636,7 +636,7 @@
#define MY_NO_RETURN
#endif
-#if HAVE(HAVE_AVOBSERVATIONCONTROLLER)
+#if HAVE(AVOBSERVATIONCONTROLLER)
static const NSTimeInterval startPictureInPictureTimeInterval = 0.5;
- (void)tryToStartPictureInPicture MY_NO_RETURN
@@ -1386,7 +1386,7 @@
if ([m_playerViewController isPictureInPicturePossible])
[m_playerViewController startPictureInPicture];
else
-#if HAVE(HAVE_AVOBSERVATIONCONTROLLER)
+#if HAVE(AVOBSERVATIONCONTROLLER)
[m_playerViewController tryToStartPictureInPicture];
#else
failedToStartPictureInPicture();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes