swf files that are loaded from the local file system have their mime type set to application/octet-stream. This prevents identifying the file as flash file. The same problem can be observed in Safari, but not in Chrome. Patch will follow soon.
Created attachment 44901 [details] Patch.
style-queue ran check-webkit-style on attachment 44901 [details] without any errors.
Created attachment 44903 [details] Patch. Separate the new code into its own method, as suggested by Kenneth.
style-queue ran check-webkit-style on attachment 44903 [details] without any errors.
Comment on attachment 44903 [details] Patch. 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.
Created attachment 44907 [details] New patch to reduce nesting.
style-queue ran check-webkit-style on attachment 44907 [details] without any errors.
Comment on attachment 44907 [details] New patch to reduce nesting. Clearing flags on attachment: 44907 Committed r52172: <http://trac.webkit.org/changeset/52172>
All reviewed patches have been landed. Closing bug.