"Plug-in is blocked" message doesn't draw correctly
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 Oct 2015 02:38:19 +0000 (02:38 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 Oct 2015 02:38:19 +0000 (02:38 +0000)
commit63ae7b66232df80ecca836ba12f22c1e6ed16a3b
tree95d2ffb0dfec1c02ec839df50ef587834af9eae4
parent760ebe1f3c715a16f2afacc9e3b8ac4d9afcad2f
"Plug-in is blocked" message doesn't draw correctly
https://bugs.webkit.org/show_bug.cgi?id=149741
<rdar://problem/22920949>

Patch by Conrad Shultz and Ricky Mondello.

Patch by Ricky Mondello <rmondello@apple.com> on 2015-10-03
Reviewed by Anders Carlsson.

Source/WebCore:

No new tests are added.

Add PluginData API to check whether a MIME type is supported, regardless of plug-in visibility.

* plugins/PluginData.cpp:
(WebCore::PluginData::getWebVisibleMimesAndPluginIndices): Adopt getMimesAndPluginIndiciesForPlugins.
(WebCore::PluginData::getMimesAndPluginIndices): Added.
(WebCore::PluginData::getMimesAndPluginIndiciesForPlugins): Essentially factored out of
    getWebVisibleMimesAndPluginIndices.
(WebCore::PluginData::supportsMimeType): Added. Somewhat similar to preexisting supportsWebVisibleMimeType.
* plugins/PluginData.h: Declare supportsMimeType.

Source/WebKit2:

If a WebKit client sets plug-in X to not be visible to the web, that doesn't mean we shouldn't consult
that plug-in when determining what kind of object type an object is. Properly classifying a non-web-visible
Netscape plug-in as such allows its bounds to properly measured, allowing it to be drawn properly.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::objectContentType): Use PluginData's supportsMimeType, rather than its
    supportsWebVisibleMimeType, when determining the ObjectContentType for a MIME type on a url.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/plugins/PluginData.cpp
Source/WebCore/plugins/PluginData.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp