WebKit Bugzilla
Attachment 342608 Details for
Bug 186578
: Supported plugin check should be based on plugin identifier
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186578-20180612161822.patch (text/plain), 24.78 KB, created by
youenn fablet
on 2018-06-12 16:18:23 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2018-06-12 16:18:23 PDT
Size:
24.78 KB
patch
obsolete
>Subversion Revision: 232754 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 796f80f19c232bdb13a4b64916ec62e1831b34ce..12bfce51ee2f75027705e8b750eee360d3857a1a 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,30 @@ >+2018-06-12 Youenn Fablet <youenn@apple.com> >+ >+ Supported plugin check should be based on plugin identifier >+ https://bugs.webkit.org/show_bug.cgi?id=186578 >+ <rdar://problem/40523828> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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: >+ > 2018-06-12 Jianjun Zhu <jianjun.zhu@intel.com> > > Hash deviceId and groupId of MediaTrackCapabilities. >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 517b87c29b3dd61271bfcf3ef1e959a2518a551d..b7b8804ab0fabf272dcda0f2a3798abba99bc162 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,36 @@ >+2018-06-12 Youenn Fablet <youenn@apple.com> >+ >+ Supported plugin check should be based on plugin identifier >+ https://bugs.webkit.org/show_bug.cgi?id=186578 >+ <rdar://problem/40523828> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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: >+ > 2018-06-11 Carlos Garcia Campos <cgarcia@igalia.com> > > Unreviewed. Update OptionsGTK.cmake and NEWS for 2.21.4 release. >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 9ca66687eba9b173c9910e7adfe3074f4a80b82f..cedf5ceecae8f75a198c6f0d8f0eb9a1adb5dcf9 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,16 @@ >+2018-06-12 Youenn Fablet <youenn@apple.com> >+ >+ Supported plugin check should be based on plugin identifier >+ https://bugs.webkit.org/show_bug.cgi?id=186578 >+ <rdar://problem/40523828> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebCoreSupport/WebPluginInfoProvider.h: >+ * WebCoreSupport/WebPluginInfoProvider.mm: >+ (WebPluginInfoProvider::pluginInfo): >+ (WebPluginInfoProvider::webVisiblePluginInfo): >+ > 2018-06-11 Tim Horton <timothy_horton@apple.com> > > Link drag image is inconsistently unreadable in dark mode >diff --git a/Source/WebCore/loader/EmptyClients.cpp b/Source/WebCore/loader/EmptyClients.cpp >index 6053b878b2f0454003df14701ea8cba4d039dac7..2b4f4956a729cd4df5b461c2409dec57341ccd38 100644 >--- a/Source/WebCore/loader/EmptyClients.cpp >+++ b/Source/WebCore/loader/EmptyClients.cpp >@@ -326,7 +326,7 @@ class EmptyPaymentCoordinatorClient final : public PaymentCoordinatorClient { > > class EmptyPluginInfoProvider final : public PluginInfoProvider { > void refreshPlugins() final { }; >- Vector<PluginInfo> pluginInfo(Page&, std::optional<Vector<SupportedPluginName>>&) final { return { }; } >+ Vector<PluginInfo> pluginInfo(Page&, std::optional<Vector<SupportedPluginIdentifier>>&) final { return { }; } > Vector<PluginInfo> webVisiblePluginInfo(Page&, const URL&) final { return { }; } > }; > >diff --git a/Source/WebCore/plugins/PluginData.cpp b/Source/WebCore/plugins/PluginData.cpp >index b4662ca25cff5149724a483fa5470f3b348aff46..07a711bea5dcb5fbe8e5b6153afc6fb16c7c17fb 100644 >--- a/Source/WebCore/plugins/PluginData.cpp >+++ b/Source/WebCore/plugins/PluginData.cpp >@@ -52,9 +52,9 @@ const Vector<PluginInfo>& PluginData::webVisiblePlugins() const > } > > #if PLATFORM(COCOA) >-static inline bool isBuiltInPDFPlugIn(const PluginInfo& plugIn) >+static inline bool isBuiltInPDFPlugIn(const PluginInfo& plugin) > { >- return plugIn.name == builtInPDFPluginName(); >+ return plugin.bundleIdentifier == "com.apple.webkit.builtInPDFPlugin"; > } > #else > static inline bool isBuiltInPDFPlugIn(const PluginInfo&) >@@ -190,7 +190,7 @@ void PluginData::initPlugins() > { > ASSERT(m_plugins.isEmpty()); > >- m_plugins = m_page.pluginInfoProvider().pluginInfo(m_page, m_supportedPluginNames); >+ m_plugins = m_page.pluginInfoProvider().pluginInfo(m_page, m_supportedPluginIdentifiers); > } > > } // namespace WebCore >diff --git a/Source/WebCore/plugins/PluginData.h b/Source/WebCore/plugins/PluginData.h >index 167852d34d2c511e88f60c35e96f12ccbc8488b1..44500faa36d1d01ad49f73fe0d00249d67974b2b 100644 >--- a/Source/WebCore/plugins/PluginData.h >+++ b/Source/WebCore/plugins/PluginData.h >@@ -73,27 +73,27 @@ struct PluginInfo { > > PluginLoadClientPolicy clientLoadPolicy; > >-#if PLATFORM(MAC) > String bundleIdentifier; >+#if PLATFORM(MAC) > String versionString; > #endif > }; > > inline bool operator==(PluginInfo& a, PluginInfo& b) > { >- bool result = a.name == b.name && a.file == b.file && a.desc == b.desc && a.mimes == b.mimes && a.isApplicationPlugin == b.isApplicationPlugin && a.clientLoadPolicy == b.clientLoadPolicy; >+ bool result = a.name == b.name && a.file == b.file && a.desc == b.desc && a.mimes == b.mimes && a.isApplicationPlugin == b.isApplicationPlugin && a.clientLoadPolicy == b.clientLoadPolicy && a.bundleIdentifier == b.bundleIdentifier; > #if PLATFORM(MAC) >- result = result && a.bundleIdentifier == b.bundleIdentifier && a.versionString == b.versionString; >+ result = result && a.versionString == b.versionString; > #endif > return result; > } > >-struct SupportedPluginName { >+struct SupportedPluginIdentifier { > String matchingDomain; >- String pluginName; >+ String pluginIdentifier; > > template<class Encoder> void encode(Encoder&) const; >- template<class Decoder> static std::optional<SupportedPluginName> decode(Decoder&); >+ template<class Decoder> static std::optional<SupportedPluginIdentifier> decode(Decoder&); > }; > > // FIXME: merge with PluginDatabase in the future >@@ -128,7 +128,7 @@ private: > protected: > Page& m_page; > Vector<PluginInfo> m_plugins; >- std::optional<Vector<SupportedPluginName>> m_supportedPluginNames; >+ std::optional<Vector<SupportedPluginIdentifier>> m_supportedPluginIdentifiers; > > struct CachedVisiblePlugins { > URL pageURL; >@@ -137,32 +137,32 @@ protected: > mutable CachedVisiblePlugins m_cachedVisiblePlugins; > }; > >-inline bool isSupportedPlugin(const Vector<SupportedPluginName>& pluginNames, const URL& pageURL, const String& pluginName) >+inline bool isSupportedPlugin(const Vector<SupportedPluginIdentifier>& pluginIdentifiers, const URL& pageURL, const String& pluginIdentifier) > { >- return pluginNames.findMatching([&] (auto&& plugin) { >- return pageURL.isMatchingDomain(plugin.matchingDomain) && plugin.pluginName == pluginName; >+ return pluginIdentifiers.findMatching([&] (auto&& plugin) { >+ return pageURL.isMatchingDomain(plugin.matchingDomain) && plugin.pluginIdentifier == pluginIdentifier; > }) != notFound; > } > >-template<class Decoder> inline std::optional<SupportedPluginName> SupportedPluginName::decode(Decoder& decoder) >+template<class Decoder> inline std::optional<SupportedPluginIdentifier> SupportedPluginIdentifier::decode(Decoder& decoder) > { > std::optional<String> matchingDomain; > decoder >> matchingDomain; > if (!matchingDomain) > return std::nullopt; > >- std::optional<String> pluginName; >- decoder >> pluginName; >- if (!pluginName) >+ std::optional<String> pluginIdentifier; >+ decoder >> pluginIdentifier; >+ if (!pluginIdentifier) > return std::nullopt; > >- return SupportedPluginName { WTFMove(matchingDomain.value()), WTFMove(pluginName.value()) }; >+ return SupportedPluginIdentifier { WTFMove(matchingDomain.value()), WTFMove(pluginIdentifier.value()) }; > } > >-template<class Encoder> inline void SupportedPluginName::encode(Encoder& encoder) const >+template<class Encoder> inline void SupportedPluginIdentifier::encode(Encoder& encoder) const > { > encoder << matchingDomain; >- encoder << pluginName; >+ encoder << pluginIdentifier; > } > > } // namespace WebCore >diff --git a/Source/WebCore/plugins/PluginInfoProvider.h b/Source/WebCore/plugins/PluginInfoProvider.h >index 072f083c564d0c4ada61f874018d396be765f7b0..b4ab4626534737751af13dc44df0b76015ac7850 100644 >--- a/Source/WebCore/plugins/PluginInfoProvider.h >+++ b/Source/WebCore/plugins/PluginInfoProvider.h >@@ -39,7 +39,7 @@ public: > void addPage(Page&); > void removePage(Page&); > >- virtual Vector<PluginInfo> pluginInfo(Page&, std::optional<Vector<SupportedPluginName>>&) = 0; >+ virtual Vector<PluginInfo> pluginInfo(Page&, std::optional<Vector<SupportedPluginIdentifier>>&) = 0; > virtual Vector<PluginInfo> webVisiblePluginInfo(Page&, const URL&) = 0; > > private: >diff --git a/Source/WebKit/Scripts/webkit/messages.py b/Source/WebKit/Scripts/webkit/messages.py >index 16e2867a9b0820a3a857d409a51f61260721dbb6..2881f5fbcb38748df6bcabdd58f98c0d25b4e7d4 100644 >--- a/Source/WebKit/Scripts/webkit/messages.py >+++ b/Source/WebKit/Scripts/webkit/messages.py >@@ -409,7 +409,7 @@ def headers_for_type(type): > 'WebCore::ShippingMethodUpdate': ['<WebCore/ApplePaySessionPaymentRequest.h>'], > 'WebCore::ShouldNotifyWhenResolved': ['<WebCore/ServiceWorkerTypes.h>'], > 'WebCore::ShouldSample': ['<WebCore/DiagnosticLoggingClient.h>'], >- 'WebCore::SupportedPluginName': ['<WebCore/PluginData.h>'], >+ 'WebCore::SupportedPluginIdentifier': ['<WebCore/PluginData.h>'], > 'WebCore::TextCheckingRequestData': ['<WebCore/TextChecking.h>'], > 'WebCore::TextCheckingResult': ['<WebCore/TextCheckerClient.h>'], > 'WebCore::TextIndicatorData': ['<WebCore/TextIndicator.h>'], >diff --git a/Source/WebKit/Shared/WebCoreArgumentCoders.cpp b/Source/WebKit/Shared/WebCoreArgumentCoders.cpp >index 94d3591b7eb899d1a341fa3ef59f319c491fa6ea..c926508e47c68817e3d571774f368b490edeb55e 100644 >--- a/Source/WebKit/Shared/WebCoreArgumentCoders.cpp >+++ b/Source/WebKit/Shared/WebCoreArgumentCoders.cpp >@@ -963,8 +963,8 @@ void ArgumentCoder<PluginInfo>::encode(Encoder& encoder, const PluginInfo& plugi > encoder << pluginInfo.mimes; > encoder << pluginInfo.isApplicationPlugin; > encoder.encodeEnum(pluginInfo.clientLoadPolicy); >-#if PLATFORM(MAC) > encoder << pluginInfo.bundleIdentifier; >+#if PLATFORM(MAC) > encoder << pluginInfo.versionString; > #endif > } >@@ -984,9 +984,9 @@ std::optional<WebCore::PluginInfo> ArgumentCoder<PluginInfo>::decode(Decoder& de > return std::nullopt; > if (!decoder.decodeEnum(pluginInfo.clientLoadPolicy)) > return std::nullopt; >-#if PLATFORM(MAC) > if (!decoder.decode(pluginInfo.bundleIdentifier)) > return std::nullopt; >+#if PLATFORM(MAC) > if (!decoder.decode(pluginInfo.versionString)) > return std::nullopt; > #endif >diff --git a/Source/WebKit/UIProcess/Plugins/PluginInfoStore.cpp b/Source/WebKit/UIProcess/Plugins/PluginInfoStore.cpp >index d850f3b2c63af3da900bf20e7120c3d95139823a..6ebb6ca8ae788bd172ee1ef206a98f8752d5fed6 100644 >--- a/Source/WebKit/UIProcess/Plugins/PluginInfoStore.cpp >+++ b/Source/WebKit/UIProcess/Plugins/PluginInfoStore.cpp >@@ -224,22 +224,22 @@ bool PluginInfoStore::isSupportedPlugin(const String& mimeType, const URL& plugi > }) != notFound; > } > >-std::optional<Vector<SupportedPluginName>> PluginInfoStore::supportedPluginNames() >+std::optional<Vector<SupportedPluginIdentifier>> PluginInfoStore::supportedPluginIdentifiers() > { > if (!m_supportedPlugins) > return std::nullopt; > > return WTF::map(*m_supportedPlugins, [] (auto&& item) { >- return SupportedPluginName { item.matchingDomain, item.name }; >+ return SupportedPluginIdentifier { item.matchingDomain, item.identifier }; > }); > } > >-void PluginInfoStore::addSupportedPlugin(String&& domainName, String&& name, HashSet<String>&& mimeTypes, HashSet<String> extensions) >+void PluginInfoStore::addSupportedPlugin(String&& domainName, String&& identifier, HashSet<String>&& mimeTypes, HashSet<String> extensions) > { > if (!m_supportedPlugins) > m_supportedPlugins = Vector<SupportedPlugin> { }; > >- m_supportedPlugins->append(SupportedPlugin { WTFMove(domainName), WTFMove(name), WTFMove(mimeTypes), WTFMove(extensions) }); >+ m_supportedPlugins->append(SupportedPlugin { WTFMove(domainName), WTFMove(identifier), WTFMove(mimeTypes), WTFMove(extensions) }); > } > > PluginModuleInfo PluginInfoStore::infoForPluginWithPath(const String& pluginPath) const >diff --git a/Source/WebKit/UIProcess/Plugins/PluginInfoStore.h b/Source/WebKit/UIProcess/Plugins/PluginInfoStore.h >index 2da1549275de1a40e87cc6f14365cf2f2e93a2b5..59afb3f7250353178a6e202ffb3b27f304c7cdcb 100644 >--- a/Source/WebKit/UIProcess/Plugins/PluginInfoStore.h >+++ b/Source/WebKit/UIProcess/Plugins/PluginInfoStore.h >@@ -64,7 +64,7 @@ public: > static PluginModuleLoadPolicy defaultLoadPolicyForPlugin(const PluginModuleInfo&); > > bool isSupportedPlugin(const String& mimeType, const WebCore::URL& pluginURL, const String& frameURLString, const WebCore::URL& pageURL); >- std::optional<Vector<WebCore::SupportedPluginName>> supportedPluginNames(); >+ std::optional<Vector<WebCore::SupportedPluginIdentifier>> supportedPluginIdentifiers(); > void addSupportedPlugin(String&& matchingDomain, String&& name, HashSet<String>&& mimeTypes, HashSet<String> extensions); > void clearSupportedPlugins() { m_supportedPlugins = std::nullopt; } > >@@ -98,7 +98,7 @@ private: > > struct SupportedPlugin { > String matchingDomain; >- String name; >+ String identifier; > HashSet<String> mimeTypes; > HashSet<String> extensions; > }; >diff --git a/Source/WebKit/UIProcess/WebProcessProxy.cpp b/Source/WebKit/UIProcess/WebProcessProxy.cpp >index 092748b4339aefd1f721ca72ec58fc469d2f6cea..5457eb47f72efacf84205abcaaf3bdf2a8d3ef1b 100644 >--- a/Source/WebKit/UIProcess/WebProcessProxy.cpp >+++ b/Source/WebKit/UIProcess/WebProcessProxy.cpp >@@ -560,12 +560,12 @@ void WebProcessProxy::updateBackForwardItem(const BackForwardListItemState& item > } > > #if ENABLE(NETSCAPE_PLUGIN_API) >-void WebProcessProxy::getPlugins(bool refresh, Vector<PluginInfo>& plugins, Vector<PluginInfo>& applicationPlugins, std::optional<Vector<WebCore::SupportedPluginName>>& supportedPluginNames) >+void WebProcessProxy::getPlugins(bool refresh, Vector<PluginInfo>& plugins, Vector<PluginInfo>& applicationPlugins, std::optional<Vector<WebCore::SupportedPluginIdentifier>>& supportedPluginIdentifiers) > { > if (refresh) > m_processPool->pluginInfoStore().refresh(); > >- supportedPluginNames = m_processPool->pluginInfoStore().supportedPluginNames(); >+ supportedPluginIdentifiers = m_processPool->pluginInfoStore().supportedPluginIdentifiers(); > > Vector<PluginModuleInfo> pluginModules = m_processPool->pluginInfoStore().plugins(); > for (size_t i = 0; i < pluginModules.size(); ++i) >diff --git a/Source/WebKit/UIProcess/WebProcessProxy.h b/Source/WebKit/UIProcess/WebProcessProxy.h >index 7d63dc5b20a7f62412b11bceaf65c944e8d00c4d..c46d2919ff285ec495e7e2ce5a12abd3b2805e6a 100644 >--- a/Source/WebKit/UIProcess/WebProcessProxy.h >+++ b/Source/WebKit/UIProcess/WebProcessProxy.h >@@ -267,7 +267,7 @@ private: > > // Plugins > #if ENABLE(NETSCAPE_PLUGIN_API) >- void getPlugins(bool refresh, Vector<WebCore::PluginInfo>& plugins, Vector<WebCore::PluginInfo>& applicationPlugins, std::optional<Vector<WebCore::SupportedPluginName>>&); >+ void getPlugins(bool refresh, Vector<WebCore::PluginInfo>& plugins, Vector<WebCore::PluginInfo>& applicationPlugins, std::optional<Vector<WebCore::SupportedPluginIdentifier>>&); > #endif // ENABLE(NETSCAPE_PLUGIN_API) > #if ENABLE(NETSCAPE_PLUGIN_API) > void getPluginProcessConnection(uint64_t pluginProcessToken, Messages::WebProcessProxy::GetPluginProcessConnection::DelayedReply&&); >diff --git a/Source/WebKit/UIProcess/WebProcessProxy.messages.in b/Source/WebKit/UIProcess/WebProcessProxy.messages.in >index 9e539f58bbb85829929da3a232e831346fd777c2..fc808af20ef8cde9c4fc60c734afe80db5d690f5 100644 >--- a/Source/WebKit/UIProcess/WebProcessProxy.messages.in >+++ b/Source/WebKit/UIProcess/WebProcessProxy.messages.in >@@ -33,7 +33,7 @@ messages -> WebProcessProxy LegacyReceiver { > > # Plugin messages. > #if ENABLE(NETSCAPE_PLUGIN_API) >- GetPlugins(bool refresh) -> (Vector<WebCore::PluginInfo> plugins, Vector<WebCore::PluginInfo> applicationPlugins, struct std::optional<Vector<WebCore::SupportedPluginName>> supportedPluginNames) >+ GetPlugins(bool refresh) -> (Vector<WebCore::PluginInfo> plugins, Vector<WebCore::PluginInfo> applicationPlugins, struct std::optional<Vector<WebCore::SupportedPluginIdentifier>> supportedPluginIdentifiers) > GetPluginProcessConnection(uint64_t pluginProcessToken) -> (IPC::Attachment connectionHandle, bool supportsAsynchronousInitialization) Delayed > #endif > GetNetworkProcessConnection() -> (IPC::Attachment connectionHandle) Delayed >diff --git a/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm b/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm >index c1ac4d58e4f7ccc4b24f6d1b9778827559825677..20e122a7073245cab8ed94fd94286cb9e5ae15f4 100644 >--- a/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm >+++ b/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm >@@ -651,6 +651,7 @@ PluginInfo PDFPlugin::pluginInfo() > info.name = builtInPDFPluginName(); > info.isApplicationPlugin = true; > info.clientLoadPolicy = PluginLoadClientPolicyUndefined; >+ info.bundleIdentifier = ASCIILiteral("com.apple.webkit.builtInPDFPlugin"); > > MimeClassInfo pdfMimeClassInfo; > pdfMimeClassInfo.type = "application/pdf"; >diff --git a/Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp b/Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp >index 4bd1db66ea53db909768d52e98de96816af9732a..50f9eaa97569be793bfb1d99c3e4001db4f57260 100644 >--- a/Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp >+++ b/Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp >@@ -97,29 +97,29 @@ void WebPluginInfoProvider::refreshPlugins() > #endif > } > >-Vector<PluginInfo> WebPluginInfoProvider::pluginInfo(Page& page, std::optional<Vector<SupportedPluginName>>& supportedPluginNames) >+Vector<PluginInfo> WebPluginInfoProvider::pluginInfo(Page& page, std::optional<Vector<SupportedPluginIdentifier>>& supportedPluginIdentifiers) > { > #if ENABLE(NETSCAPE_PLUGIN_API) > populatePluginCache(page); > >- if (m_cachedSupportedPluginNames) >- supportedPluginNames = *m_cachedSupportedPluginNames; >+ if (m_cachedSupportedPluginIdentifiers) >+ supportedPluginIdentifiers = *m_cachedSupportedPluginIdentifiers; > > return page.mainFrame().loader().subframeLoader().allowPlugins() ? m_cachedPlugins : m_cachedApplicationPlugins; > #else > UNUSED_PARAM(page); >- UNUSED_PARAM(supportedPluginNames); >+ UNUSED_PARAM(supportedPluginIdentifiers); > return { }; > #endif // ENABLE(NETSCAPE_PLUGIN_API) > } > > Vector<WebCore::PluginInfo> WebPluginInfoProvider::webVisiblePluginInfo(Page& page, const WebCore::URL& url) > { >- std::optional<Vector<WebCore::SupportedPluginName>> supportedPluginNames; >- auto plugins = pluginInfo(page, supportedPluginNames); >+ std::optional<Vector<WebCore::SupportedPluginIdentifier>> supportedPluginIdentifiers; >+ auto plugins = pluginInfo(page, supportedPluginIdentifiers); > > plugins.removeAllMatching([&] (auto& plugin) { >- return supportedPluginNames && !isSupportedPlugin(*supportedPluginNames, url, plugin.name); >+ return supportedPluginIdentifiers && !isSupportedPlugin(*supportedPluginIdentifiers, url, plugin.bundleIdentifier); > }); > > #if PLATFORM(MAC) >@@ -147,7 +147,7 @@ void WebPluginInfoProvider::populatePluginCache(const WebCore::Page& page) > HangDetectionDisabler hangDetectionDisabler; > > if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetPlugins(m_shouldRefreshPlugins), >- Messages::WebProcessProxy::GetPlugins::Reply(m_cachedPlugins, m_cachedApplicationPlugins, m_cachedSupportedPluginNames), 0, >+ Messages::WebProcessProxy::GetPlugins::Reply(m_cachedPlugins, m_cachedApplicationPlugins, m_cachedSupportedPluginIdentifiers), 0, > Seconds::infinity(), IPC::SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply)) > return; > >diff --git a/Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.h b/Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.h >index 2a1bdd08246921db7465f4dd08f2d8cdfcf1276d..1bbad5a79fb11ec68074947d007c3cd56e5819dd 100644 >--- a/Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.h >+++ b/Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.h >@@ -45,7 +45,7 @@ public: > private: > WebPluginInfoProvider(); > >- Vector<WebCore::PluginInfo> pluginInfo(WebCore::Page&, std::optional<Vector<WebCore::SupportedPluginName>>&) final; >+ Vector<WebCore::PluginInfo> pluginInfo(WebCore::Page&, std::optional<Vector<WebCore::SupportedPluginIdentifier>>&) final; > Vector<WebCore::PluginInfo> webVisiblePluginInfo(WebCore::Page&, const WebCore::URL&) final; > void refreshPlugins() override; > >@@ -68,7 +68,7 @@ private: > bool m_shouldRefreshPlugins { false }; > Vector<WebCore::PluginInfo> m_cachedPlugins; > Vector<WebCore::PluginInfo> m_cachedApplicationPlugins; >- std::optional<Vector<WebCore::SupportedPluginName>> m_cachedSupportedPluginNames; >+ std::optional<Vector<WebCore::SupportedPluginIdentifier>> m_cachedSupportedPluginIdentifiers; > #endif > }; > >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebPluginInfoProvider.h b/Source/WebKitLegacy/mac/WebCoreSupport/WebPluginInfoProvider.h >index 8132472b8b35b4e01ec2729c18b5e34a8bdb74af..d1ab551184c0a5f649940d8e927bd84e529c7ff0 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebPluginInfoProvider.h >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebPluginInfoProvider.h >@@ -34,7 +34,7 @@ public: > > private: > void refreshPlugins() override; >- Vector<WebCore::PluginInfo> pluginInfo(WebCore::Page&, std::optional<Vector<WebCore::SupportedPluginName>>&) final; >+ Vector<WebCore::PluginInfo> pluginInfo(WebCore::Page&, std::optional<Vector<WebCore::SupportedPluginIdentifier>>&) final; > Vector<WebCore::PluginInfo> webVisiblePluginInfo(WebCore::Page&, const WebCore::URL&) final; > > WebPluginInfoProvider(); >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebPluginInfoProvider.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebPluginInfoProvider.mm >index 2ede19ad889fe34b91750232017b5e4cb97ddc90..e34ec73e54fbd954168ffca552e4f36bc95f544b 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebPluginInfoProvider.mm >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebPluginInfoProvider.mm >@@ -55,7 +55,7 @@ void WebPluginInfoProvider::refreshPlugins() > [[WebPluginDatabase sharedDatabaseIfExists] refresh]; > } > >-Vector<WebCore::PluginInfo> WebPluginInfoProvider::pluginInfo(WebCore::Page& page, std::optional<Vector<SupportedPluginName>>&) >+Vector<WebCore::PluginInfo> WebPluginInfoProvider::pluginInfo(WebCore::Page& page, std::optional<Vector<SupportedPluginIdentifier>>&) > { > Vector<WebCore::PluginInfo> plugins; > >@@ -76,6 +76,6 @@ Vector<WebCore::PluginInfo> WebPluginInfoProvider::pluginInfo(WebCore::Page& pag > > Vector<WebCore::PluginInfo> WebPluginInfoProvider::webVisiblePluginInfo(WebCore::Page& page, const WebCore::URL&) > { >- std::optional<Vector<SupportedPluginName>> supportedPluginNames; >- return pluginInfo(page, supportedPluginNames); >+ std::optional<Vector<SupportedPluginIdentifier>> supportedPluginIdentifiers; >+ return pluginInfo(page, supportedPluginIdentifiers); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186578
:
342608
|
342696