[Webkit-unassigned] [Bug 70110] [Qt] fast/events/media-focus-in-standalone-media-document.html fails

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 19 06:14:50 PDT 2011


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


Deepak Sherveghar <bpwv64 at motorola.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bpwv64 at motorola.com




--- Comment #1 from Deepak Sherveghar <bpwv64 at motorola.com>  2011-10-19 06:14:50 PST ---
After setting up QT WebKit port on Linux and debugging it, I found two issues as to why this test case is failing.

1. Standalone media element is not supported in QT WebKit port on Linux.
If we give a Standalone media url (eg: http://abc/test.mp4 or .mov) to QTTestbrowser, the FrameLoaderClientQt.cpp sets the response policy as "download" instead of "use". Since canShowMIMEType() looks up the mimetype for only SupportedImage, SupportedNonImage and MIMETypeRegistered with plugins. It should also check for SupportedMediaMIMEType().
ie: a check in FrameLoaderClientQt::canShowMIMEType()

if (MIMETypeRegistry::isSupportedMediaMIMEType(type))
        return true;

Only then the policy would be set to use and Standalone media elements will be rendered using the MediaDocument architecture.

I am not not sure as to why standalone media element is not supported as of yet in QT. Is it because of some design decision that may have happened earlier or a feature QT port doesn't wish to support??

2. QT MIMETypeRegistry doesn't list media mime types (audio as well video) in its extension map.
When loading the standalone media element (in this case iframe's src set to an mp4 file), Qt's NetworkReplyHandler receives the content type header (QNetworkRequest::ContentTypeHeader) as null. Since this is null, it tries to set the mimetype using the url extension (MIMETypeRegistry::getMIMETypeForPath()). In this case it would try to look up the registry using extension ".mp4".
But since this extension is not listed, the load fails. In the failing test case notifydone() is called in the onload handler of this iframe load. Since the load fails, onload handler is not called, and the test case times out.

I think we should publish the media mimetypes in the extensionmap. Something like 
ie: in MIMETypeRegistryQT.cpp

static const ExtensionMap extensionMap[] = {
... 
{ "mp4", "video/mp4" },
{ "m4v", "video/mp4" },
{ "m4a", "audio/x-m4a"},
{ "mp3", "audio/mp3"},
{ "ogv", "video/ogg"},
{ "oga", "audio/ogg"},
{ "webm", "video/webm},
{ "webm", "audio/webm},
{ "wav", "audio/wav"},
..
};

In GTK, soup library returns appropriate content type. (soup_request_get_content_type()). Hence the test case works fine in GTK.

With the above two fixes, test case runs fine. Both the above two points are necessary to fix this failing test case in QT.

Let me know your thoughts on this.
If it seems reasonable enough will upload the patch.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list