Title: [292430] trunk/Source/WebCore
- Revision
- 292430
- Author
- eric.carl...@apple.com
- Date
- 2022-04-05 14:56:44 -0700 (Tue, 05 Apr 2022)
Log Message
[Cocoa] Video is sometimes not visible after r292049
https://bugs.webkit.org/show_bug.cgi?id=238826
Reviewed by Jer Noble.
RenderVideo::willBeDestroyed calls MediaPlayer::setPageIsVisible, which causes
MediaPlayerPrivateAVFoundationObjC::platformSetVisible to hide the AVPlayerLayer.
HTMLMediaElement::visibilityStateChanged is the only other thing that calls
MediaPlayer::setPageIsVisible, and it only calls it when the page visibility changes,
so if that doesn't happen the AVPlayerLayer is not shown when the renderer is
recreated.
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::willBeDestroyed): Don't call MediaPlayer::setPageIsVisible(false),
the page visibility has not changed.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (292429 => 292430)
--- trunk/Source/WebCore/ChangeLog 2022-04-05 21:52:00 UTC (rev 292429)
+++ trunk/Source/WebCore/ChangeLog 2022-04-05 21:56:44 UTC (rev 292430)
@@ -1,3 +1,21 @@
+2022-04-05 Eric Carlson <eric.carl...@apple.com>
+
+ [Cocoa] Video is sometimes not visible after r292049
+ https://bugs.webkit.org/show_bug.cgi?id=238826
+
+ Reviewed by Jer Noble.
+
+ RenderVideo::willBeDestroyed calls MediaPlayer::setPageIsVisible, which causes
+ MediaPlayerPrivateAVFoundationObjC::platformSetVisible to hide the AVPlayerLayer.
+ HTMLMediaElement::visibilityStateChanged is the only other thing that calls
+ MediaPlayer::setPageIsVisible, and it only calls it when the page visibility changes,
+ so if that doesn't happen the AVPlayerLayer is not shown when the renderer is
+ recreated.
+
+ * rendering/RenderVideo.cpp:
+ (WebCore::RenderVideo::willBeDestroyed): Don't call MediaPlayer::setPageIsVisible(false),
+ the page visibility has not changed.
+
2022-04-05 Andres Gonzalez <andresg...@apple.com>
Make subtrees collapsible in the output of the AXLogger streamSubtree.
Modified: trunk/Source/WebCore/rendering/RenderVideo.cpp (292429 => 292430)
--- trunk/Source/WebCore/rendering/RenderVideo.cpp 2022-04-05 21:52:00 UTC (rev 292429)
+++ trunk/Source/WebCore/rendering/RenderVideo.cpp 2022-04-05 21:56:44 UTC (rev 292430)
@@ -65,16 +65,6 @@
void RenderVideo::willBeDestroyed()
{
visibleInViewportStateChanged();
-
-#if ENABLE(VIDEO_PRESENTATION_MODE)
- auto player = videoElement().player();
- if (player && videoElement().webkitPresentationMode() != HTMLVideoElement::VideoPresentationMode::PictureInPicture)
- player->setPageIsVisible(false);
-#else
- if (auto player = videoElement().player())
- player->setPageIsVisible(false);
-#endif
-
RenderMedia::willBeDestroyed();
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes