[webkit-reviews] review denied: [Bug 35361] File.type support : [Attachment 49450] Proposed Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 25 11:44:08 PST 2010


Dmitry Titov <dimich at chromium.org> has denied Jian Li <jianli at chromium.org>'s
request for review:
Bug 35361: File.type support
https://bugs.webkit.org/show_bug.cgi?id=35361

Attachment 49450: Proposed Patch
https://bugs.webkit.org/attachment.cgi?id=49450&action=review

------- Additional Comments from Dmitry Titov <dimich at chromium.org>
> diff --git a/WebCore/html/File.cpp b/WebCore/html/File.cpp
>  File::File(const String& path)
>      : Blob(path)
>      , m_name(pathGetFileName(path))
> +    // We don't use MIMETypeRegistry::getMIMETypeForPath() because it
returns "application/octet-stream" upon failure
> +    ,
m_type(MIMETypeRegistry::getMIMETypeForExtension(path.substring(path.reverseFin
d('.') + 1)))

It looks too complex code to have it in initializer. Also, for the path "gif"
it will return a valid mime type while it should return "".
Could it be moved into ctor body with more checks?

Also, getMIMETypeForExtension on some platforms also returns non-empty string
when it can't match the extension - see for example MIMETypeRegistryQt.cpp
It might be a good idea to ask port developers if they want to fix those.

r- because of initializer.


More information about the webkit-reviews mailing list