[Webkit-unassigned] [Bug 32572] [Qt] Cannot load flash files from a local file.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 15 13:49:52 PST 2009


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


Kenneth Rohde Christiansen <kenneth at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #44903|review?                     |review+
               Flag|                            |




--- Comment #5 from Kenneth Rohde Christiansen <kenneth at webkit.org>  2009-12-15 13:49:52 PST ---
(From update of attachment 44903)
When landing consider the below comments

> +        void substituteMIMETypeFromPluginDatabase(const ResourceResponse& r);\

Remove the 'r' variable


> +#if PLATFORM(QT)
> +void MainResourceLoader::substituteMIMETypeFromPluginDatabase(const ResourceResponse& r)
> +{
> +    if (m_frame->settings()->arePluginsEnabled()) {
> +        String filename = r.url().lastPathComponent();
> +        if (!filename.endsWith("/")) {
> +            int extensionPos = filename.reverseFind('.');
> +            if (extensionPos != -1) {
> +                String extension = filename.substring(extensionPos + 1);
> +                String mimeType = PluginDatabase::installedPlugins()->MIMETypeForExtension(extension);
> +                if (!mimeType.isEmpty()) {
> +                    ResourceResponse* response = const_cast<ResourceResponse*>(&r);
> +                    response->setMimeType(mimeType);
> +                }
> +            }
> +        }
> +    }
> +}
> +#endif

Reduce nesting by using early returns.

-- 
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