Bug 130621 - [iOS] clean up fullscreen player controller when exiting fullscreen
Summary: [iOS] clean up fullscreen player controller when exiting fullscreen
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-03-21 15:52 PDT by Eric Carlson
Modified: 2014-03-21 16:20 PDT (History)
6 users (show)

See Also:


Attachments
Proposed patch. (2.33 KB, patch)
2014-03-21 15:56 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2014-03-21 15:52:29 PDT
The fullscreen video layer's WebAVPlayerController is retained by the player view controller and can outlive the layer, so clear the view controller's delegate and player controller when we exit from fullscreen.
Comment 1 Eric Carlson 2014-03-21 15:56:34 PDT
Created attachment 227502 [details]
Proposed patch.
Comment 2 Radar WebKit Bug Importer 2014-03-21 15:58:09 PDT
<rdar://problem/16396567>
Comment 3 Radar WebKit Bug Importer 2014-03-21 15:59:24 PDT
<rdar://problem/16396588>
Comment 4 Jer Noble 2014-03-21 16:07:28 PDT
Comment on attachment 227502 [details]
Proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=227502&action=review

r=me with nits.

> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:207
> +    if (_avPlayerController && [_avPlayerController delegate])

This should be unnecessary.  If _avPlayerController is nil, [_avPlayerController delegate] will return nil as well.

> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:215
> +    if (!_avPlayerController || ![_avPlayerController delegate])

Ditto.
Comment 5 Eric Carlson 2014-03-21 16:20:28 PDT
Committed r166106: https://trac.webkit.org/r166106