Bug 128558

Summary: WK2 AVKit enter fullscreen doesn't work a second time.
Product: WebKit Reporter: Jeremy Jones <jeremyj-wk>
Component: MediaAssignee: Jeremy Jones <jeremyj-wk>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, glenn, jer.noble, philipj, sergio
Priority: P1    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Jeremy Jones 2014-02-10 15:36:07 PST
WebVideoFullscreenInterfaceAVKit's m_playerController get's cleared on exitfullscreen() and never recreated.
Comment 1 Jeremy Jones 2014-02-10 15:43:18 PST
Created attachment 223757 [details]
Patch
Comment 2 Jer Noble 2014-02-10 15:48:26 PST
Comment on attachment 223757 [details]
Patch

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

> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.h:57
> +    WebAVPlayerController *getPlayerController();

This should just be "playerController()", or perhaps "ensurePlayerController()" due to the lazy-creation.

> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:225
> +    if (m_videoFullscreenModel)
> +        m_playerController.get().delegate = m_videoFullscreenModel;

shouldn't this be in the "if (!m_playerController)" case?
Comment 3 Jeremy Jones 2014-02-10 15:49:25 PST
(In reply to comment #2)
> (From update of attachment 223757 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=223757&action=review
> 
> > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.h:57
> > +    WebAVPlayerController *getPlayerController();
> 
> This should just be "playerController()", or perhaps "ensurePlayerController()" due to the lazy-creation.
> 
> > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:225
> > +    if (m_videoFullscreenModel)
> > +        m_playerController.get().delegate = m_videoFullscreenModel;
> 
> shouldn't this be in the "if (!m_playerController)" case?

Good point. I'll fix that.
Comment 4 Jeremy Jones 2014-02-10 15:52:01 PST
Created attachment 223759 [details]
Patch
Comment 5 Jeremy Jones 2014-02-10 15:53:55 PST
(In reply to comment #2)
> (From update of attachment 223757 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=223757&action=review
> 
> > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.h:57
> > +    WebAVPlayerController *getPlayerController();
> 
> This should just be "playerController()", or perhaps "ensurePlayerController()" due to the lazy-creation.

I thought style guidelines require getters to begin with "get".
Comment 6 Jeremy Jones 2014-02-10 15:55:00 PST
(In reply to comment #5)
> (In reply to comment #2)
> > (From update of attachment 223757 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=223757&action=review
> > 
> > > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.h:57
> > > +    WebAVPlayerController *getPlayerController();
> > 
> > This should just be "playerController()", or perhaps "ensurePlayerController()" due to the lazy-creation.
> 
> I thought style guidelines require getters to begin with "get".

Sorry, I'm wrong. I actually originally had playerController(). I'll switch back to that.
Comment 7 Jeremy Jones 2014-02-10 16:05:21 PST
Created attachment 223761 [details]
Patch
Comment 8 Jer Noble 2014-02-10 16:09:01 PST
Comment on attachment 223761 [details]
Patch

r=me.
Comment 9 WebKit Commit Bot 2014-02-15 00:20:21 PST
Comment on attachment 223761 [details]
Patch

Clearing flags on attachment: 223761

Committed r164161: <http://trac.webkit.org/changeset/164161>
Comment 10 WebKit Commit Bot 2014-02-15 00:20:23 PST
All reviewed patches have been landed.  Closing bug.