Supported plugin check should be based on plugin identifier
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Jun 2018 22:22:07 +0000 (22:22 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Jun 2018 22:22:07 +0000 (22:22 +0000)
commitc0588a8ff7175e734d6c806fc2f73d84f7c41918
tree2cd4f20fd77e0ea737ad161a77f86b13141adf7e
parent929042f2f448e1fb1f1ce3198c4271354b618507
Supported plugin check should be based on plugin identifier
https://bugs.webkit.org/show_bug.cgi?id=186578
<rdar://problem/40523828>

Reviewed by Darin Adler.

Source/WebCore:

Rename SupportedPluginName in SupportedPluginIdentifier.
Add cross-platform support for plug-in identifier.

Update built-in PDF plug-in to check its identifier instead of its name.
This is stronger as the name may change according localization.

* loader/EmptyClients.cpp:
* plugins/PluginData.cpp:
(WebCore::isBuiltInPDFPlugIn):
(WebCore::PluginData::initPlugins):
* plugins/PluginData.h:
(WebCore::operator==):
(WebCore::isSupportedPlugin):
(WebCore::SupportedPluginIdentifier::decode):
(WebCore::SupportedPluginIdentifier::encode const):
(WebCore::SupportedPluginName::decode): Deleted.
(WebCore::SupportedPluginName::encode const): Deleted.
* plugins/PluginInfoProvider.h:

Source/WebKit:

Refactoring to move from Plugin name to Plugin identifier.
Set built-in pdf plugin identifier.
This allows making sure that the PDF plug-in check might not change according localization.

* Scripts/webkit/messages.py:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<PluginInfo>::encode):
(IPC::ArgumentCoder<PluginInfo>::decode):
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::supportedPluginIdentifiers):
(WebKit::PluginInfoStore::addSupportedPlugin):
(WebKit::PluginInfoStore::supportedPluginNames): Deleted.
* UIProcess/Plugins/PluginInfoStore.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getPlugins):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::pluginInfo):
* WebProcess/Plugins/WebPluginInfoProvider.cpp:
(WebKit::WebPluginInfoProvider::pluginInfo):
(WebKit::WebPluginInfoProvider::webVisiblePluginInfo):
(WebKit::WebPluginInfoProvider::populatePluginCache):
* WebProcess/Plugins/WebPluginInfoProvider.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebPluginInfoProvider.h:
* WebCoreSupport/WebPluginInfoProvider.mm:
(WebPluginInfoProvider::pluginInfo):
(WebPluginInfoProvider::webVisiblePluginInfo):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/WebCore/ChangeLog
Source/WebCore/loader/EmptyClients.cpp
Source/WebCore/plugins/PluginData.cpp
Source/WebCore/plugins/PluginData.h
Source/WebCore/plugins/PluginInfoProvider.h
Source/WebKit/ChangeLog
Source/WebKit/Scripts/webkit/messages.py
Source/WebKit/Shared/WebCoreArgumentCoders.cpp
Source/WebKit/UIProcess/Plugins/PluginInfoStore.cpp
Source/WebKit/UIProcess/Plugins/PluginInfoStore.h
Source/WebKit/UIProcess/WebProcessProxy.cpp
Source/WebKit/UIProcess/WebProcessProxy.h
Source/WebKit/UIProcess/WebProcessProxy.messages.in
Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm
Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp
Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.h
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebCoreSupport/WebPluginInfoProvider.h
Source/WebKitLegacy/mac/WebCoreSupport/WebPluginInfoProvider.mm