[webkit-reviews] review denied: [Bug 15766] [GTK] WebKit spews
flash/etc.. as text/plain into iframe if plugin missing :
[Attachment 16997] Update patch to match win32/osx and
include ChangeLog as patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Nov 2 18:07:51 PDT 2007
Alp Toker <alp at atoker.com> has denied Rodney Dawes <dobey at wayofthemonkey.com>'s
request for review:
Bug 15766: [GTK] WebKit spews flash/etc.. as text/plain into iframe if plugin
missing
http://bugs.webkit.org/show_bug.cgi?id=15766
Attachment 16997: Update patch to match win32/osx and include ChangeLog as
patch
http://bugs.webkit.org/attachment.cgi?id=16997&action=edit
------- Additional Comments from Alp Toker <alp at atoker.com>
>Index: WebKit/gtk/ChangeLog
>===================================================================
>--- WebKit/gtk/ChangeLog (revision 27376)
>+++ WebKit/gtk/ChangeLog (working copy)
>@@ -1,3 +1,11 @@
>+2007-11-02 Rodney Dawes <dobey at wayofthemonkey.com>
>+
>+ Do some MIME type comparisons to avoid spewing flash/etc... into
>+ an iframe as text/plain because the HTTP connection told us it was
>+
>+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
>+ (FrameLoaderClient::objectContentType):
>+
> 2007-10-29 Alp Toker <alp at atoker.com>
>
> Reviewed by Maciej.
>Index: WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
>===================================================================
>--- WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp (revision 27376)
>+++ WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp (working copy)
>@@ -226,14 +247,23 @@ Widget* FrameLoaderClient::createJavaApp
>
> ObjectContentType FrameLoaderClient::objectContentType(const KURL& url, const
String& mimeType)
> {
>- if (url.isEmpty())
>- return ObjectContentType();
>+ String type = mimeType;
>+ if (type.isEmpty())
>+ type =
MIMETypeRegistry::getMIMETypeForExtension(url.path().mid(url.path().findRev('.'
)+1));
>+
>+ if (type.isEmpty())
>+ return WebCore::ObjectContentFrame; // Match win32/OSX behavior for
now
I guess we can't use MIMETypeRegistry::getMIMETypeForPath() because it returns
"application/octet-stream" instead of an error status? That would explain why
Win did the path parsing themselves.
>
>- // TODO: use more than just the extension to determine the content type?
>- String rtype = MIMETypeRegistry::getMIMETypeForPath(url.path());
>- if (!rtype.isEmpty())
>- return ObjectContentFrame;
>- return ObjectContentType();
>+ if (MIMETypeRegistry::isSupportedImageMIMEType(type))
>+ return WebCore::ObjectContentImage;
>+
>+ if
(PluginDatabaseGtk::installedPlugins()->isMIMETypeRegistered(mimeType))
>+ return WebCore::ObjectContentNetscapePlugin;
Careful. There is no PluginDatabaseGtk yet, so this will break the build. I
appreciate that you're juggling a lot of changes. Perhaps it'll be OK to
comment this out along with a TODO.
>+
>+ if (MIMETypeRegistry::isSupportedNonImageMIMEType(type))
>+ return WebCore::ObjectContentFrame;
>+
>+ return WebCore::ObjectContentNone;
> }
>
> String FrameLoaderClient::overrideMediaType() const
More information about the webkit-reviews
mailing list