[iOS] VideoFullscreenInterfaceAVKit should not ignore errors
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Feb 2018 20:58:58 +0000 (20:58 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Feb 2018 20:58:58 +0000 (20:58 +0000)
commit1f6dcd9dce8c8f7e5f1d5dd1ecfa382a0d373b11
tree8a15dea957b853208869ecc4b50aea1f07115eab
parentb752102b0ca6b042350fe310d4da607926d616c3
[iOS] VideoFullscreenInterfaceAVKit should not ignore errors
https://bugs.webkit.org/show_bug.cgi?id=182497
<rdar://problem/36986898>

Reviewed by Jer Noble.

Always call layoutIfNeeded before calling -[AVPlayerViewController enterFullScreenAnimated:completionHandler]
or -[AVPlayerViewController exitFullScreenAnimated:completionHandler] because they both fail
if the view needs layout. Also don't ignore errors returned by those calls.

No new tests, the failure is non deterministic and I was not able to reproduce in a test.

* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(VideoFullscreenInterfaceAVKit::applicationDidBecomeActive):
(VideoFullscreenInterfaceAVKit::enterFullscreenStandard):
(VideoFullscreenInterfaceAVKit::exitFullscreen):
(VideoFullscreenInterfaceAVKit::cleanupFullscreen):
(VideoFullscreenInterfaceAVKit::didStartPictureInPicture):
(VideoFullscreenInterfaceAVKit::prepareForPictureInPictureStopWithCompletionHandler):
(VideoFullscreenInterfaceAVKit::doEnterFullscreen):
(VideoFullscreenInterfaceAVKit::exitFullscreenHandler):
(VideoFullscreenInterfaceAVKit::enterFullscreenHandler):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm