Bug 218688

Summary: Receiving two enter/exit fullscreen delegate callbacks on iPad when presenting fullscreen elements
Product: WebKit Reporter: Peng Liu <peng.liu6>
Component: MediaAssignee: Peng Liu <peng.liu6>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, eric.carlson, ews-watchlist, glenn, jer.noble, philipj, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP patch (need an API test)
none
WIP patch (need an API test)
darin: review+
Patch for landing none

Description Peng Liu 2020-11-07 11:41:20 PST
Receiving two enter/exit fullscreen delegate callbacks on iPad when presenting fullscreen elements
Comment 1 Peng Liu 2020-11-07 11:42:21 PST
<rdar://problem/70546084>
Comment 2 Peng Liu 2020-11-07 11:49:45 PST
Created attachment 413531 [details]
WIP patch (need an API test)
Comment 3 Peng Liu 2020-11-07 19:02:05 PST
Created attachment 413537 [details]
WIP patch (need an API test)
Comment 4 Peng Liu 2021-01-11 14:01:28 PST
Just realized that I need to fix bug 212654 before adding a test for this patch.
Comment 5 Darin Adler 2021-01-11 14:42:44 PST
Comment on attachment 413537 [details]
WIP patch (need an API test)

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

> Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm:936
> +    if (mode == HTMLMediaElementEnums::VideoFullscreenModeNone && standby)
> +        m_changingStandbyOnly = true;
> +    else
> +        m_changingStandbyOnly = false;

m_changingStandbyOnly = mode == HTMLMediaElementEnums::VideoFullscreenModeNone && standby;

> Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm:972
> +    if (!m_currentMode.hasVideo() && m_standby)
> +        m_changingStandbyOnly = true;
> +    else
> +        m_changingStandbyOnly = false;

m_changingStandbyOnly = !m_currentMode.hasVideo() && m_standby;
Comment 6 Peng Liu 2021-01-11 15:35:29 PST
Created attachment 417415 [details]
Patch for landing
Comment 7 Peng Liu 2021-01-11 15:36:52 PST
Comment on attachment 413537 [details]
WIP patch (need an API test)

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

>> Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm:936
>> +        m_changingStandbyOnly = false;
> 
> m_changingStandbyOnly = mode == HTMLMediaElementEnums::VideoFullscreenModeNone && standby;

Good idea! Fixed.

>> Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm:972
>> +        m_changingStandbyOnly = false;
> 
> m_changingStandbyOnly = !m_currentMode.hasVideo() && m_standby;

Fixed.
Comment 8 EWS 2021-01-11 17:11:42 PST
Committed r271387: <https://trac.webkit.org/changeset/271387>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 417415 [details].