• timothy_horton@apple.com's avatar
    navigator.plugins has plugins in it when plugins are disabled · c70f870b
    timothy_horton@apple.com authored
    Reviewed by Anders Carlsson.
    Test: plugins/navigator-plugins-disabled.html
    * page/Settings.cpp:
    Refresh the plugin database when plugins are enabled or disabled.
    This is necessary to ensure that navigator.plugins will have the
    correct set of plugins after dynamically changing whether plugins
    are enabled, which makes the test for this patch possible (but it
    makes sense in the browser as well).
    * UIProcess/WebProcessProxy.cpp:
    Return a list of all plugins, and a list of only application plugins.
    * UIProcess/WebProcessProxy.h:
    * UIProcess/WebProcessProxy.messages.in:
    * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
    * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
    Add applicationPlugin parameter to getPlugins, and storage for the returned list.
    If plugins are disabled for the given page, give WebCore the list that
    only includes application plugins. Otherwise, give it the whole list
    as we are doing currently.
    * WebCoreSupport/WebPlatformStrategies.mm:
    If plugins are disabled for the given page, give WebCore an empty list of
    plugins. If WebKit1 had any application plugins, we'd return just them
    Add a test that ensures that navigator.plugins only contains
    application plugins when plugins are disabled.
    * plugins/navigator-plugins-disabled-expected.txt: Added.
    * plugins/navigator-plugins-disabled.html: Added.
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
navigator-plugins-disabled.html 697 Bytes