Title: [234078] trunk/Source/WebCore
Revision
234078
Author
[email protected]
Date
2018-07-20 17:42:20 -0700 (Fri, 20 Jul 2018)

Log Message

REGRESSION (r233974): Cannot close pip'd video; pops back into PiP.
https://bugs.webkit.org/show_bug.cgi?id=187873

Reviewed by Jon Lee.

When the PIP machinery on Mac wants to close the PIP window (due to the close button being clicked), it does
not consult our -shouldClosePiP handler; it just tells us that we're going to close. So we never setup the
necessary state on the WebProcess side and still think that our "targetIsFullscreen". When we get the "stop"
action, just request exit fullscreen, but set up the _pipState to think we're already exiting (because we are).

* platform/mac/VideoFullscreenInterfaceMac.mm:
(-[WebVideoFullscreenInterfaceMacObjC pipActionStop:]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (234077 => 234078)


--- trunk/Source/WebCore/ChangeLog	2018-07-21 00:41:44 UTC (rev 234077)
+++ trunk/Source/WebCore/ChangeLog	2018-07-21 00:42:20 UTC (rev 234078)
@@ -1,3 +1,18 @@
+2018-07-20  Jer Noble  <[email protected]>
+
+        REGRESSION (r233974): Cannot close pip'd video; pops back into PiP.
+        https://bugs.webkit.org/show_bug.cgi?id=187873
+
+        Reviewed by Jon Lee.
+
+        When the PIP machinery on Mac wants to close the PIP window (due to the close button being clicked), it does
+        not consult our -shouldClosePiP handler; it just tells us that we're going to close. So we never setup the 
+        necessary state on the WebProcess side and still think that our "targetIsFullscreen". When we get the "stop"
+        action, just request exit fullscreen, but set up the _pipState to think we're already exiting (because we are).
+
+        * platform/mac/VideoFullscreenInterfaceMac.mm:
+        (-[WebVideoFullscreenInterfaceMacObjC pipActionStop:]):
+
 2018-07-20  Justin Fan  <[email protected]>
 
         Safari WebGL does not consistently provide correct GPU context on eGPU systems

Modified: trunk/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.mm (234077 => 234078)


--- trunk/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.mm	2018-07-21 00:41:44 UTC (rev 234077)
+++ trunk/Source/WebCore/platform/mac/VideoFullscreenInterfaceMac.mm	2018-07-21 00:42:20 UTC (rev 234078)
@@ -335,8 +335,8 @@
     if (PlaybackSessionModel* playbackSessionModel = _videoFullscreenInterfaceMac->playbackSessionModel())
         playbackSessionModel->pause();
 
-    // FIXME 25096170: Should animate only if the page with the video is unobscured. For now, always close without animation.
-    [self exitPIP];
+    _videoFullscreenInterfaceMac->requestHideAndExitFullscreen();
+    _pipState = PIPState::ExitingPIP;
 }
 
 @end
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to