diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-02-05 14:17:15 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-06 17:41:26 +0100 |
commit | 659c84da41ad75ebd446ec6549f66e60263e1430 (patch) | |
tree | a26b109153f6fbcd443d7ebd56725e4c54535a52 /Source/WebKit/qt/WidgetApi/qwebpage.cpp | |
parent | 052090690fe4006427d89e09eca8f0fd67a8e7f1 (diff) | |
download | qtwebkit-659c84da41ad75ebd446ec6549f66e60263e1430.tar.gz |
[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 <jocelyn.turcotte@digia.com>
Diffstat (limited to 'Source/WebKit/qt/WidgetApi/qwebpage.cpp')
-rw-r--r-- | Source/WebKit/qt/WidgetApi/qwebpage.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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: |