REGRESSION (r230843): Flash doesn't work; Produces blue box on page
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jul 2018 05:50:17 +0000 (05:50 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jul 2018 05:50:17 +0000 (05:50 +0000)
commit9c1192232ae987c7724944ad976aaf709bb6658f
treea018793752d3431430dc19cb47c16c21556ba99c
parent0c75570e883bfc5f3f608e9b1a91ccdf21ef5f42
REGRESSION (r230843): Flash doesn't work; Produces blue box on page
https://bugs.webkit.org/show_bug.cgi?id=187346
<rdar://problem/41773974>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Introduce clearPagesPluginData used by WebProcess when a plugin policy changes.
Add a new internals API to get the plugin count as navigator.plugin is filtering plugins.

Test: http/tests/plugins/plugin-allow-then-reload.html

* plugins/PluginData.h:
* plugins/PluginInfoProvider.cpp:
(WebCore::PluginInfoProvider::clearPagesPluginData):
* plugins/PluginInfoProvider.h:
* testing/Internals.cpp:
(WebCore::Internals::pluginCount):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Reset page plugins when the load client policies are updated.
This will ensure that pages will rebuild their plugin lists based on the new policies.

* WebProcess/Plugins/WebPluginInfoProvider.cpp:
(WebKit::WebPluginInfoProvider::setPluginLoadClientPolicy):
(WebKit::WebPluginInfoProvider::clearPluginClientPolicies):

Tools:

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::setBlockAllPlugins):
When not blocked, set the load policy to allow once.
* WebKitTestRunner/TestController.h:

LayoutTests:

Skip new test on WK1 since it does not have the ability to block plugins.

* http/tests/plugins/plugin-allow-then-reload-expected.txt: Added.
* http/tests/plugins/plugin-allow-then-reload.html: Added.
* platform/mac-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/plugins/plugin-allow-then-reload-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/plugins/plugin-allow-then-reload.html [new file with mode: 0644]
LayoutTests/platform/mac-wk1/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/plugins/PluginData.h
Source/WebCore/plugins/PluginInfoProvider.cpp
Source/WebCore/plugins/PluginInfoProvider.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp
Tools/ChangeLog
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/TestController.h