https://bugs.webkit.org/show_bug.cgi?id=63458
Patch by Nándor Huszka <huszka.nandor@stud.u-szeged.hu> on 2012-01-25
Reviewed by Adam Roben.
Source/WebKit2:
Implement the setPopupBlockingEnabled method.
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetPrivateBrowsingEnabled):
(WKBundleSetPopupBlockingEnabled):
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setPopupBlockingEnabled):
* WebProcess/InjectedBundle/InjectedBundle.h:
Tools:
Implement the setPopupBlockingEnabled method.
* WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
(WTR::LayoutTestController::setPopupBlockingEnabled):
* WebKitTestRunner/InjectedBundle/LayoutTestController.h:
LayoutTests:
Unskip tests which do not fail now.
* platform/wk2/Skipped:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105884
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-01-25 Nándor Huszka <huszka.nandor@stud.u-szeged.hu>
+
+ [WK2] WebKitTestRunner needs layoutTestController.setPopupBlockingEnabled
+ https://bugs.webkit.org/show_bug.cgi?id=63458
+
+ Reviewed by Adam Roben.
+
+ Unskip tests which do not fail now.
+
+ * platform/wk2/Skipped:
+
2012-01-25 Philippe Normand <pnormand@igalia.com>
Unreviewed, GTK rebaseline and skipping 2 new test failures.
# https://bugs.webkit.org/show_bug.cgi?id=71896
http/tests/security/contentSecurityPolicy/block-mixed-content-hides-warning.html
-# WebKitTestRunner needs layoutTestController.setPopupBlockingEnabled
-# https://bugs.webkit.org/show_bug.cgi?id=63458
-fast/events/popup-blocked-from-untrusted-click-event-on-anchor.html
-fast/events/popup-blocked-from-iframe-src.html
-fast/events/popup-allowed-from-gesture-initiated-event.html
-fast/events/popup-allowed-from-gesture-initiated-form-submit.html
-fast/events/popup-blocked-from-fake-button-click.html
-fast/events/popup-blocked-from-fake-focus.html
-fast/events/popup-blocked-from-fake-user-gesture.html
-fast/events/popup-blocked-from-history-reload.html
-fast/events/popup-blocked-from-iframe-script.html
-fast/events/popup-blocked-from-mousemove.html
-fast/events/popup-blocked-from-untrusted-mouse-click.html
-fast/events/popup-blocked-from-window-open.html
-fast/events/popup-blocked-to-post-blank.html
-fast/events/popup-blocking-timers.html
-plugins/plugin-initiate-popup-window.html
-
# WebKitTestRunner needs an implementation of allowRoundingHacks
# http://webkit.org/b/63477
platform/mac/fast/text/rounding-hacks.html
fast/dom/StyleSheet/detached-style.html
fast/dom/Window/window-appendages-cleared.html
fast/dom/tab-in-right-alignment.html
+fast/events/popup-blocked-from-fake-user-gesture.html
fast/frames/frame-element-name.html
fast/frames/iframe-onload-remove-self-no-crash.html
fast/frames/iframe-reparenting-adopt-node.html
media/controls-styling.html
platform/mac/fast/loader/non-html-load-event.html
plugins/embed-attributes-style.html
+plugins/plugin-initiate-popup-window.html
storage/open-database-while-transaction-in-progress.html
svg/custom/clip-path-referencing-use2.svg
svg/dom/fuzz-path-parser.html
+2012-01-25 Nándor Huszka <huszka.nandor@stud.u-szeged.hu>
+
+ [WK2] WebKitTestRunner needs layoutTestController.setPopupBlockingEnabled
+ https://bugs.webkit.org/show_bug.cgi?id=63458
+
+ Reviewed by Adam Roben.
+
+ Implement the setPopupBlockingEnabled method.
+
+ * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+ (WKBundleSetPrivateBrowsingEnabled):
+ (WKBundleSetPopupBlockingEnabled):
+ * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+ * WebProcess/InjectedBundle/InjectedBundle.cpp:
+ (WebKit::InjectedBundle::setPopupBlockingEnabled):
+ * WebProcess/InjectedBundle/InjectedBundle.h:
+
2012-01-25 Yael Aharon <yael.aharon@nokia.com>
[Qt] Build fix when using force_static_libs_as_shared
toImpl(bundleRef)->setPrivateBrowsingEnabled(toImpl(pageGroupRef), enabled);
}
+void WKBundleSetPopupBlockingEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
+{
+ toImpl(bundleRef)->setPopupBlockingEnabled(toImpl(pageGroupRef), enabled);
+}
+
void WKBundleSwitchNetworkLoaderToNewTestingSession(WKBundleRef bundleRef)
{
toImpl(bundleRef)->switchNetworkLoaderToNewTestingSession();
WK_EXPORT void WKBundleSetFrameFlatteningEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
WK_EXPORT void WKBundleSetJavaScriptCanAccessClipboard(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
WK_EXPORT void WKBundleSetPrivateBrowsingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
+WK_EXPORT void WKBundleSetPopupBlockingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
WK_EXPORT void WKBundleSetAuthorAndUserStylesEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
WK_EXPORT void WKBundleClearAllDatabases(WKBundleRef bundle);
WK_EXPORT void WKBundleSetDatabaseQuota(WKBundleRef bundle, uint64_t);
(*iter)->settings()->setPrivateBrowsingEnabled(enabled);
}
+void InjectedBundle::setPopupBlockingEnabled(WebPageGroupProxy* pageGroup, bool enabled)
+{
+ const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
+ HashSet<Page*>::const_iterator end = pages.end();
+ for (HashSet<Page*>::const_iterator iter = pages.begin(); iter != end; ++iter)
+ (*iter)->settings()->setJavaScriptCanOpenWindowsAutomatically(!enabled);
+}
+
void InjectedBundle::switchNetworkLoaderToNewTestingSession()
{
#if USE(CFURLSTORAGESESSIONS)
void setFrameFlatteningEnabled(WebPageGroupProxy*, bool);
void setJavaScriptCanAccessClipboard(WebPageGroupProxy*, bool);
void setPrivateBrowsingEnabled(WebPageGroupProxy*, bool);
+ void setPopupBlockingEnabled(WebPageGroupProxy*, bool);
void switchNetworkLoaderToNewTestingSession();
void setAuthorAndUserStylesEnabled(WebPageGroupProxy*, bool);
void addOriginAccessWhitelistEntry(const String&, const String&, const String&, bool);
+2012-01-25 Nándor Huszka <huszka.nandor@stud.u-szeged.hu>
+
+ [WK2] WebKitTestRunner needs layoutTestController.setPopupBlockingEnabled
+ https://bugs.webkit.org/show_bug.cgi?id=63458
+
+ Reviewed by Adam Roben.
+
+ Implement the setPopupBlockingEnabled method.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+ (WTR::LayoutTestController::setPopupBlockingEnabled):
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+
2012-01-24 Balazs Kelemen <kbalazs@webkit.org>
[Qt] Cleanup testfonts handling
void setFrameFlatteningEnabled(in boolean value);
void setJavaScriptCanAccessClipboard(in boolean value);
void setPrivateBrowsingEnabled(in boolean value);
+ void setPopupBlockingEnabled(in boolean value);
void setAuthorAndUserStylesEnabled(in boolean value);
void addOriginAccessWhitelistEntry(in DOMString sourceOrigin, in DOMString destinationProtocol, in DOMString destinationHost, in boolean allowDestinationSubdomains);
void removeOriginAccessWhitelistEntry(in DOMString sourceOrigin, in DOMString destinationProtocol, in DOMString destinationHost, in boolean allowDestinationSubdomains);
WKBundleSetPrivateBrowsingEnabled(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
}
+void LayoutTestController::setPopupBlockingEnabled(bool enabled)
+{
+ WKBundleSetPopupBlockingEnabled(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
+}
+
void LayoutTestController::setAuthorAndUserStylesEnabled(bool enabled)
{
WKBundleSetAuthorAndUserStylesEnabled(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
void setFrameFlatteningEnabled(bool);
void setJavaScriptCanAccessClipboard(bool);
void setPrivateBrowsingEnabled(bool);
+ void setPopupBlockingEnabled(bool);
void setAuthorAndUserStylesEnabled(bool);
void setCustomPolicyDelegate(bool enabled, bool permissive = false);
void addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);