<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[152332] branches/safari-537-branch/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/152332">152332</a></dd>
<dt>Author</dt> <dd>lforschler@apple.com</dd>
<dt>Date</dt> <dd>2013-07-02 17:39:10 -0700 (Tue, 02 Jul 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/152328">r152328</a>.  &lt;rdar://problem/14320278&gt;</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari537branchSourceWebCoreChangeLog">branches/safari-537-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari537branchSourceWebCoreWebCoreexpin">branches/safari-537-branch/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#branchessafari537branchSourceWebKit2ChangeLog">branches/safari-537-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari537branchSourceWebKit2SharedAPIcWKPluginInformationcpp">branches/safari-537-branch/Source/WebKit2/Shared/API/c/WKPluginInformation.cpp</a></li>
<li><a href="#branchessafari537branchSourceWebKit2SharedAPIcWKPluginInformationh">branches/safari-537-branch/Source/WebKit2/Shared/API/c/WKPluginInformation.h</a></li>
<li><a href="#branchessafari537branchSourceWebKit2SharedPluginsNetscapePluginInformationcpp">branches/safari-537-branch/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp</a></li>
<li><a href="#branchessafari537branchSourceWebKit2SharedPluginsNetscapePluginInformationh">branches/safari-537-branch/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.h</a></li>
<li><a href="#branchessafari537branchSourceWebKit2UIProcessWebPageProxyh">branches/safari-537-branch/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#branchessafari537branchSourceWebKit2UIProcessWebPageProxymessagesin">branches/safari-537-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#branchessafari537branchSourceWebKit2UIProcessmacWebPageProxyMacmm">branches/safari-537-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm</a></li>
<li><a href="#branchessafari537branchSourceWebKit2WebProcessWebPagemacWebPageMacmm">branches/safari-537-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari537branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (152331 => 152332)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537-branch/Source/WebCore/ChangeLog        2013-07-03 00:32:26 UTC (rev 152331)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog        2013-07-03 00:39:10 UTC (rev 152332)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2013-07-02  Lucas Forschler  &lt;lforschler@apple.com&gt;
+
+        Merge r152328
+
+    2013-07-02  Jessie Berlin  &lt;jberlin@apple.com&gt;
+
+            The callback for WKPageGetPlugInInformation needs info about whether or not there are any
+            non-playing instances of the plug-in on the page
+            https://bugs.webkit.org/show_bug.cgi?id=118330
+
+            Reviewed by Anders Carlsson.
+
+            * WebCore.exp.in:
+            Expose a symbol so it can be used in WebKit2.
+
</ins><span class="cx"> 2013-07-01  Lucas Forschler  &lt;lforschler@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r152265
</span></span></pre></div>
<a id="branchessafari537branchSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: branches/safari-537-branch/Source/WebCore/WebCore.exp.in (152331 => 152332)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537-branch/Source/WebCore/WebCore.exp.in        2013-07-03 00:32:26 UTC (rev 152331)
+++ branches/safari-537-branch/Source/WebCore/WebCore.exp.in        2013-07-03 00:39:10 UTC (rev 152332)
</span><span class="lines">@@ -846,6 +846,7 @@
</span><span class="cx"> __ZN7WebCore4Node17stopIgnoringLeaksEv
</span><span class="cx"> __ZN7WebCore4Node18startIgnoringLeaksEv
</span><span class="cx"> __ZN7WebCore4Node19setNeedsStyleRecalcENS_15StyleChangeTypeE
</span><ins>+__ZN7WebCore4Node20getElementsByTagNameERKN3WTF12AtomicStringE
</ins><span class="cx"> __ZN7WebCore4Page10findStringERKN3WTF6StringEj
</span><span class="cx"> __ZN7WebCore4Page11PageClientsC1Ev
</span><span class="cx"> __ZN7WebCore4Page11PageClientsD1Ev
</span></span></pre></div>
<a id="branchessafari537branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-537-branch/Source/WebKit2/ChangeLog (152331 => 152332)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537-branch/Source/WebKit2/ChangeLog        2013-07-03 00:32:26 UTC (rev 152331)
+++ branches/safari-537-branch/Source/WebKit2/ChangeLog        2013-07-03 00:39:10 UTC (rev 152332)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2013-07-02  Lucas Forschler  &lt;lforschler@apple.com&gt;
+
+        Merge r152328
+
+    2013-07-02  Jessie Berlin  &lt;jberlin@apple.com&gt;
+
+            The callback for WKPageGetPlugInInformation needs info about whether or not there are any
+            non-playing instances of the plug-in on the page
+            https://bugs.webkit.org/show_bug.cgi?id=118330
+
+            Reviewed by Anders Carlsson.
+
+            Add another key value pair to the dictionary passed to the callback.
+
+            * Shared/API/c/WKPluginInformation.cpp:
+            (WKPlugInInformationPageContainsNonPlayingInstanceOfPlugInKey):
+            * Shared/API/c/WKPluginInformation.h:
+
+            * Shared/Plugins/Netscape/PluginInformation.cpp:
+            (WebKit::plugInInformationPageContainsNonPlayingInstanceOfPlugInKey):
+            (WebKit::createPlugInInformationDictionary):
+            Add the information about whether or not the page contains a non-playing instance of that
+            plug-in to the plug-in information dictionary.
+            * Shared/Plugins/Netscape/PluginInformation.h:
+
+            * UIProcess/WebPageProxy.h:
+            * UIProcess/WebPageProxy.messages.in:
+            * UIProcess/mac/WebPageProxyMac.mm:
+            (WebKit::WebPageProxy::containsPlugInCallback):
+            Check if any of the MIME types of the plug-in instances that are present on the page but are
+            not playing match the instance of plug-in being searched for.
+            * WebProcess/WebPage/mac/WebPageMac.mm:
+            (WebKit::addPlugInMimeTypesFromNodeListForNonPlayingPlugIns):
+            Based roughly off of addPlugInsFromNodeListMatchingPlugInOrigin in
+            HTMLPlugInImageElement.cpp.
+            (WebKit::WebPage::containsPluginViewsWithPluginProcessToken):
+            Based roughly off of HTMLPlugInImageElement::restartSimilarPlugIns.
+
</ins><span class="cx"> 2013-07-01  Lucas Forschler  &lt;lforschler@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r152273
</span></span></pre></div>
<a id="branchessafari537branchSourceWebKit2SharedAPIcWKPluginInformationcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537-branch/Source/WebKit2/Shared/API/c/WKPluginInformation.cpp (152331 => 152332)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537-branch/Source/WebKit2/Shared/API/c/WKPluginInformation.cpp        2013-07-03 00:32:26 UTC (rev 152331)
+++ branches/safari-537-branch/Source/WebKit2/Shared/API/c/WKPluginInformation.cpp        2013-07-03 00:39:10 UTC (rev 152332)
</span><span class="lines">@@ -109,3 +109,9 @@
</span><span class="cx">     static WebString* key = WebString::create(pluginInformationPluginURLKey()).leakRef();
</span><span class="cx">     return toAPI(key);
</span><span class="cx"> }
</span><ins>+
+WKStringRef WKPlugInInformationPageContainsNonPlayingInstanceOfPlugInKey()
+{
+    static WebString* key = WebString::create(plugInInformationPageContainsNonPlayingInstanceOfPlugInKey()).leakRef();
+    return toAPI(key);
+}
</ins></span></pre></div>
<a id="branchessafari537branchSourceWebKit2SharedAPIcWKPluginInformationh"></a>
<div class="modfile"><h4>Modified: branches/safari-537-branch/Source/WebKit2/Shared/API/c/WKPluginInformation.h (152331 => 152332)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537-branch/Source/WebKit2/Shared/API/c/WKPluginInformation.h        2013-07-03 00:32:26 UTC (rev 152331)
+++ branches/safari-537-branch/Source/WebKit2/Shared/API/c/WKPluginInformation.h        2013-07-03 00:39:10 UTC (rev 152332)
</span><span class="lines">@@ -76,6 +76,9 @@
</span><span class="cx"> /* Value type: WKURLRef */
</span><span class="cx"> WK_EXPORT WKStringRef WKPluginInformationPluginURLKey();
</span><span class="cx"> 
</span><ins>+/* Value type: WKBooleanRef */
+WK_EXPORT WKStringRef WKPlugInInformationPageContainsNonPlayingInstanceOfPlugInKey();
+
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="branchessafari537branchSourceWebKit2SharedPluginsNetscapePluginInformationcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537-branch/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp (152331 => 152332)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537-branch/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp        2013-07-03 00:32:26 UTC (rev 152331)
+++ branches/safari-537-branch/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp        2013-07-03 00:39:10 UTC (rev 152332)
</span><span class="lines">@@ -101,6 +101,11 @@
</span><span class="cx">     return ASCIILiteral(&quot;PluginInformationPluginURL&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+String plugInInformationPageContainsNonPlayingInstanceOfPlugInKey()
+{
+    return ASCIILiteral(&quot;PlugInInformationPageContainsNonPlayingInstanceOfPlugIn&quot;);
+}
+
</ins><span class="cx"> void getPluginModuleInformation(const PluginModuleInfo&amp; plugin, ImmutableDictionary::MapType&amp; map)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="lines">@@ -120,6 +125,16 @@
</span><span class="cx">     return ImmutableDictionary::adopt(map);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+PassRefPtr&lt;ImmutableDictionary&gt; createPlugInInformationDictionary(const PluginModuleInfo&amp; plugInModuleInfo, bool pageContainsNonPlayingInstanceOfPlugIn)
+{
+    ImmutableDictionary::MapType map;
+    getPluginModuleInformation(plugInModuleInfo, map);
+
+    map.set(plugInInformationPageContainsNonPlayingInstanceOfPlugInKey(), WebBoolean::create(pageContainsNonPlayingInstanceOfPlugIn));
+
+    return ImmutableDictionary::adopt(map);
+}
+
</ins><span class="cx"> PassRefPtr&lt;ImmutableDictionary&gt; createPluginInformationDictionary(const PluginModuleInfo&amp; plugin, const String&amp; frameURLString, const String&amp; mimeType, const String&amp; pageURLString, const String&amp; pluginspageAttributeURLString, const String&amp; pluginURLString)
</span><span class="cx"> {
</span><span class="cx">     ImmutableDictionary::MapType map;
</span></span></pre></div>
<a id="branchessafari537branchSourceWebKit2SharedPluginsNetscapePluginInformationh"></a>
<div class="modfile"><h4>Modified: branches/safari-537-branch/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.h (152331 => 152332)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537-branch/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.h        2013-07-03 00:32:26 UTC (rev 152331)
+++ branches/safari-537-branch/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.h        2013-07-03 00:39:10 UTC (rev 152332)
</span><span class="lines">@@ -49,12 +49,13 @@
</span><span class="cx"> String pluginInformationPageURLKey();
</span><span class="cx"> String pluginInformationPluginspageAttributeURLKey();
</span><span class="cx"> String pluginInformationPluginURLKey();
</span><ins>+String plugInInformationPageContainsNonPlayingInstanceOfPlugInKey();
</ins><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;ImmutableDictionary&gt; createPluginInformationDictionary(const PluginModuleInfo&amp;);
</span><span class="cx"> PassRefPtr&lt;ImmutableDictionary&gt; createPluginInformationDictionary(const PluginModuleInfo&amp;, const String&amp; frameURLString, const String&amp; mimeType, const String&amp; pageURLString, const String&amp; pluginspageAttributeURLString, const String&amp; pluginURLString);
</span><span class="cx"> PassRefPtr&lt;ImmutableDictionary&gt; createPluginInformationDictionary(const String&amp; mimeType, const String&amp; frameURLString, const String&amp; pageURLString);
</span><ins>+PassRefPtr&lt;ImmutableDictionary&gt; createPlugInInformationDictionary(const PluginModuleInfo&amp;, bool pageContainsNonPlayingInstanceOfPlugIn);
</ins><span class="cx"> 
</span><del>-
</del><span class="cx"> void getPluginModuleInformation(const PluginModuleInfo&amp;, ImmutableDictionary::MapType&amp;);
</span><span class="cx"> void getPlatformPluginModuleInformation(const PluginModuleInfo&amp;, ImmutableDictionary::MapType&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari537branchSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: branches/safari-537-branch/Source/WebKit2/UIProcess/WebPageProxy.h (152331 => 152332)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2013-07-03 00:32:26 UTC (rev 152331)
+++ branches/safari-537-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2013-07-03 00:39:10 UTC (rev 152332)
</span><span class="lines">@@ -539,7 +539,7 @@
</span><span class="cx">     ColorSpaceData colorSpace();
</span><span class="cx"> 
</span><span class="cx">     void getPlugInInformation(pid_t plugInProcessID, PassRefPtr&lt;DictionaryCallback&gt;);
</span><del>-    void containsPlugInCallback(bool containsPlugIn, uint64_t plugInToken, uint64_t callbackID);
</del><ins>+    void containsPlugInCallback(bool containsPlugIn, const Vector&lt;String&gt;&amp; nonPlayingPlugInInstanceMimeTypes, uint64_t plugInToken, uint64_t callbackID);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void pageScaleFactorDidChange(double);
</span></span></pre></div>
<a id="branchessafari537branchSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: branches/safari-537-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in (152331 => 152332)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2013-07-03 00:32:26 UTC (rev 152331)
+++ branches/safari-537-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2013-07-03 00:39:10 UTC (rev 152332)
</span><span class="lines">@@ -264,7 +264,7 @@
</span><span class="cx">     # Plug-in complex text input support messages
</span><span class="cx">     PluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus)
</span><span class="cx">     SetPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, uint64_t complexTextInputState)
</span><del>-    ContainsPlugInCallback(bool containsPlugIn, uint64_t plugInProcessToken, uint64_t callbackID)
</del><ins>+    ContainsPlugInCallback(bool containsPlugIn, Vector&lt;String&gt; nonPlayingPlugInInstanceMimeTypes, uint64_t plugInProcessToken, uint64_t callbackID)
</ins><span class="cx"> 
</span><span class="cx">     # Speech messages
</span><span class="cx">     GetIsSpeaking() -&gt; (bool isSpeaking)
</span></span></pre></div>
<a id="branchessafari537branchSourceWebKit2UIProcessmacWebPageProxyMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-537-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm (152331 => 152332)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2013-07-03 00:32:26 UTC (rev 152331)
+++ branches/safari-537-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2013-07-03 00:39:10 UTC (rev 152332)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> #import &quot;PluginProcessProxy.h&quot;
</span><span class="cx"> #import &quot;StringUtilities.h&quot;
</span><span class="cx"> #import &quot;TextChecker.h&quot;
</span><ins>+#import &quot;WebContext.h&quot;
</ins><span class="cx"> #import &quot;WebPageMessages.h&quot;
</span><span class="cx"> #import &quot;WebProcessProxy.h&quot;
</span><span class="cx"> #import &lt;WebCore/DictationAlternative.h&gt;
</span><span class="lines">@@ -480,7 +481,7 @@
</span><span class="cx">     m_process-&gt;send(Messages::WebPage::ContainsPluginViewsWithPluginProcessToken(plugInProcessProxy-&gt;pluginProcessToken(), callbackID), m_pageID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::containsPlugInCallback(bool containsPlugIn, uint64_t plugInToken, uint64_t callbackID)
</del><ins>+void WebPageProxy::containsPlugInCallback(bool containsPlugIn, const Vector&lt;String&gt;&amp; nonPlayingPlugInInstanceMimeTypes, uint64_t plugInToken, uint64_t callbackID)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr&lt;DictionaryCallback&gt; callback = m_plugInInformationCallbacks.take(callbackID);
</span><span class="cx">     if (!callback) {
</span><span class="lines">@@ -496,10 +497,20 @@
</span><span class="cx">     PluginProcessProxy* plugInProcessProxy = PluginProcessManager::shared().findPlugInProcessByToken(plugInToken);
</span><span class="cx">     ASSERT(plugInProcessProxy);
</span><span class="cx"> 
</span><del>-    ImmutableDictionary::MapType map;
-    getPluginModuleInformation(plugInProcessProxy-&gt;pluginProcessAttributes().moduleInfo, map);
-    RefPtr&lt;ImmutableDictionary&gt; plugInInformation = ImmutableDictionary::adopt(map);
</del><ins>+    String plugInBundleIdentifier = plugInProcessProxy-&gt;pluginProcessAttributes().moduleInfo.bundleIdentifier;
+    bool containsNonPlayingInstanceOfPlugIn = false;
</ins><span class="cx"> 
</span><ins>+    for (const String&amp; plugInMimeType: nonPlayingPlugInInstanceMimeTypes) {
+        String mimeType = plugInMimeType;
+        PluginModuleInfo plugInInfo = m_process-&gt;context()-&gt;pluginInfoStore().findPlugin(mimeType, KURL());
+        if (plugInInfo.bundleIdentifier == plugInBundleIdentifier) {
+            containsNonPlayingInstanceOfPlugIn = true;
+            break;
+        }
+    }
+
+    RefPtr&lt;ImmutableDictionary&gt; plugInInformation = createPlugInInformationDictionary(plugInProcessProxy-&gt;pluginProcessAttributes().moduleInfo, containsNonPlayingInstanceOfPlugIn);
+
</ins><span class="cx">     callback-&gt;performCallbackWithReturnValue(plugInInformation.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari537branchSourceWebKit2WebProcessWebPagemacWebPageMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-537-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (152331 => 152332)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2013-07-03 00:32:26 UTC (rev 152331)
+++ branches/safari-537-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2013-07-03 00:39:10 UTC (rev 152332)
</span><span class="lines">@@ -52,9 +52,11 @@
</span><span class="cx"> #import &lt;WebCore/FrameLoader.h&gt;
</span><span class="cx"> #import &lt;WebCore/FrameView.h&gt;
</span><span class="cx"> #import &lt;WebCore/HTMLConverter.h&gt;
</span><ins>+#import &lt;WebCore/HTMLPlugInImageElement.h&gt;
</ins><span class="cx"> #import &lt;WebCore/HitTestResult.h&gt;
</span><span class="cx"> #import &lt;WebCore/KeyboardEvent.h&gt;
</span><span class="cx"> #import &lt;WebCore/MIMETypeRegistry.h&gt;
</span><ins>+#import &lt;WebCore/NodeList.h&gt;
</ins><span class="cx"> #import &lt;WebCore/NetworkingContext.h&gt;
</span><span class="cx"> #import &lt;WebCore/Page.h&gt;
</span><span class="cx"> #import &lt;WebCore/PlatformKeyboardEvent.h&gt;
</span><span class="lines">@@ -980,6 +982,31 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static void addPlugInMimeTypesFromNodeListForNonPlayingPlugIns(PassRefPtr&lt;NodeList&gt; plugIns, HashSet&lt;String&gt;&amp; mimeTypes)
+{
+    if (!plugIns)
+        return;
+
+    for (unsigned i = 0, length = plugIns-&gt;length(); i &lt; length; i++) {
+        Node* node = plugIns-&gt;item(i);
+        if (!node-&gt;isPluginElement())
+            continue;
+
+        HTMLPlugInElement* plugInElement = toHTMLPlugInElement(node);
+
+        ASSERT(!plugInElement-&gt;hasTagName(WebCore::HTMLNames::appletTag));
+
+        if (plugInElement-&gt;displayState() == HTMLPlugInElement::DisplayState::Playing)
+            continue;
+
+        if (!plugInElement-&gt;isPlugInImageElement())
+            continue;
+
+        HTMLPlugInImageElement* plugInImageElement = toHTMLPlugInImageElement(node);
+        mimeTypes.add(plugInImageElement-&gt;loadedMimeType());
+    }
+}
+
</ins><span class="cx"> void WebPage::containsPluginViewsWithPluginProcessToken(uint64_t plugInProcessToken, uint64_t callbackID)
</span><span class="cx"> {
</span><span class="cx">     bool containsPlugIn = false;
</span><span class="lines">@@ -990,7 +1017,22 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    send(Messages::WebPageProxy::ContainsPlugInCallback(containsPlugIn, plugInProcessToken, callbackID));
</del><ins>+    HashSet&lt;String&gt; nonPlayingPlugInMimeTypes;
+    for (Frame* frame = corePage()-&gt;mainFrame(); frame; frame = frame-&gt;tree()-&gt;traverseNext()) {
+        if (!frame-&gt;loader()-&gt;subframeLoader()-&gt;containsPlugins())
+            continue;
+
+        if (!frame-&gt;document())
+            continue;
+
+        addPlugInMimeTypesFromNodeListForNonPlayingPlugIns(frame-&gt;document()-&gt;getElementsByTagName(WebCore::HTMLNames::embedTag.localName()), nonPlayingPlugInMimeTypes);
+        addPlugInMimeTypesFromNodeListForNonPlayingPlugIns(frame-&gt;document()-&gt;getElementsByTagName(WebCore::HTMLNames::objectTag.localName()), nonPlayingPlugInMimeTypes);
+    }
+
+    Vector&lt;String&gt; nonPlayingPlugInMimeTypesVector;
+    copyToVector(nonPlayingPlugInMimeTypes, nonPlayingPlugInMimeTypesVector);
+
+    send(Messages::WebPageProxy::ContainsPlugInCallback(containsPlugIn, nonPlayingPlugInMimeTypesVector, plugInProcessToken, callbackID));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre>
</div>
</div>

</body>
</html>