WebKit1: Add a way to blacklist specific plug-ins/plug-in versions
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 May 2012 22:45:41 +0000 (22:45 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 May 2012 22:45:41 +0000 (22:45 +0000)
commit54b014aef54694fbdf123b413f1d1cca615bbfee
treef72f4df1c547da7862f136cdf9e79ab315448a5c
parentb7ca6111b632b26b2f42348e29f3c20d4f4471f6
WebKit1: Add a way to blacklist specific plug-ins/plug-in versions
https://bugs.webkit.org/show_bug.cgi?id=86150
<rdar://problem/9551196>

Reviewed by Sam Weinig.

Source/WebCore:

* English.lproj/Localizable.strings:
Update.

* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadPlugin):
It is possible that the client has already set the unavailability reason so don't try to set it twice.

* platform/LocalizedStrings.cpp:
(WebCore::insecurePluginVersionText):
* platform/LocalizedStrings.h:
Add insecure plug-in version text.

* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::unavailablePluginReplacementText):
* rendering/RenderEmbeddedObject.h:
Add InsecurePluginVersion unavailability reason.

Source/WebKit/mac:

* Misc/WebKitErrors.h:
Add WebKitErrorInsecurePlugInVersion enum.

* Plugins/WebBasePluginPackage.h:
* Plugins/WebBasePluginPackage.mm:
(-[WebBasePluginPackage bundleIdentifier]):
(-[WebBasePluginPackage bundleVersion]):
Add bundleIdentifier and bundleVersion getters.

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::createPlugin):
Check if the plug-in is blocked. If it is, set the unavailability reason and the error code.

WebKitLibraries:

Add WKShouldBlockPlugin.

* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceSnowLeopard.a:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@116695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/English.lproj/Localizable.strings
Source/WebCore/loader/SubframeLoader.cpp
Source/WebCore/platform/LocalizedStrings.cpp
Source/WebCore/platform/LocalizedStrings.h
Source/WebCore/rendering/RenderEmbeddedObject.cpp
Source/WebCore/rendering/RenderEmbeddedObject.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Misc/WebKitErrors.h
Source/WebKit/mac/Plugins/WebBasePluginPackage.h
Source/WebKit/mac/Plugins/WebBasePluginPackage.mm
Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h
WebKitLibraries/libWebKitSystemInterfaceLion.a
WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a