Title: [254287] trunk/Source/WebKit
Revision
254287
Author
[email protected]
Date
2020-01-09 12:08:23 -0800 (Thu, 09 Jan 2020)

Log Message

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):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (254286 => 254287)


--- trunk/Source/WebKit/ChangeLog	2020-01-09 20:01:59 UTC (rev 254286)
+++ trunk/Source/WebKit/ChangeLog	2020-01-09 20:08:23 UTC (rev 254287)
@@ -1,3 +1,19 @@
+2020-01-09  Peng Liu  <[email protected]>
+
+        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-09  Kate Cheney  <[email protected]>
 
         ITP API classes need WK_CLASS_AVAILABLE tags

Modified: trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm (254286 => 254287)


--- trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm	2020-01-09 20:01:59 UTC (rev 254286)
+++ trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm	2020-01-09 20:08:23 UTC (rev 254287)
@@ -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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to