Title: [126903] trunk/Source/WebKit2
- Revision
- 126903
- Author
- [email protected]
- Date
- 2012-08-28 11:31:02 -0700 (Tue, 28 Aug 2012)
Log Message
[WK2] Bugs in maintenance of internal state when user decides whether to grant notification permissions
https://bugs.webkit.org/show_bug.cgi?id=95220
<rdar://problem/12189895>
Reviewed by Jessie Berlin.
A couple of the maps maintained by the request manager should have been cleaned up when the user decided on
whether to grant a website permission to post notifications.
Also, the web process' copy of the permissions was not updated appropriately. This meant that in the
permission callback, Notification.permission was not the same value as the permission value included as
the first parameter of the callback.
This first surfaced as part of the work to bring Mac support for web notifications. I have a test that
will check for regressions in this area, once all of that has been checked in (bug 77969).
* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (126902 => 126903)
--- trunk/Source/WebKit2/ChangeLog 2012-08-28 18:25:19 UTC (rev 126902)
+++ trunk/Source/WebKit2/ChangeLog 2012-08-28 18:31:02 UTC (rev 126903)
@@ -1,5 +1,26 @@
2012-08-28 Jon Lee <[email protected]>
+ [WK2] Bugs in maintenance of internal state when user decides whether to grant notification permissions
+ https://bugs.webkit.org/show_bug.cgi?id=95220
+ <rdar://problem/12189895>
+
+ Reviewed by Jessie Berlin.
+
+ A couple of the maps maintained by the request manager should have been cleaned up when the user decided on
+ whether to grant a website permission to post notifications.
+
+ Also, the web process' copy of the permissions was not updated appropriately. This meant that in the
+ permission callback, Notification.permission was not the same value as the permission value included as
+ the first parameter of the callback.
+
+ This first surfaced as part of the work to bring Mac support for web notifications. I have a test that
+ will check for regressions in this area, once all of that has been checked in (bug 77969).
+
+ * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
+ (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
+
+2012-08-28 Jon Lee <[email protected]>
+
[WK2] Add SPI for injected bundle to manually set permissions
https://bugs.webkit.org/show_bug.cgi?id=95127
<rdar://problem/12182635>
Modified: trunk/Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.cpp (126902 => 126903)
--- trunk/Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.cpp 2012-08-28 18:25:19 UTC (rev 126902)
+++ trunk/Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.cpp 2012-08-28 18:31:02 UTC (rev 126903)
@@ -151,6 +151,11 @@
if (!isRequestIDValid(requestID))
return;
+ RefPtr<WebCore::SecurityOrigin> origin = m_idToOriginMap.take(requestID);
+ m_originToIDMap.remove(origin);
+
+ WebProcess::shared().notificationManager().didUpdateNotificationDecision(origin->toString(), allowed);
+
#if ENABLE(LEGACY_NOTIFICATIONS)
RefPtr<VoidCallback> voidCallback = m_idToVoidCallbackMap.take(requestID);
if (voidCallback) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes