[Webkit-unassigned] [Bug 242156] REGRESSION(243836 at main): Broke videos in yelp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 29 19:17:20 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=242156

--- Comment #1 from Michael Catanzaro <mcatanzaro at gnome.org> ---
BTW this hack was needed because I failed to find any documentation with videos remaining so that I could give an easy reproducer. We only noticed because RHEL 8 still has some videos.

Anyway, the change that broke things is:

diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp
index ff346f25f75e..345a7e310251 100644
--- a/Source/WebCore/html/HTMLMediaElement.cpp
+++ b/Source/WebCore/html/HTMLMediaElement.cpp
@@ -1472,10 +1472,12 @@ void HTMLMediaElement::loadResource(const URL& initialURL, ContentType& contentT
     }

     URL url = initialURL;
-    if (!url.isEmpty() && !frame->loader().willLoadMediaElementURL(url, *this)) {
+#if PLATFORM(COCOA)
+    if (url.isLocalFile() && !frame->loader().willLoadMediaElementURL(url, *this)) {
         mediaLoadingFailed(MediaPlayer::NetworkState::FormatError);
         return;
     }
+#endif

 #if ENABLE(CONTENT_EXTENSIONS)
     if (RefPtr documentLoader = frame->loader().documentLoader()) {

Jer's changelog contains reasoning for making this Cocoa-specific:

"""
Drive-by fix: to allow this change to be testable, we must revert a change which calls all the
network delegate callbacks with empty data. This was necessary at the time because (at least for
Cocoa ports) media loading happened outside WebCore's loader path. Currently, all http(s), data,
blob, and custom protocol schemes are loaded through WebCore, leaving file:// URLs as the
remaining protocol type that needs custom handling, and only on Cocoa ports.
"""

Notice the GStreamer log contains errors related to the URI scheme:

0:00:00.146452332  4822 0x561c5fcb4600 ERROR      webkitmediaplayer MediaPlayerPrivateGStreamer.cpp:1714:handleMessage: Error 12: No URI handler implemented for "bogus-help". (url=bogus-help:/gnome-help/figures/gnome-windows-and-workspaces.webm)

yelp seems to be using this bogus-help URI scheme to trick WebKit into... something something, I don't understand. It was added here:

https://gitlab.gnome.org/GNOME/yelp/-/commit/04683e89cef14f56e4c3d1595424e109f12f5d06

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220630/7fc9e024/attachment.htm>


More information about the webkit-unassigned mailing list