Changeset 153877 in webkit
- Timestamp:
- Aug 8, 2013 11:44:27 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r153876 r153877 1 2013-08-08 Tim Horton <timothy_horton@apple.com> 2 3 navigator.plugins has plugins in it when plugins are disabled 4 https://bugs.webkit.org/show_bug.cgi?id=119607 5 <rdar://problem/14678030> 6 7 Reviewed by Anders Carlsson. 8 9 Add a test that ensures that navigator.plugins only contains 10 application plugins when plugins are disabled. 11 12 * plugins/navigator-plugins-disabled-expected.txt: Added. 13 * plugins/navigator-plugins-disabled.html: Added. 14 1 15 2013-08-08 Timothy Hatcher <timothy@apple.com> 2 16 -
trunk/Source/WebCore/ChangeLog
r153876 r153877 1 2013-08-08 Tim Horton <timothy_horton@apple.com> 2 3 navigator.plugins has plugins in it when plugins are disabled 4 https://bugs.webkit.org/show_bug.cgi?id=119607 5 <rdar://problem/14678030> 6 7 Reviewed by Anders Carlsson. 8 9 Test: plugins/navigator-plugins-disabled.html 10 11 * page/Settings.cpp: 12 (WebCore::Settings::setPluginsEnabled): 13 Refresh the plugin database when plugins are enabled or disabled. 14 This is necessary to ensure that navigator.plugins will have the 15 correct set of plugins after dynamically changing whether plugins 16 are enabled, which makes the test for this patch possible (but it 17 makes sense in the browser as well). 18 1 19 2013-08-08 Timothy Hatcher <timothy@apple.com> 2 20 -
trunk/Source/WebCore/page/Settings.cpp
r153696 r153877 391 391 void Settings::setPluginsEnabled(bool arePluginsEnabled) 392 392 { 393 if (m_arePluginsEnabled == arePluginsEnabled) 394 return; 395 393 396 m_arePluginsEnabled = arePluginsEnabled; 397 Page::refreshPlugins(false); 394 398 } 395 399 -
trunk/Source/WebKit/mac/ChangeLog
r153775 r153877 1 2013-08-08 Tim Horton <timothy_horton@apple.com> 2 3 navigator.plugins has plugins in it when plugins are disabled 4 https://bugs.webkit.org/show_bug.cgi?id=119607 5 <rdar://problem/14678030> 6 7 Reviewed by Anders Carlsson. 8 9 * WebCoreSupport/WebPlatformStrategies.mm: 10 (WebPlatformStrategies::getPluginInfo): 11 If plugins are disabled for the given page, give WebCore an empty list of 12 plugins. If WebKit1 had any application plugins, we'd return just them 13 instead. 14 1 15 2013-08-06 Stephanie Lewis <slewis@apple.com> 2 16 -
trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm
r149035 r153877 127 127 } 128 128 129 void WebPlatformStrategies::getPluginInfo(const Page* , Vector<PluginInfo>& plugins)129 void WebPlatformStrategies::getPluginInfo(const Page* page, Vector<PluginInfo>& plugins) 130 130 { 131 131 BEGIN_BLOCK_OBJC_EXCEPTIONS; 132 133 // WebKit1 has no application plug-ins, so we don't need to add them here. 134 if (!page->mainFrame()->loader()->subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin)) 135 return; 132 136 133 137 NSArray* pluginsArray = [[WebPluginDatabase sharedDatabase] plugins]; -
trunk/Source/WebKit2/ChangeLog
r153856 r153877 1 2013-08-08 Tim Horton <timothy_horton@apple.com> 2 3 navigator.plugins has plugins in it when plugins are disabled 4 https://bugs.webkit.org/show_bug.cgi?id=119607 5 <rdar://problem/14678030> 6 7 Reviewed by Anders Carlsson. 8 9 * UIProcess/WebProcessProxy.cpp: 10 (WebKit::WebProcessProxy::getPlugins): 11 Return a list of all plugins, and a list of only application plugins. 12 13 * UIProcess/WebProcessProxy.h: 14 * UIProcess/WebProcessProxy.messages.in: 15 * WebProcess/WebCoreSupport/WebPlatformStrategies.h: 16 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 17 (WebKit::WebPlatformStrategies::getPluginInfo): 18 Add applicationPlugin parameter to getPlugins, and storage for the returned list. 19 20 (WebKit::WebPlatformStrategies::populatePluginCache): 21 If plugins are disabled for the given page, give WebCore the list that 22 only includes application plugins. Otherwise, give it the whole list 23 as we are doing currently. 24 1 25 2013-08-08 Gavin Barraclough <barraclough@apple.com> 2 26 -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp
r153694 r153877 307 307 308 308 #if ENABLE(NETSCAPE_PLUGIN_API) 309 void WebProcessProxy::getPlugins(bool refresh, Vector<PluginInfo>& plugins )309 void WebProcessProxy::getPlugins(bool refresh, Vector<PluginInfo>& plugins, Vector<PluginInfo>& applicationPlugins) 310 310 { 311 311 if (refresh) … … 318 318 #if ENABLE(PDFKIT_PLUGIN) 319 319 // Add built-in PDF last, so that it's not used when a real plug-in is installed. 320 if (!m_context->omitPDFSupport()) 320 if (!m_context->omitPDFSupport()) { 321 321 plugins.append(PDFPlugin::pluginInfo()); 322 applicationPlugins.append(PDFPlugin::pluginInfo()); 323 } 322 324 #endif 323 325 } -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.h
r150491 r153877 145 145 // Plugins 146 146 #if ENABLE(NETSCAPE_PLUGIN_API) 147 void getPlugins(bool refresh, Vector<WebCore::PluginInfo>& plugins );147 void getPlugins(bool refresh, Vector<WebCore::PluginInfo>& plugins, Vector<WebCore::PluginInfo>& applicationPlugins); 148 148 #endif // ENABLE(NETSCAPE_PLUGIN_API) 149 149 #if ENABLE(PLUGIN_PROCESS) -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.messages.in
r150484 r153877 39 39 # Plugin messages. 40 40 #if ENABLE(NETSCAPE_PLUGIN_API) 41 GetPlugins(bool refresh) -> (Vector<WebCore::PluginInfo> plugins )41 GetPlugins(bool refresh) -> (Vector<WebCore::PluginInfo> plugins, Vector<WebCore::PluginInfo> applicationPlugins) 42 42 #endif // ENABLE(NETSCAPE_PLUGIN_API) 43 43 #if ENABLE(PLUGIN_PROCESS) -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
r150669 r153877 40 40 #include "WebProcessProxyMessages.h" 41 41 #include <WebCore/Color.h> 42 #include <WebCore/Frame.h> 42 43 #include <WebCore/KURL.h> 43 44 #include <WebCore/LoaderStrategy.h> … … 280 281 } 281 282 282 void WebPlatformStrategies::getPluginInfo(const WebCore::Page* , Vector<WebCore::PluginInfo>& plugins)283 void WebPlatformStrategies::getPluginInfo(const WebCore::Page* page, Vector<WebCore::PluginInfo>& plugins) 283 284 { 284 285 #if ENABLE(NETSCAPE_PLUGIN_API) 285 286 populatePluginCache(); 286 plugins = m_cachedPlugins; 287 288 if (page->mainFrame()->loader()->subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin)) { 289 plugins = m_cachedPlugins; 290 return; 291 } 292 293 plugins = m_cachedApplicationPlugins; 287 294 #endif // ENABLE(NETSCAPE_PLUGIN_API) 288 295 } … … 297 304 298 305 // FIXME: Should we do something in case of error here? 299 if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetPlugins(m_shouldRefreshPlugins), Messages::WebProcessProxy::GetPlugins::Reply(m_cachedPlugins ), 0))306 if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetPlugins(m_shouldRefreshPlugins), Messages::WebProcessProxy::GetPlugins::Reply(m_cachedPlugins, m_cachedApplicationPlugins), 0)) 300 307 return; 301 308 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h
r150310 r153877 119 119 bool m_shouldRefreshPlugins; 120 120 Vector<WebCore::PluginInfo> m_cachedPlugins; 121 Vector<WebCore::PluginInfo> m_cachedApplicationPlugins; 121 122 #endif // ENABLE(PLUGIN_PROCESS) 122 123 }; 123 124 124 125 #if ENABLE(NETSCAPE_PLUGIN_API) 125 void handleDidGetPlugins(uint64_t requestID, const Vector<WebCore::PluginInfo>& );126 void handleDidGetPlugins(uint64_t requestID, const Vector<WebCore::PluginInfo>&, const Vector<WebCore::PluginInfo>& applicationPlugins); 126 127 #endif // ENABLE(PLUGIN_PROCESS) 127 128
Note: See TracChangeset
for help on using the changeset viewer.