Make PluginData cache its web visible plugins
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Apr 2018 17:45:24 +0000 (17:45 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Apr 2018 17:45:24 +0000 (17:45 +0000)
commit2410115d00dd487b96481e94ea4f66bf1d586d9c
tree9fdbc004a72e54f339a27e1590b09a4d8db2daaf
parent9230fbd4fa02bec929b79e379497f1f916ff3400
Make PluginData cache its web visible plugins
https://bugs.webkit.org/show_bug.cgi?id=184421

Reviewed by Chris Dumez.

Source/WebCore:

Buffer visible plugins until the page URL changes.
For that purpose, we now cache the visible plugins and the URL it was computed from in PluginData.

Update plugin info provider API to pass the URL used to check for plugin visibility.

No observable change of behavior.

* loader/EmptyClients.cpp:
* plugins/PluginData.cpp:
(WebCore::PluginData::webVisiblePlugins const):
(WebCore::PluginData::publiclyVisiblePlugins const):
(WebCore::PluginData::supportsMimeType const):
* plugins/PluginData.h:
* plugins/PluginInfoProvider.h:

Source/WebKit:

Rename methods.
Pass an URL instead of relying on Page URL as the page URL
might not always be the URL we want to check against plugins.
In particular when navigation is on-going, we want to check the
plugins against the being navigated URL.

* WebProcess/Plugins/WebPluginInfoProvider.cpp:
(WebKit::WebPluginInfoProvider::pluginInfo):
(WebKit::WebPluginInfoProvider::webVisiblePluginInfo):
* WebProcess/Plugins/WebPluginInfoProvider.h:

Source/WebKitLegacy/mac:

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

Source/WebKitLegacy/win:

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@230843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 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/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
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebCoreSupport/WebPluginInfoProvider.cpp
Source/WebKitLegacy/win/WebCoreSupport/WebPluginInfoProvider.h