[webkit-dev] A problem with the "data" attribute of the "object" tag

naixuan guan guannaixuan at gmail.com
Tue May 19 01:15:49 PDT 2009


Hi, everyone!

The HTML page is as follow:

<OBJECT id="StormPlayer" width = 800 height = 400 data = "1.wmv"></OBJECT>

when webkit detect the object, it automatically thought the mimetype of this
object is "video/x-ms-wmv"
when I change the data attribute to "1.avi", webkit thought the mimetype is
"video/x-msvideo"

I really want to know how does webkit do this kind of judge. I search the
src code with the key word "video/x-ms-wmv", but I got nothing.
Currently I only know two functions may work with this:
RenderPartObject::updateWidget and HTMLObjectElement::parseMappedAttribute,
but I can't find out how does webkit check the "data" attribute and decide
which mimetype to use.

Could you give me some tips?
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090519/53813e87/attachment.html>


More information about the webkit-dev mailing list