Title: [271325] trunk
- Revision
- 271325
- Author
- [email protected]
- Date
- 2021-01-08 14:45:36 -0800 (Fri, 08 Jan 2021)
Log Message
PlaybackSessionManager::m_clientCounts is not updated correctly when a video enters picture-in-picture from fullscreen
https://bugs.webkit.org/show_bug.cgi?id=220435
Reviewed by Jer Noble.
Source/WebKit:
A follow-up patch to fix an assertion failure on Mac.
`VideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation()` should not call
`removeClientForContext()` on Mac because `didCleanupFullscreen()` will do that.
Fix layout test: media/element-containing-pip-video-going-into-fullscreen.html
* WebProcess/cocoa/VideoFullscreenManager.mm:
(WebKit::VideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation):
LayoutTests:
* media/element-containing-pip-video-going-into-fullscreen-expected.txt:
* media/element-containing-pip-video-going-into-fullscreen.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (271324 => 271325)
--- trunk/LayoutTests/ChangeLog 2021-01-08 22:42:58 UTC (rev 271324)
+++ trunk/LayoutTests/ChangeLog 2021-01-08 22:45:36 UTC (rev 271325)
@@ -1,3 +1,13 @@
+2021-01-08 Peng Liu <[email protected]>
+
+ PlaybackSessionManager::m_clientCounts is not updated correctly when a video enters picture-in-picture from fullscreen
+ https://bugs.webkit.org/show_bug.cgi?id=220435
+
+ Reviewed by Jer Noble.
+
+ * media/element-containing-pip-video-going-into-fullscreen-expected.txt:
+ * media/element-containing-pip-video-going-into-fullscreen.html:
+
2021-01-08 Myles C. Maxfield <[email protected]>
fast/text/canvas-color-fonts/COLR.html prematurely exits
Modified: trunk/LayoutTests/media/element-containing-pip-video-going-into-fullscreen-expected.txt (271324 => 271325)
--- trunk/LayoutTests/media/element-containing-pip-video-going-into-fullscreen-expected.txt 2021-01-08 22:42:58 UTC (rev 271324)
+++ trunk/LayoutTests/media/element-containing-pip-video-going-into-fullscreen-expected.txt 2021-01-08 22:45:36 UTC (rev 271325)
@@ -1,8 +1,10 @@
Tests pip video going into fullscreen should exit pip
Video going into Picture-in-Picture
+EXPECTED (internals.isChangingPresentationMode(video) == 'false') OK
EXPECTED (video.webkitPresentationMode == 'picture-in-picture') OK
Element containing picture-in-picture video going into Full Screen
+EXPECTED (internals.isChangingPresentationMode(video) == 'false') OK
EXPECTED (document.webkitCurrentFullScreenElement == '[object HTMLDivElement]') OK
EXPECTED (video.webkitPresentationMode == 'inline') OK
END OF TEST
Modified: trunk/LayoutTests/media/element-containing-pip-video-going-into-fullscreen.html (271324 => 271325)
--- trunk/LayoutTests/media/element-containing-pip-video-going-into-fullscreen.html 2021-01-08 22:42:58 UTC (rev 271324)
+++ trunk/LayoutTests/media/element-containing-pip-video-going-into-fullscreen.html 2021-01-08 22:45:36 UTC (rev 271325)
@@ -29,8 +29,11 @@
runWithKeyDown(function(){ video.webkitSetPresentationMode('picture-in-picture'); });
}
- function onfirstpresentationmodechanged()
+ async function onfirstpresentationmodechanged()
{
+ if (window.internals)
+ await testExpectedEventually("internals.isChangingPresentationMode(video)", false);
+
testExpected("video.webkitPresentationMode", "picture-in-picture");
video.removeEventListener('webkitpresentationmodechanged', onfirstpresentationmodechanged);
@@ -54,8 +57,11 @@
checkFinalState();
}
- function checkFinalState()
+ async function checkFinalState()
{
+ if (window.internals)
+ await testExpectedEventually("internals.isChangingPresentationMode(video)", false);
+
testExpected("document.webkitCurrentFullScreenElement", videoContainer);
testExpected("video.webkitPresentationMode", "inline");
endTest();
Modified: trunk/Source/WebKit/ChangeLog (271324 => 271325)
--- trunk/Source/WebKit/ChangeLog 2021-01-08 22:42:58 UTC (rev 271324)
+++ trunk/Source/WebKit/ChangeLog 2021-01-08 22:45:36 UTC (rev 271325)
@@ -1,3 +1,19 @@
+2021-01-08 Peng Liu <[email protected]>
+
+ PlaybackSessionManager::m_clientCounts is not updated correctly when a video enters picture-in-picture from fullscreen
+ https://bugs.webkit.org/show_bug.cgi?id=220435
+
+ Reviewed by Jer Noble.
+
+ A follow-up patch to fix an assertion failure on Mac.
+ `VideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation()` should not call
+ `removeClientForContext()` on Mac because `didCleanupFullscreen()` will do that.
+
+ Fix layout test: media/element-containing-pip-video-going-into-fullscreen.html
+
+ * WebProcess/cocoa/VideoFullscreenManager.mm:
+ (WebKit::VideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation):
+
2021-01-08 Wenson Hsieh <[email protected]>
[macOS] -[WKWebView acceptsFirstMouse:] sometimes crashes in IPC::Connection::createSyncMessageEncoder
Modified: trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm (271324 => 271325)
--- trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm 2021-01-08 22:42:58 UTC (rev 271324)
+++ trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm 2021-01-08 22:45:36 UTC (rev 271325)
@@ -331,7 +331,11 @@
auto& interface = ensureInterface(contextId);
interface.setTargetIsFullscreen(false);
+
+ // didCleanupFullscreen() will call removeClientForContext() on Mac
+#if PLATFORM(IOS_FAMILY)
removeClientForContext(contextId);
+#endif
m_page->send(Messages::VideoFullscreenManagerProxy::ExitFullscreenWithoutAnimationToMode(contextId, targetMode));
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes