Title: [293344] branches/safari-613.2.7.0-branch/Source/WebCore
- Revision
- 293344
- Author
- [email protected]
- Date
- 2022-04-25 13:48:11 -0700 (Mon, 25 Apr 2022)
Log Message
Cherry-pick r292430. rdar://problem/92204558
[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-613.2.7.0-branch/Source/WebCore/ChangeLog (293343 => 293344)
--- branches/safari-613.2.7.0-branch/Source/WebCore/ChangeLog 2022-04-25 20:44:56 UTC (rev 293343)
+++ branches/safari-613.2.7.0-branch/Source/WebCore/ChangeLog 2022-04-25 20:48:11 UTC (rev 293344)
@@ -1,3 +1,44 @@
+2022-04-25 Russell Epstein <[email protected]>
+
+ Cherry-pick r292430. rdar://problem/92204558
+
+ [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 <[email protected]>
+
+ [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-25 Alan Coon <[email protected]>
Cherry-pick r293286. rdar://problem/92198272
Modified: branches/safari-613.2.7.0-branch/Source/WebCore/rendering/RenderVideo.cpp (293343 => 293344)
--- branches/safari-613.2.7.0-branch/Source/WebCore/rendering/RenderVideo.cpp 2022-04-25 20:44:56 UTC (rev 293343)
+++ branches/safari-613.2.7.0-branch/Source/WebCore/rendering/RenderVideo.cpp 2022-04-25 20:48:11 UTC (rev 293344)
@@ -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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes