Changeset 254512 in webkit


Ignore:
Timestamp:
Jan 14, 2020 8:37:10 AM (4 years ago)
Author:
Peng Liu
Message:

A video element cannot enter fullscreen from PiP mode
https://bugs.webkit.org/show_bug.cgi?id=204468

Reviewed by Eric Carlson.

This patch fixes two issues:

  • Make sure the message exchanges between WebContent and UI process can complete in the scenario that switching to fullscreen from PiP.
  • Do not send fullscreenModeChanged event with mode = 3 (both fullscreen and Picture-in-Picture) to WebContent process.

We need to use API tests to verify the fix.
No new tests are added because of webkit.org/b/203724.

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(VideoFullscreenInterfaceAVKit::didStopPictureInPicture):
(VideoFullscreenInterfaceAVKit::doEnterFullscreen):
(VideoFullscreenInterfaceAVKit::setMode):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r254508 r254512  
     12020-01-14  Peng Liu  <peng.liu6@apple.com>
     2
     3        A video element cannot enter fullscreen from PiP mode
     4        https://bugs.webkit.org/show_bug.cgi?id=204468
     5
     6        Reviewed by Eric Carlson.
     7
     8        This patch fixes two issues:
     9        - Make sure the message exchanges between WebContent and UI process can complete in the scenario that switching to fullscreen from PiP.
     10        - Do not send fullscreenModeChanged event with mode = 3 (both fullscreen and Picture-in-Picture) to WebContent process.
     11
     12        We need to use API tests to verify the fix.
     13        No new tests are added because of webkit.org/b/203724.
     14
     15        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
     16        (VideoFullscreenInterfaceAVKit::didStopPictureInPicture):
     17        (VideoFullscreenInterfaceAVKit::doEnterFullscreen):
     18        (VideoFullscreenInterfaceAVKit::setMode):
     19
    1202020-01-14  Philippe Normand  <pnormand@igalia.com>
    221
  • trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm

    r254212 r254512  
    10791079        if (m_exitFullscreenNeedsExitPictureInPicture)
    10801080            doExitFullscreen();
     1081
     1082        if (m_enterFullscreenNeedsExitPictureInPicture)
     1083            doEnterFullscreen();
    10811084        return;
    10821085    }
     
    13261329    if (m_targetMode.hasFullscreen() && !m_currentMode.hasFullscreen()) {
    13271330        m_enterFullscreenNeedsEnterFullscreen = true;
     1331        [m_window setHidden:NO];
    13281332        [m_playerViewController enterFullScreenAnimated:YES completionHandler:[this, protectedThis = makeRefPtr(this)] (BOOL success, NSError *error) {
    13291333            enterFullscreenHandler(success, error);
     
    14771481
    14781482    m_currentMode.setMode(mode);
     1483    // Mode::mode() can be 3 (VideoFullscreenModeStandard | VideoFullscreenModePictureInPicture).
     1484    // HTMLVideoElement does not expect such a value in the fullscreenModeChanged() callback.
    14791485    if (m_videoFullscreenModel)
    1480         m_videoFullscreenModel->fullscreenModeChanged(m_currentMode.mode());
     1486        m_videoFullscreenModel->fullscreenModeChanged(mode);
    14811487}
    14821488
Note: See TracChangeset for help on using the changeset viewer.