Skip to content

Commit

Permalink
Merge r186581 - [GTK] The "Missing Plug-in" buttons are not showing u…
Browse files Browse the repository at this point in the history
…p on some flash contents.

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

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-07-08
Reviewed by Martin Robinson.

Currently, WebKitGTK+ doesn't show the "Missing Plug-in" buttons if the plugin-related tags
don't have a "type" attribute. In such a case, WebCore tries to guess the MIME type from
the extensions by using MIMETypeRegistry::getMIMETypeForExtension(). For WebKitGTK+,
MIMETypeRegistry::getMIMETypeForExtension() goes through |extensionMap|, which is a simple
array of <extension, mime type>, looking for the mime type for the given extension.
But |extensionMap| in MIMETypeRegistryGtk.cpp doesn't have the information for ".swf",
so WebCore fails to guess the MIME type and regard the content type as ObjectContentFrame,
not ObjectContentNetscapePlugin.

* platform/gtk/MIMETypeRegistryGtk.cpp:
  • Loading branch information
chosungmann authored and carlosgcampos committed Aug 4, 2015
1 parent fcde2ce commit e9772a4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,21 @@
2015-07-08 Sungmann Cho <sungmann.cho@navercorp.com>

[GTK] The "Missing Plug-in" buttons are not showing up on some flash contents.
https://bugs.webkit.org/show_bug.cgi?id=146707

Reviewed by Martin Robinson.

Currently, WebKitGTK+ doesn't show the "Missing Plug-in" buttons if the plugin-related tags
don't have a "type" attribute. In such a case, WebCore tries to guess the MIME type from
the extensions by using MIMETypeRegistry::getMIMETypeForExtension(). For WebKitGTK+,
MIMETypeRegistry::getMIMETypeForExtension() goes through |extensionMap|, which is a simple
array of <extension, mime type>, looking for the mime type for the given extension.
But |extensionMap| in MIMETypeRegistryGtk.cpp doesn't have the information for ".swf",
so WebCore fails to guess the MIME type and regard the content type as ObjectContentFrame,
not ObjectContentNetscapePlugin.

* platform/gtk/MIMETypeRegistryGtk.cpp:

2015-07-08 Said Abou-Hallawa <sabouhallawa@apple.com>

Crash when appending an SVG <use> element dynamically which has animated SVG <path> element
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/platform/gtk/MIMETypeRegistryGtk.cpp
Expand Up @@ -52,6 +52,7 @@ static const ExtensionMap extensionMap [] = {
{ "png", "image/png" },
{ "rss", "application/rss+xml" },
{ "svg", "image/svg+xml" },
{ "swf", "application/x-shockwave-flash" },
{ "text", "text/plain" },
{ "txt", "text/plain" },
{ "xbm", "image/x-xbitmap" },
Expand Down

0 comments on commit e9772a4

Please sign in to comment.