Implement mechanism to detect (partially) hidden blocked plugins.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Jul 2013 23:56:23 +0000 (23:56 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Jul 2013 23:56:23 +0000 (23:56 +0000)
commit57b7655b49637555a7e4cef690a745070dc9d7dd
tree7767c638349b00f0245e04aa689680c3d2e6fc74
parent9770e4a68b2624d098583c192744b92b847c3f25
Implement mechanism to detect (partially) hidden blocked plugins.
https://bugs.webkit.org/show_bug.cgi?id=117998

Patch by Gordon Sheridan <gordon_sheridan@apple.com> on 2013-07-03
Reviewed by Dean Jackson.

Source/WebCore:

* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::replacementTextRect):
Added private method for calculating the size of the replacement text for blocked plugins.

(WebCore::RenderEmbeddedObject::isReplacementObscured):
Added public method to determine if the EMBED element used for a blocked plugin is inaccessible to the user.
* rendering/RenderEmbeddedObject.h:
Declare the two new methods mentioned above.

* WebCore.exp.in:
Export RenderEmbeddedObject::isReplacementObscured().

Source/WebKit2:

* Shared/Plugins/Netscape/PluginInformation.h:
* Shared/Plugins/Netscape/PluginInformation.cpp:
(WebKit::plugInInformationReplacementObscuredKey):
Add key for plugInInformation dictionaries.

(WebKit::createPluginInformationDictionary):
Add boolean parameter identifying whether the replacement for a blocked plugin is obscured, and add it to the dictionary.

* Shared/API/c/WKPluginInformation.h:
* Shared/API/c/WKPluginInformation.cpp:
(WKPluginInformationReplacementObscuredKey):
Provide the C API for the plugInInformationReplacementObscuredKey().

* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didBlockInsecurePluginVersion):
Add bool replacementObscured parameter to pass on argument to createPluginInformationDictionary().

* UIProcess/WebPageProxy.messages.in:
Add bool replacementObscured parameter to DidBlockInsecurePluginVersion() message.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
Invoke isReplacementObscured() method for blocked plugins.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@152382 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/rendering/RenderEmbeddedObject.cpp
Source/WebCore/rendering/RenderEmbeddedObject.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/c/WKPluginInformation.cpp
Source/WebKit2/Shared/API/c/WKPluginInformation.h
Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp
Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/WebProcess/WebPage/WebPage.cpp