From 659c84da41ad75ebd446ec6549f66e60263e1430 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 5 Feb 2013 14:17:15 +0100 Subject: [Qt][WK1] Remember denied permission for notifications https://bugs.webkit.org/show_bug.cgi?id=107694 Reviewed by Jocelyn Turcotte. Store denied permissions. According to the specification, we should ask the user again if he has already granted or denied permission. * WebCoreSupport/NotificationPresenterClientQt.cpp: (WebCore::NotificationPresenterClientQt::requestPermission): (WebCore::NotificationPresenterClientQt::setNotificationsAllowedForFrame): * WebCoreSupport/NotificationPresenterClientQt.h: (NotificationPresenterClientQt): * WebCoreSupport/QWebPageAdapter.cpp: (QWebPageAdapter::setNotificationsAllowedForFrame): * WebCoreSupport/QWebPageAdapter.h: * WidgetApi/qwebpage.cpp: (QWebPage::setFeaturePermission): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141233 268f45cc-cd09-0410-ab3c-d52691b4dbfc Change-Id: I71896cb6e91531aec32e5f55c2224783a391a110 Reviewed-by: jocelyn.turcotte@digia.com Reviewed-by: Jocelyn Turcotte --- Source/WebKit/qt/WidgetApi/qwebpage.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Source/WebKit/qt/WidgetApi/qwebpage.cpp') diff --git a/Source/WebKit/qt/WidgetApi/qwebpage.cpp b/Source/WebKit/qt/WidgetApi/qwebpage.cpp index f9cec3e54..a1fe49e13 100644 --- a/Source/WebKit/qt/WidgetApi/qwebpage.cpp +++ b/Source/WebKit/qt/WidgetApi/qwebpage.cpp @@ -1584,11 +1584,15 @@ bool QWebPage::shouldInterruptJavaScript() void QWebPage::setFeaturePermission(QWebFrame* frame, Feature feature, PermissionPolicy policy) { +#if !ENABLE(NOTIFICATIONS) && !ENABLE(LEGACY_NOTIFICATIONS) && !ENABLE(GEOLOCATION) + Q_UNUSED(frame); + Q_UNUSED(policy); +#endif switch (feature) { case Notifications: #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) - if (policy == PermissionGrantedByUser) - d->allowNotificationsForFrame(frame->d); + if (policy != PermissionUnknown) + d->setNotificationsAllowedForFrame(frame->d, (policy == PermissionGrantedByUser)); #endif break; case Geolocation: -- cgit v1.2.1