- Revision
- 277080
- Author
- ph...@webkit.org
- Date
- 2021-05-06 04:11:39 -0700 (Thu, 06 May 2021)
Log Message
REGRESSION(r271341): media/media-fullscreen-inline.html times out on GTK
https://bugs.webkit.org/show_bug.cgi?id=220540
Reviewed by Xabier Rodriguez-Calvar.
Source/WebCore:
When the GStreamer player client is an <audio> tag it won't render any video, but setting no
explicit video sink on playbin will not prevent video rendering per-se. In that situation
playbin will use autovideosink which will end-up creating a standalone window through
glimagesink or whatever has the highest rank. For now with playbin2 we can use fakevideosink
for such situation. For the playbin3 case we might be able to entirely deactivate video
rendering through stream selection.
Internals::isChangingPresentationMode was enabled for ports not implementing
VIDEO_PRESENTATION_MODE yet, because this test makes use of it.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
(WebCore::MediaPlayerPrivateGStreamer::createVideoSink):
* testing/Internals.cpp:
(WebCore::Internals::isChangingPresentationMode const):
* testing/Internals.h:
* testing/Internals.idl:
LayoutTests:
Call webkitExitFullScreen() asynchronously to give time to the WebCore FullscreenManager to
notify the video element that it entered full-screen, and thus allowing the exitFullScreen()
call to go through.
* media/media-fullscreen.js:
(fullscreenchange):
(async beginfullscreen):
* platform/glib/TestExpectations:
* platform/glib/media/media-fullscreen-inline-expected.txt:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (277079 => 277080)
--- trunk/LayoutTests/ChangeLog 2021-05-06 10:55:52 UTC (rev 277079)
+++ trunk/LayoutTests/ChangeLog 2021-05-06 11:11:39 UTC (rev 277080)
@@ -1,3 +1,20 @@
+2021-05-06 Philippe Normand <pnorm...@igalia.com>
+
+ REGRESSION(r271341): media/media-fullscreen-inline.html times out on GTK
+ https://bugs.webkit.org/show_bug.cgi?id=220540
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ Call webkitExitFullScreen() asynchronously to give time to the WebCore FullscreenManager to
+ notify the video element that it entered full-screen, and thus allowing the exitFullScreen()
+ call to go through.
+
+ * media/media-fullscreen.js:
+ (fullscreenchange):
+ (async beginfullscreen):
+ * platform/glib/TestExpectations:
+ * platform/glib/media/media-fullscreen-inline-expected.txt:
+
2021-05-06 Tim Nguyen <n...@apple.com>
Re-import css/css-color & css/css-color-adjust WPT
Modified: trunk/LayoutTests/media/media-fullscreen.js (277079 => 277080)
--- trunk/LayoutTests/media/media-fullscreen.js 2021-05-06 10:55:52 UTC (rev 277079)
+++ trunk/LayoutTests/media/media-fullscreen.js 2021-05-06 11:11:39 UTC (rev 277080)
@@ -33,16 +33,23 @@
function fullscreenchange()
{
if (document.webkitIsFullScreen)
- beginfullscreen();
+ beginfullscreen(true);
else
endfullscreen();
}
-async function beginfullscreen()
+async function beginfullscreen(wasTriggeredFromFullscreenChangeEvent)
{
if (window.internals)
await testExpectedEventually("internals.isChangingPresentationMode(mediaElement)", false);
- run("mediaElement.webkitExitFullScreen()");
+ if (!wasTriggeredFromFullscreenChangeEvent)
+ run("mediaElement.webkitExitFullScreen()");
+ else {
+ // Call asynchronously to give time to the WebCore FullscreenManager to notify the video
+ // element that it entered full-screen, and thus allowing the exitFullScreen() call to go
+ // through.
+ setTimeout('run("mediaElement.webkitExitFullScreen()")', 0);
+ }
}
function endfullscreen()
Modified: trunk/LayoutTests/platform/glib/TestExpectations (277079 => 277080)
--- trunk/LayoutTests/platform/glib/TestExpectations 2021-05-06 10:55:52 UTC (rev 277079)
+++ trunk/LayoutTests/platform/glib/TestExpectations 2021-05-06 11:11:39 UTC (rev 277080)
@@ -567,8 +567,6 @@
webkit.org/b/173188 fast/mediastream/getUserMedia-grant-persistency3.html [ Pass Failure ]
-webkit.org/b/220540 media/media-fullscreen-inline.html [ Timeout ]
-
webkit.org/b/179258 fast/canvas/webgl/texImage2D-mse-flipY-false.html [ Timeout ]
webkit.org/b/179258 fast/canvas/webgl/texImage2D-mse-flipY-true.html [ Timeout ]
Modified: trunk/LayoutTests/platform/glib/media/media-fullscreen-inline-expected.txt (277079 => 277080)
--- trunk/LayoutTests/platform/glib/media/media-fullscreen-inline-expected.txt 2021-05-06 10:55:52 UTC (rev 277079)
+++ trunk/LayoutTests/platform/glib/media/media-fullscreen-inline-expected.txt 2021-05-06 11:11:39 UTC (rev 277080)
@@ -29,7 +29,7 @@
* event handler triggered by user gesture
RUN(mediaElement.webkitEnterFullScreen())
EVENT(webkitfullscreenchange)
-EXPECTED (mediaElement.webkitDisplayingFullscreen == 'true') OK
+EXPECTED (internals.isChangingPresentationMode(mediaElement) == 'false') OK
RUN(mediaElement.webkitExitFullScreen())
EVENT(webkitfullscreenchange)
Modified: trunk/Source/WebCore/ChangeLog (277079 => 277080)
--- trunk/Source/WebCore/ChangeLog 2021-05-06 10:55:52 UTC (rev 277079)
+++ trunk/Source/WebCore/ChangeLog 2021-05-06 11:11:39 UTC (rev 277080)
@@ -1,3 +1,28 @@
+2021-05-06 Philippe Normand <pnorm...@igalia.com>
+
+ REGRESSION(r271341): media/media-fullscreen-inline.html times out on GTK
+ https://bugs.webkit.org/show_bug.cgi?id=220540
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ When the GStreamer player client is an <audio> tag it won't render any video, but setting no
+ explicit video sink on playbin will not prevent video rendering per-se. In that situation
+ playbin will use autovideosink which will end-up creating a standalone window through
+ glimagesink or whatever has the highest rank. For now with playbin2 we can use fakevideosink
+ for such situation. For the playbin3 case we might be able to entirely deactivate video
+ rendering through stream selection.
+
+ Internals::isChangingPresentationMode was enabled for ports not implementing
+ VIDEO_PRESENTATION_MODE yet, because this test makes use of it.
+
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
+ (WebCore::MediaPlayerPrivateGStreamer::createVideoSink):
+ * testing/Internals.cpp:
+ (WebCore::Internals::isChangingPresentationMode const):
+ * testing/Internals.h:
+ * testing/Internals.idl:
+
2021-05-06 Ryosuke Niwa <rn...@webkit.org>
Replace raw pointers in SVGElementRareData and SVGDocumentExtensions with WeakHashMap and WeakPtr
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (277079 => 277080)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2021-05-06 10:55:52 UTC (rev 277079)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2021-05-06 11:11:39 UTC (rev 277080)
@@ -2776,9 +2776,7 @@
if (!m_audioSink)
m_audioSink = createAudioSink();
- g_object_set(m_pipeline.get(), "audio-sink", m_audioSink.get(), nullptr);
- if (m_player->isVideoPlayer())
- g_object_set(m_pipeline.get(), "video-sink", createVideoSink(), nullptr);
+ g_object_set(m_pipeline.get(), "audio-sink", m_audioSink.get(), "video-sink", createVideoSink(), nullptr);
if (m_shouldPreservePitch) {
GstElement* scale = gst_element_factory_make("scaletempo", nullptr);
@@ -3420,6 +3418,11 @@
{
acceleratedRenderingStateChanged();
+ if (!m_player->isVideoPlayer()) {
+ m_videoSink = gst_element_factory_make("fakevideosink", nullptr);
+ return m_videoSink.get();
+ }
+
#if USE(GSTREAMER_HOLEPUNCH)
m_videoSink = createHolePunchVideoSink();
pushNextHolePunchBuffer();
Modified: trunk/Source/WebCore/testing/Internals.cpp (277079 => 277080)
--- trunk/Source/WebCore/testing/Internals.cpp 2021-05-06 10:55:52 UTC (rev 277079)
+++ trunk/Source/WebCore/testing/Internals.cpp 2021-05-06 11:11:39 UTC (rev 277080)
@@ -3431,12 +3431,19 @@
page->setFullscreenControlsHidden(hidden);
}
-#if ENABLE(VIDEO_PRESENTATION_MODE)
+#if ENABLE(VIDEO)
bool Internals::isChangingPresentationMode(HTMLVideoElement& element) const
{
+#if ENABLE(VIDEO_PRESENTATION_MODE)
return element.isChangingPresentationMode();
+#else
+ UNUSED_PARAM(element);
+ return false;
+#endif
}
+#endif
+#if ENABLE(VIDEO_PRESENTATION_MODE)
void Internals::setMockVideoPresentationModeEnabled(bool enabled)
{
Document* document = contextDocument();
Modified: trunk/Source/WebCore/testing/Internals.h (277079 => 277080)
--- trunk/Source/WebCore/testing/Internals.h 2021-05-06 10:55:52 UTC (rev 277079)
+++ trunk/Source/WebCore/testing/Internals.h 2021-05-06 11:11:39 UTC (rev 277080)
@@ -539,8 +539,11 @@
void setFullscreenAutoHideDuration(double);
void setFullscreenControlsHidden(bool);
+#if ENABLE(VIDEO)
+ bool isChangingPresentationMode(HTMLVideoElement&) const;
+#endif
+
#if ENABLE(VIDEO_PRESENTATION_MODE)
- bool isChangingPresentationMode(HTMLVideoElement&) const;
void setMockVideoPresentationModeEnabled(bool);
#endif
Modified: trunk/Source/WebCore/testing/Internals.idl (277079 => 277080)
--- trunk/Source/WebCore/testing/Internals.idl 2021-05-06 10:55:52 UTC (rev 277079)
+++ trunk/Source/WebCore/testing/Internals.idl 2021-05-06 11:11:39 UTC (rev 277080)
@@ -599,7 +599,7 @@
undefined setFullscreenAutoHideDuration(double duration);
undefined setFullscreenControlsHidden(boolean hidden);
- [Conditional=VIDEO_PRESENTATION_MODE] boolean isChangingPresentationMode(HTMLVideoElement element);
+ [Conditional=VIDEO] boolean isChangingPresentationMode(HTMLVideoElement element);
[Conditional=VIDEO_PRESENTATION_MODE] undefined setMockVideoPresentationModeEnabled(boolean enabled);
undefined setApplicationCacheOriginQuota(unsigned long long quota);