[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
robert at webkit.org
robert at webkit.org
Wed Mar 17 18:06:24 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 7e9d100a1e89e27865787aaaea033548b3b4aec4
Author: robert at webkit.org <robert at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Feb 28 12:57:09 2010 +0000
[Qt] Support private browsing mode in plugins
Add support for NPNVprivateModeBool property in plugins.
See also: https://developer.mozilla.org/En/Supporting_private_browsing_in_plugins
The NPNVprivateModeBool property is supported as scriptable property privateBrowsingEnabled
in the test WebKit plugin. The Mac platform also supports a cachedPrivateBrowsingEnabled
property implemented in the test plugin. This allows the Layout test plugins/private-browsing-mode.html
to retrieve the previous value of NPNVprivateModeBool in the test plugin. Due to the platform-specific
overhead required to support this bespoke property it is not implemented as part of this patch, instead
a new test, plugins/private-browsing-mode-2.html, is added to ensure that setting and resetting privateBrowsingEnabled works as expected.
http://bugs.webkit.org/show_bug.cgi?id=33180
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55358 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 07b02f9..48719b9 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,31 @@
+2010-02-28 Robert Hogan <robert at roberthogan.net>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Support private browsing mode in plugins
+
+ Add support for NPNVprivateModeBool property in plugins.
+
+ See also: https://developer.mozilla.org/En/Supporting_private_browsing_in_plugins
+
+ The NPNVprivateModeBool property is supported as scriptable property privateBrowsingEnabled
+ in the test WebKit plugin. The Mac platform also supports a cachedPrivateBrowsingEnabled
+ property implemented in the test plugin. This allows the Layout test
+ plugins/private-browsing-mode.html to retrieve the previous value of NPNVprivateModeBool
+ in the test plugin. Due to the platform-specific overhead required to support this bespoke
+ property it is not implemented as part of this patch, instead a new test,
+ plugins/private-browsing-mode-2.html, is added to ensure that setting and resetting
+ privateBrowsingEnabled works as expected.
+
+ http://bugs.webkit.org/show_bug.cgi?id=33180
+
+ * platform/gtk/Skipped:
+ * platform/mac-snowleopard/Skipped:
+ * platform/qt/Skipped:
+ * platform/win/Skipped:
+ * plugins/private-browsing-mode-2-expected.txt: Added.
+ * plugins/private-browsing-mode-2.html: Added.
+
2010-02-27 Xan Lopez <xlopez at igalia.com>
Rubber-stamped by Gustavo Noronha.
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 6f8acfa..1c9c375 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -3594,6 +3594,11 @@ plugins/private-browsing-mode.html
plugins/setProperty.html
plugins/return-error-from-new-stream-doesnt-invoke-destroy-stream.html
+# https://bugs.webkit.org/show_bug.cgi?id=30561
+plugins/private-browsing-mode.html
+# https://bugs.webkit.org/show_bug.cgi?id=33180
+plugins/private-browsing-mode-2.html
+
# Tests generating new results
plugins/embed-attributes-style.html
plugins/netscape-dom-access.html
diff --git a/LayoutTests/platform/mac-snowleopard/Skipped b/LayoutTests/platform/mac-snowleopard/Skipped
index 15dc499..865eed8 100644
--- a/LayoutTests/platform/mac-snowleopard/Skipped
+++ b/LayoutTests/platform/mac-snowleopard/Skipped
@@ -8,6 +8,7 @@ plugins/mouse-events.html
# These need a newer version of Safari.
plugins/private-browsing-mode.html
+plugins/private-browsing-mode-2.html
plugins/netscape-plugin-property-access-exception.html
plugins/netscape-throw-exception.html
plugins/netscape-dom-access.html
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 35d73da..246baab 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -265,9 +265,6 @@ fast/images/favicon-as-image.html
fast/images/icon-0colors.html
fast/images/icon-decoding.html
-# ------- missing private browsing support?
-plugins/private-browsing-mode.html
-
# ------- missing ruby annotation support for japanese fonts
fast/ruby/ruby-empty-rt.html
fast/ruby/ruby-length.html
@@ -5094,3 +5091,8 @@ http/tests/loading/307-after-303-after-post.html
# DumpRenderTree code to enable Java is currently a no-op
java
+
+# Skipped pending support for halting plugins when pluginsEnabled is set to false,
+# see https://bugs.webkit.org/show_bug.cgi?id=33180.
+# Core functionality is tested in plugins/private-browsing-mode-2.html
+plugins/private-browsing-mode.html
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index 763d7d8..19207cb 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -674,6 +674,9 @@ fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html
# <https://bugs.webkit.org/show_bug.cgi?id=30348>
plugins/private-browsing-mode.html
+# https://bugs.webkit.org/show_bug.cgi?id=33180
+plugins/private-browsing-mode-2.html
+
# Skip these two failures I introduced this morning while I explore them.
http/tests/globalhistory/history-delegate-basic-visited-links.html
diff --git a/LayoutTests/plugins/private-browsing-mode-2-expected.txt b/LayoutTests/plugins/private-browsing-mode-2-expected.txt
new file mode 100644
index 0000000..182266a
--- /dev/null
+++ b/LayoutTests/plugins/private-browsing-mode-2-expected.txt
@@ -0,0 +1,11 @@
+Tests that NPNVprivateModeBool is supported by the WebKit plugin view. This test is for WebKit platforms that wish to support NPNVprivateModeBool but do not wish to implement the preference change listener required to support a cachedPrivateBrowsingEnabled property similar to the one provided by Safari and tested for in private-browsing-mode.html
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS plugin1.privateBrowsingEnabled is false
+PASS plugin1.privateBrowsingEnabled is true
+PASS plugin2.privateBrowsingEnabled is true
+PASS plugin1.privateBrowsingEnabled is false
+PASS plugin2.privateBrowsingEnabled is false
+
diff --git a/LayoutTests/plugins/private-browsing-mode-2.html b/LayoutTests/plugins/private-browsing-mode-2.html
new file mode 100644
index 0000000..2b1e61c
--- /dev/null
+++ b/LayoutTests/plugins/private-browsing-mode-2.html
@@ -0,0 +1,43 @@
+<head>
+<link rel="stylesheet" href="../fast/js/resources/js-test-style.css">
+<script src="../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body onload="runTest()">
+<p id="description"></p>
+<div id="console"></div>
+<script>
+function runTest()
+{
+ if (!window.layoutTestController) {
+ debug("This test can only run from within DumpRenderTree because it requires TestNetscapePlugin.\n");
+ return;
+ }
+
+ plugin1 = document.createElement("embed");
+ plugin1.type = "application/x-webkit-test-netscape";
+ document.body.appendChild(plugin1);
+
+ shouldBe("plugin1.privateBrowsingEnabled", "false");
+
+ // Now enable private browsing
+ layoutTestController.setPrivateBrowsingEnabled(true);
+
+ shouldBe("plugin1.privateBrowsingEnabled", "true");
+
+ plugin2 = document.createElement("embed");
+ plugin2.type = "application/x-webkit-test-netscape";
+ document.body.appendChild(plugin2);
+
+ shouldBe("plugin2.privateBrowsingEnabled", "true");
+ layoutTestController.setPrivateBrowsingEnabled(false);
+ shouldBe("plugin1.privateBrowsingEnabled", "false");
+ shouldBe("plugin2.privateBrowsingEnabled", "false");
+}
+</script>
+
+<script>
+description("Tests that NPNVprivateModeBool is supported by the WebKit plugin view. \n This test is for WebKit platforms that wish to support NPNVprivateModeBool but do not wish to implement the preference change listener required to support a cachedPrivateBrowsingEnabled property similar to the one provided by Safari and tested for in private-browsing-mode.html");
+
+
+successfullyParsed = true;
+</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index fda7e02..925a5ac 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,30 @@
+2010-02-28 Robert Hogan <robert at roberthogan.net>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Support private browsing mode in plugins
+
+ Add support for NPNVprivateModeBool property in plugins.
+
+ See also: https://developer.mozilla.org/En/Supporting_private_browsing_in_plugins
+
+ The NPNVprivateModeBool property is supported as scriptable property privateBrowsingEnabled
+ in the test WebKit plugin. The Mac platform also supports a cachedPrivateBrowsingEnabled
+ property implemented in the test plugin. This allows the Layout test
+ plugins/private-browsing-mode.html to retrieve the previous value of NPNVprivateModeBool
+ in the test plugin. Due to the platform-specific overhead required to support this bespoke
+ property it is not implemented as part of this patch, instead a new test,
+ plugins/private-browsing-mode-2.html, is added to ensure that setting and resetting
+ privateBrowsingEnabled works as expected.
+
+ http://bugs.webkit.org/show_bug.cgi?id=33180
+
+ Test: plugins/private-browsing-mode-2.html
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::getValue):
+
+
2010-02-27 Joseph Pecoraro <joepeck at webkit.org>
Reviewed by Timothy Hatcher.
diff --git a/WebCore/plugins/qt/PluginViewQt.cpp b/WebCore/plugins/qt/PluginViewQt.cpp
index 49c0000..00a9073 100644
--- a/WebCore/plugins/qt/PluginViewQt.cpp
+++ b/WebCore/plugins/qt/PluginViewQt.cpp
@@ -640,6 +640,14 @@ NPError PluginView::getValue(NPNVariable variable, void* value)
*((uint32 *)value) = 2;
return NPERR_NO_ERROR;
}
+
+ case NPNVprivateModeBool: {
+ Page* page = m_parentFrame->page();
+ if (!page)
+ return NPERR_GENERIC_ERROR;
+ *((NPBool*)value) = !page->settings() || page->settings()->privateBrowsingEnabled();
+ return NPERR_NO_ERROR;
+ }
// fall through
default:
return getValueStatic(variable, value);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list