Title: [254607] branches/safari-609-branch/Source/WebKit
Revision
254607
Author
alanc...@apple.com
Date
2020-01-15 11:15:34 -0800 (Wed, 15 Jan 2020)

Log Message

Cherry-pick r254287. rdar://problem/58552886

    Fullscreen videos do not enter PiP in first tap
    https://bugs.webkit.org/show_bug.cgi?id=205986

    Reviewed by Eric Carlson.

    This patch essentially reverts the fix for webkit.org/b/204461.
    The fix for webkit.org/b/204461 depends on a fix in AVKit along
    with a corresponding update in WebKit (webkit.org/b/204979).
    We will need to reapply the fix for webkit.org/b/204461 after they are landed.

    * WebProcess/cocoa/VideoFullscreenManager.mm:
    (WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):
    (WebKit::VideoFullscreenManager::exitVideoFullscreenForVideoElement):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254287 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-609-branch/Source/WebKit/ChangeLog (254606 => 254607)


--- branches/safari-609-branch/Source/WebKit/ChangeLog	2020-01-15 19:15:32 UTC (rev 254606)
+++ branches/safari-609-branch/Source/WebKit/ChangeLog	2020-01-15 19:15:34 UTC (rev 254607)
@@ -1,5 +1,42 @@
 2020-01-14  Alan Coon  <alanc...@apple.com>
 
+        Cherry-pick r254287. rdar://problem/58552886
+
+    Fullscreen videos do not enter PiP in first tap
+    https://bugs.webkit.org/show_bug.cgi?id=205986
+    
+    Reviewed by Eric Carlson.
+    
+    This patch essentially reverts the fix for webkit.org/b/204461.
+    The fix for webkit.org/b/204461 depends on a fix in AVKit along
+    with a corresponding update in WebKit (webkit.org/b/204979).
+    We will need to reapply the fix for webkit.org/b/204461 after they are landed.
+    
+    * WebProcess/cocoa/VideoFullscreenManager.mm:
+    (WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):
+    (WebKit::VideoFullscreenManager::exitVideoFullscreenForVideoElement):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-01-09  Peng Liu  <peng.l...@apple.com>
+
+            Fullscreen videos do not enter PiP in first tap
+            https://bugs.webkit.org/show_bug.cgi?id=205986
+
+            Reviewed by Eric Carlson.
+
+            This patch essentially reverts the fix for webkit.org/b/204461.
+            The fix for webkit.org/b/204461 depends on a fix in AVKit along
+            with a corresponding update in WebKit (webkit.org/b/204979).
+            We will need to reapply the fix for webkit.org/b/204461 after they are landed.
+
+            * WebProcess/cocoa/VideoFullscreenManager.mm:
+            (WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):
+            (WebKit::VideoFullscreenManager::exitVideoFullscreenForVideoElement):
+
+2020-01-14  Alan Coon  <alanc...@apple.com>
+
         Cherry-pick r254254. rdar://problem/58548978
 
     WebKitTestRunner leaks objects in a top-level autoreleasePool that's never cleared

Modified: branches/safari-609-branch/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm (254606 => 254607)


--- branches/safari-609-branch/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm	2020-01-15 19:15:32 UTC (rev 254606)
+++ branches/safari-609-branch/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm	2020-01-15 19:15:34 UTC (rev 254607)
@@ -249,8 +249,6 @@
 
     auto [model, interface] = ensureModelAndInterface(contextId);
     HTMLMediaElementEnums::VideoFullscreenMode oldMode = interface->fullscreenMode();
-    if (oldMode == mode)
-        return;
 
     addClientForContext(contextId);
     if (!interface->layerHostingContext())
@@ -299,14 +297,10 @@
 
     uint64_t contextId = m_videoElements.get(&videoElement);
     auto& interface = ensureInterface(contextId);
-    HTMLMediaElementEnums::VideoFullscreenMode oldMode = interface.fullscreenMode();
-    if (oldMode == HTMLMediaElementEnums::VideoFullscreenModeNone)
-        return;
-
     interface.setTargetIsFullscreen(false);
-
     if (interface.animationState() != VideoFullscreenInterfaceContext::AnimationType::None)
         return;
+
     interface.setAnimationState(VideoFullscreenInterfaceContext::AnimationType::FromFullscreen);
     m_page->send(Messages::VideoFullscreenManagerProxy::ExitFullscreen(contextId, inlineVideoFrame(videoElement)));
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to