Title: [292443] branches/safari-614.1.9-branch/Source/WebCore
- Revision
- 292443
- Author
- repst...@apple.com
- Date
- 2022-04-05 17:08:40 -0700 (Tue, 05 Apr 2022)
Log Message
Cherry-pick r292430. rdar://problem/91293025
[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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@292430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-614.1.9-branch/Source/WebCore/ChangeLog (292442 => 292443)
--- branches/safari-614.1.9-branch/Source/WebCore/ChangeLog 2022-04-06 00:08:38 UTC (rev 292442)
+++ branches/safari-614.1.9-branch/Source/WebCore/ChangeLog 2022-04-06 00:08:40 UTC (rev 292443)
@@ -1,3 +1,44 @@
+2022-04-05 Alan Coon <alanc...@apple.com>
+
+ Cherry-pick r292430. rdar://problem/91293025
+
+ [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.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@292430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 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-02 Myles C. Maxfield <mmaxfi...@apple.com>
[Cocoa] Automatically relayout the page when new fonts are installed
Modified: branches/safari-614.1.9-branch/Source/WebCore/rendering/RenderVideo.cpp (292442 => 292443)
--- branches/safari-614.1.9-branch/Source/WebCore/rendering/RenderVideo.cpp 2022-04-06 00:08:38 UTC (rev 292442)
+++ branches/safari-614.1.9-branch/Source/WebCore/rendering/RenderVideo.cpp 2022-04-06 00:08:40 UTC (rev 292443)
@@ -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