Changeset 247695 in webkit


Ignore:
Timestamp:
Jul 22, 2019 12:38:05 PM (5 years ago)
Author:
jer.noble@apple.com
Message:

REGRESSION(rUnknown): YouTube playback pauses when switching to a new tab
https://bugs.webkit.org/show_bug.cgi?id=199971
<rdar://problem/51951218>

Reviewed by Alex Christensen.

Source/WebKit:

When we get a message notifying us that the view has been removed from the window, we unconditionally
ask the fullscreen manager to exit fullscreen, which has the side effect (on iOS) of pausing the video
unconditionally. Only ask the fullscreen manager to exit fullscreen if there is actually a video in
fullscreen mode.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::viewDidLeaveWindow):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/NoPauseWhenSwitchingTabs.mm: Added.

(TestWebKitAPI::TEST):

Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r247693 r247695  
     12019-07-22  Jer Noble  <jer.noble@apple.com>
     2
     3        REGRESSION(rUnknown): YouTube playback pauses when switching to a new tab
     4        https://bugs.webkit.org/show_bug.cgi?id=199971
     5        <rdar://problem/51951218>
     6
     7        Reviewed by Alex Christensen.
     8
     9        When we get a message notifying us that the view has been removed from the window, we unconditionally
     10        ask the fullscreen manager to exit fullscreen, which has the side effect (on iOS) of pausing the video
     11        unconditionally. Only ask the fullscreen manager to exit fullscreen if there is actually a video in
     12        fullscreen mode.
     13
     14        * UIProcess/WebPageProxy.cpp:
     15        (WebKit::WebPageProxy::viewDidLeaveWindow):
     16
    1172019-07-22  Youenn Fablet  <youenn@apple.com>
    218
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r247662 r247695  
    17021702#if PLATFORM(IOS_FAMILY) && HAVE(AVKIT) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
    17031703    // When leaving the current page, close the video fullscreen.
    1704     if (m_videoFullscreenManager)
     1704    if (m_videoFullscreenManager && m_videoFullscreenManager->hasMode(WebCore::HTMLMediaElementEnums::VideoFullscreenModeStandard))
    17051705        m_videoFullscreenManager->requestHideAndExitFullscreen();
    17061706#endif
  • trunk/Tools/ChangeLog

    r247694 r247695  
     12019-07-22  Jer Noble  <jer.noble@apple.com>
     2
     3        REGRESSION(rUnknown): YouTube playback pauses when switching to a new tab
     4        https://bugs.webkit.org/show_bug.cgi?id=199971
     5        <rdar://problem/51951218>
     6
     7        Reviewed by Alex Christensen.
     8
     9        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
     10        * TestWebKitAPI/Tests/WebKitCocoa/NoPauseWhenSwitchingTabs.mm: Added.
     11        (TestWebKitAPI::TEST):
     12
    1132019-07-22  Aakash Jain  <aakash_jain@apple.com>
    214
  • trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj

    r247537 r247695  
    869869                CDC9442F1EF205D60059C3C4 /* mediastreamtrack-detached.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CDC9442B1EF1FBD20059C3C4 /* mediastreamtrack-detached.html */; };
    870870                CDCFA7AA1E45183200C2433D /* SampleMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDCFA7A91E45122F00C2433D /* SampleMap.cpp */; };
     871                CDCFFEC122E26A1500DF4223 /* NoPauseWhenSwitchingTabs.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDCFFEC022E268D500DF4223 /* NoPauseWhenSwitchingTabs.mm */; };
    871872                CDD68F0D22C18317000CF0AE /* WKWebViewCloseAllMediaPresentations.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDD68F0C22C18317000CF0AE /* WKWebViewCloseAllMediaPresentations.mm */; };
    872873                CDE195B51CFE0B880053D256 /* FullscreenTopContentInset.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CDE195B21CFE0ADE0053D256 /* FullscreenTopContentInset.html */; };
     
    22892290                CDC9442C1EF1FC080059C3C4 /* MediaStreamTrackDetached.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MediaStreamTrackDetached.mm; sourceTree = "<group>"; };
    22902291                CDCFA7A91E45122F00C2433D /* SampleMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SampleMap.cpp; sourceTree = "<group>"; };
     2292                CDCFFEC022E268D500DF4223 /* NoPauseWhenSwitchingTabs.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NoPauseWhenSwitchingTabs.mm; sourceTree = "<group>"; };
    22912293                CDD68F0C22C18317000CF0AE /* WKWebViewCloseAllMediaPresentations.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewCloseAllMediaPresentations.mm; sourceTree = "<group>"; };
    22922294                CDE195B21CFE0ADE0053D256 /* FullscreenTopContentInset.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = FullscreenTopContentInset.html; sourceTree = "<group>"; };
     
    27402742                                5C8BC798218CF3E900813886 /* NetworkProcess.mm */,
    27412743                                5CAE4637201937CD0051610F /* NetworkProcessCrashNonPersistentDataStore.mm */,
     2744                                CDCFFEC022E268D500DF4223 /* NoPauseWhenSwitchingTabs.mm */,
    27422745                                CD2D0D19213465560018C784 /* NowPlaying.mm */,
    27432746                                2ECFF5541D9B12F800B55394 /* NowPlayingControlsTests.mm */,
     
    47214724                                5C9D923122D7E0EB008E9266 /* ClassMethodSwizzler.mm in Sources */,
    47224725                                2E7765CD16C4D80A00BA2BB1 /* mainIOS.mm in Sources */,
     4726                                CDCFFEC122E26A1500DF4223 /* NoPauseWhenSwitchingTabs.mm in Sources */,
    47234727                                2E7765CF16C4D81100BA2BB1 /* mainMac.mm in Sources */,
    47244728                                5797FE311EB15A6800B2F4A0 /* NavigationClientDefaultCrypto.cpp in Sources */,
Note: See TracChangeset for help on using the changeset viewer.