Bug 145340

Summary: Handle case where -startOptimizedFullscreen fails.
Product: WebKit Reporter: Jeremy Jones <jeremyj-wk>
Component: MediaAssignee: Jeremy Jones <jeremyj-wk>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: iPhone / iPad   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Jeremy Jones 2015-05-22 22:20:43 PDT
Handle case where -startOptimizedFullscreen fails.
Comment 1 Jeremy Jones 2015-05-22 22:21:18 PDT
rdar://problem/19416954
Comment 2 Jeremy Jones 2015-05-22 22:28:39 PDT
Created attachment 253638 [details]
Patch
Comment 3 Eric Carlson 2015-05-24 08:40:39 PDT
Comment on attachment 253638 [details]
Patch

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

> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:1291
> +    RefPtr<WebVideoFullscreenInterfaceAVKit> strongThis(this);
> +    WebThreadRun([strongThis, this] {
> +        if (hasMode(HTMLMediaElementEnums::VideoFullscreenModeStandard))
> +            return;
> +
> +        m_exitCompleted = true;

This will leave m_exitCompleted set to true if hasMode(HTMLMediaElementEnums::VideoFullscreenModeStandard). Will this cause problems later?
Comment 4 Jeremy Jones 2015-05-24 10:00:09 PDT
(In reply to comment #3)
> Comment on attachment 253638 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=253638&action=review
> 
> > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:1291
> > +    RefPtr<WebVideoFullscreenInterfaceAVKit> strongThis(this);
> > +    WebThreadRun([strongThis, this] {
> > +        if (hasMode(HTMLMediaElementEnums::VideoFullscreenModeStandard))
> > +            return;
> > +
> > +        m_exitCompleted = true;
> 
> This will leave m_exitCompleted set to true if
> hasMode(HTMLMediaElementEnums::VideoFullscreenModeStandard). Will this cause
> problems later?

I think you mean leave it false. And that is exactly what we want. If we still have standard mode, then we have not completely exited fullscreen.

Also, the build error is SPI that I'll add to AVKitSPI.h
Comment 5 Jeremy Jones 2015-05-24 10:18:58 PDT
Created attachment 253658 [details]
Patch
Comment 6 WebKit Commit Bot 2015-05-27 10:12:32 PDT
Comment on attachment 253658 [details]
Patch

Clearing flags on attachment: 253658

Committed r184907: <http://trac.webkit.org/changeset/184907>
Comment 7 WebKit Commit Bot 2015-05-27 10:12:35 PDT
All reviewed patches have been landed.  Closing bug.