Commit 98e1cb89 authored by jberlin@webkit.org's avatar jberlin@webkit.org

Remove WKPageGetPlugInInformation - it is not used anymore

https://bugs.webkit.org/show_bug.cgi?id=119047

Rubber-stamped by Alexey Proskuryakov.

Revert r152328, which added a key used only in the callback info for
WKPageGetPlugInInformation.

Source/WebCore:

* WebCore.exp.in:

Source/WebKit2:

* Shared/API/c/WKPluginInformation.cpp:
* Shared/API/c/WKPluginInformation.h:
* Shared/Plugins/Netscape/PluginInformation.cpp:
* Shared/Plugins/Netscape/PluginInformation.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::containsPlugInCallback):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::containsPluginViewsWithPluginProcessToken):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8a1ffaf6
2013-07-24 Jessie Berlin <jberlin@apple.com>
Remove WKPageGetPlugInInformation - it is not used anymore
https://bugs.webkit.org/show_bug.cgi?id=119047
Rubber-stamped by Alexey Proskuryakov.
Revert r152328, which added a key used only in the callback info for
WKPageGetPlugInInformation.
* WebCore.exp.in:
2013-07-24 Robert Hogan <robert@webkit.org>
Border drawing incorrect when using both border-collapse: collapse and overflow: hidden on a table
......@@ -852,7 +852,6 @@ __ZN7WebCore4Node14setTextContentERKN3WTF6StringERi
__ZN7WebCore4Node17stopIgnoringLeaksEv
__ZN7WebCore4Node18startIgnoringLeaksEv
__ZN7WebCore4Node19setNeedsStyleRecalcENS_15StyleChangeTypeE
__ZN7WebCore4Node20getElementsByTagNameERKN3WTF12AtomicStringE
__ZN7WebCore4Page10findStringERKN3WTF6StringEj
__ZN7WebCore4Page11PageClientsC1Ev
__ZN7WebCore4Page11PageClientsD1Ev
......
2013-07-24 Jessie Berlin <jberlin@apple.com>
Remove WKPageGetPlugInInformation - it is not used anymore
https://bugs.webkit.org/show_bug.cgi?id=119047
Rubber-stamped by Alexey Proskuryakov.
Revert r152328, which added a key used only in the callback info for
WKPageGetPlugInInformation.
* Shared/API/c/WKPluginInformation.cpp:
* Shared/API/c/WKPluginInformation.h:
* Shared/Plugins/Netscape/PluginInformation.cpp:
* Shared/Plugins/Netscape/PluginInformation.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::containsPlugInCallback):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::containsPluginViewsWithPluginProcessToken):
2013-07-24 Anton Obzhirov <a.obzhirov@samsung.com>
[GTK] TestInspectorServer unit test is timing out
......
......@@ -110,12 +110,6 @@ WKStringRef WKPluginInformationPluginURLKey()
return toAPI(key);
}
WKStringRef WKPlugInInformationPageContainsNonPlayingInstanceOfPlugInKey()
{
static WebString* key = WebString::create(plugInInformationPageContainsNonPlayingInstanceOfPlugInKey()).leakRef();
return toAPI(key);
}
WKStringRef WKPlugInInformationReplacementObscuredKey()
{
static WebString* key = WebString::create(plugInInformationReplacementObscuredKey()).leakRef();
......
......@@ -76,9 +76,6 @@ WK_EXPORT WKStringRef WKPluginInformationPluginspageAttributeURLKey();
/* Value type: WKURLRef */
WK_EXPORT WKStringRef WKPluginInformationPluginURLKey();
/* Value type: WKBooleanRef */
WK_EXPORT WKStringRef WKPlugInInformationPageContainsNonPlayingInstanceOfPlugInKey();
/* Value type: WKBooleanRef */
WK_EXPORT WKStringRef WKPlugInInformationReplacementObscuredKey();
......
......@@ -101,11 +101,6 @@ String pluginInformationPluginURLKey()
return ASCIILiteral("PluginInformationPluginURL");
}
String plugInInformationPageContainsNonPlayingInstanceOfPlugInKey()
{
return ASCIILiteral("PlugInInformationPageContainsNonPlayingInstanceOfPlugIn");
}
String plugInInformationReplacementObscuredKey()
{
return ASCIILiteral("PlugInInformationReplacementObscured");
......@@ -130,16 +125,6 @@ PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const PluginMo
return ImmutableDictionary::adopt(map);
}
PassRefPtr<ImmutableDictionary> createPlugInInformationDictionary(const PluginModuleInfo& plugInModuleInfo, bool pageContainsNonPlayingInstanceOfPlugIn)
{
ImmutableDictionary::MapType map;
getPluginModuleInformation(plugInModuleInfo, map);
map.set(plugInInformationPageContainsNonPlayingInstanceOfPlugInKey(), WebBoolean::create(pageContainsNonPlayingInstanceOfPlugIn));
return ImmutableDictionary::adopt(map);
}
PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const PluginModuleInfo& plugin, const String& frameURLString, const String& mimeType, const String& pageURLString, const String& pluginspageAttributeURLString, const String& pluginURLString, bool replacementObscured)
{
ImmutableDictionary::MapType map;
......
......@@ -49,13 +49,11 @@ String pluginInformationMIMETypeKey();
String pluginInformationPageURLKey();
String pluginInformationPluginspageAttributeURLKey();
String pluginInformationPluginURLKey();
String plugInInformationPageContainsNonPlayingInstanceOfPlugInKey();
String plugInInformationReplacementObscuredKey();
PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const PluginModuleInfo&);
PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const PluginModuleInfo&, const String& frameURLString, const String& mimeType, const String& pageURLString, const String& pluginspageAttributeURLString, const String& pluginURLString, bool replacementObscured = false);
PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const String& mimeType, const String& frameURLString, const String& pageURLString);
PassRefPtr<ImmutableDictionary> createPlugInInformationDictionary(const PluginModuleInfo&, bool pageContainsNonPlayingInstanceOfPlugIn);
void getPluginModuleInformation(const PluginModuleInfo&, ImmutableDictionary::MapType&);
void getPlatformPluginModuleInformation(const PluginModuleInfo&, ImmutableDictionary::MapType&);
......
......@@ -539,7 +539,7 @@ public:
ColorSpaceData colorSpace();
void getPlugInInformation(pid_t plugInProcessID, PassRefPtr<DictionaryCallback>);
void containsPlugInCallback(bool containsPlugIn, const Vector<String>& nonPlayingPlugInInstanceMimeTypes, uint64_t plugInToken, uint64_t callbackID);
void containsPlugInCallback(bool containsPlugIn, uint64_t plugInToken, uint64_t callbackID);
#endif
void pageScaleFactorDidChange(double);
......
......@@ -263,7 +263,7 @@ messages -> WebPageProxy {
# Plug-in complex text input support messages
PluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus)
SetPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, uint64_t complexTextInputState)
ContainsPlugInCallback(bool containsPlugIn, Vector<String> nonPlayingPlugInInstanceMimeTypes, uint64_t plugInProcessToken, uint64_t callbackID)
ContainsPlugInCallback(bool containsPlugIn, uint64_t plugInProcessToken, uint64_t callbackID)
# Speech messages
GetIsSpeaking() -> (bool isSpeaking)
......
......@@ -40,7 +40,6 @@
#import "PluginProcessProxy.h"
#import "StringUtilities.h"
#import "TextChecker.h"
#import "WebContext.h"
#import "WebPageMessages.h"
#import "WebProcessProxy.h"
#import <WebCore/DictationAlternative.h>
......@@ -483,7 +482,7 @@ void WebPageProxy::getPlugInInformation(pid_t plugInProcessID, PassRefPtr<Dictio
m_process->send(Messages::WebPage::ContainsPluginViewsWithPluginProcessToken(plugInProcessProxy->pluginProcessToken(), callbackID), m_pageID);
}
void WebPageProxy::containsPlugInCallback(bool containsPlugIn, const Vector<String>& nonPlayingPlugInInstanceMimeTypes, uint64_t plugInToken, uint64_t callbackID)
void WebPageProxy::containsPlugInCallback(bool containsPlugIn, uint64_t plugInToken, uint64_t callbackID)
{
RefPtr<DictionaryCallback> callback = m_plugInInformationCallbacks.take(callbackID);
if (!callback) {
......@@ -499,19 +498,9 @@ void WebPageProxy::containsPlugInCallback(bool containsPlugIn, const Vector<Stri
PluginProcessProxy* plugInProcessProxy = PluginProcessManager::shared().findPlugInProcessByToken(plugInToken);
ASSERT(plugInProcessProxy);
String plugInBundleIdentifier = plugInProcessProxy->pluginProcessAttributes().moduleInfo.bundleIdentifier;
bool containsNonPlayingInstanceOfPlugIn = false;
for (const String& plugInMimeType: nonPlayingPlugInInstanceMimeTypes) {
String mimeType = plugInMimeType;
PluginModuleInfo plugInInfo = m_process->context()->pluginInfoStore().findPlugin(mimeType, KURL());
if (plugInInfo.bundleIdentifier == plugInBundleIdentifier) {
containsNonPlayingInstanceOfPlugIn = true;
break;
}
}
RefPtr<ImmutableDictionary> plugInInformation = createPlugInInformationDictionary(plugInProcessProxy->pluginProcessAttributes().moduleInfo, containsNonPlayingInstanceOfPlugIn);
ImmutableDictionary::MapType map;
getPluginModuleInformation(plugInProcessProxy->pluginProcessAttributes().moduleInfo, map);
RefPtr<ImmutableDictionary> plugInInformation = ImmutableDictionary::adopt(map);
callback->performCallbackWithReturnValue(plugInInformation.get());
}
......
......@@ -52,11 +52,9 @@
#import <WebCore/FrameLoader.h>
#import <WebCore/FrameView.h>
#import <WebCore/HTMLConverter.h>
#import <WebCore/HTMLPlugInImageElement.h>
#import <WebCore/HitTestResult.h>
#import <WebCore/KeyboardEvent.h>
#import <WebCore/MIMETypeRegistry.h>
#import <WebCore/NodeList.h>
#import <WebCore/NetworkingContext.h>
#import <WebCore/Page.h>
#import <WebCore/PlatformKeyboardEvent.h>
......@@ -974,31 +972,6 @@ void WebPage::drawPagesToPDFFromPDFDocument(CGContextRef context, PDFDocument *p
}
}
static void addPlugInMimeTypesFromNodeListForNonPlayingPlugIns(PassRefPtr<NodeList> plugIns, HashSet<String>& mimeTypes)
{
if (!plugIns)
return;
for (unsigned i = 0, length = plugIns->length(); i < length; i++) {
Node* node = plugIns->item(i);
if (!node->isPluginElement())
continue;
HTMLPlugInElement* plugInElement = toHTMLPlugInElement(node);
ASSERT(!plugInElement->hasTagName(WebCore::HTMLNames::appletTag));
if (plugInElement->displayState() == HTMLPlugInElement::DisplayState::Playing)
continue;
if (!plugInElement->isPlugInImageElement())
continue;
HTMLPlugInImageElement* plugInImageElement = toHTMLPlugInImageElement(node);
mimeTypes.add(plugInImageElement->loadedMimeType());
}
}
void WebPage::containsPluginViewsWithPluginProcessToken(uint64_t plugInProcessToken, uint64_t callbackID)
{
bool containsPlugIn = false;
......@@ -1009,22 +982,7 @@ void WebPage::containsPluginViewsWithPluginProcessToken(uint64_t plugInProcessTo
}
}
HashSet<String> nonPlayingPlugInMimeTypes;
for (Frame* frame = corePage()->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
if (!frame->loader()->subframeLoader()->containsPlugins())
continue;
if (!frame->document())
continue;
addPlugInMimeTypesFromNodeListForNonPlayingPlugIns(frame->document()->getElementsByTagName(WebCore::HTMLNames::embedTag.localName()), nonPlayingPlugInMimeTypes);
addPlugInMimeTypesFromNodeListForNonPlayingPlugIns(frame->document()->getElementsByTagName(WebCore::HTMLNames::objectTag.localName()), nonPlayingPlugInMimeTypes);
}
Vector<String> nonPlayingPlugInMimeTypesVector;
copyToVector(nonPlayingPlugInMimeTypes, nonPlayingPlugInMimeTypesVector);
send(Messages::WebPageProxy::ContainsPlugInCallback(containsPlugIn, nonPlayingPlugInMimeTypesVector, plugInProcessToken, callbackID));
send(Messages::WebPageProxy::ContainsPlugInCallback(containsPlugIn, plugInProcessToken, callbackID));
}
} // namespace WebKit
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment