Skip to content
  • mrowe@apple.com's avatar
    Bug 35576: WebKit should tell plug-in instances when private browsing state changes · af0e53e0
    mrowe@apple.com authored
    <http://webkit.org/b/35576>
    
    Reviewed by Darin Adler.
    
    WebCore:
    
    Notify plug-in instances when the private browsing state changes to match the behavior of the
    Mac plug-in code.
    
    * page/Page.cpp:
    (WebCore::Page::privateBrowsingStateChanged): Walk the frame tree and notify each PluginView that
    the private browsing state has changed.
    * page/Page.h:
    * page/Settings.cpp:
    (WebCore::Settings::setPrivateBrowsingEnabled): Notify the page that the private browsing state
    has changed.
    * plugins/PluginView.cpp:
    (WebCore::PluginView::privateBrowsingStateChanged): Notify the plug-in instance of the new private
    browsing state.
    * plugins/PluginView.h:
    
    WebKitTools:
    
    TestNetscapePlugin is another bit of plug-in code where copy-paste was heavily used
    when porting.  Update the Windows and UNIX implementations of NPP_New and NPP_SetValue
    to provide the expected behavior related to NPNVprivateModeBool.  Hopefully this code
    duplication can be cleaned up in the future.
    
    * DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp:
    (webkit_test_plugin_new_instance):
    (webkit_test_plugin_set_value):
    * DumpRenderTree/win/TestNetscapePlugin/main.cpp:
    (NPP_New):
    (NPP_SetValue):
    
    LayoutTests:
    
    * platform/win/Skipped: Remove plugins/private-browsing-mode.html now that it passes.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    af0e53e0