RESOLVED FIXED79494
requestPermission callback not invoked if the WebProcess doesn't have to ask the UI Process about the permission level
https://bugs.webkit.org/show_bug.cgi?id=79494
Summary requestPermission callback not invoked if the WebProcess doesn't have to ask ...
Jessie Berlin
Reported 2012-02-24 08:22:02 PST
If a site already has had permission granted to them to post notifications, and the Web Process already knows about this permission, if the site again calls requestPermission, the callback is never invoked. This is because of the following code in NotificationPermissionRequestManager.cpp: void NotificationPermissionRequestManager::startRequest(SecurityOrigin* origin, PassRefPtr<VoidCallback> callback) { #if ENABLE(NOTIFICATIONS) if (permissionLevel(origin) != NotificationPresenter::PermissionNotAllowed) return; uint64_t requestID = generateRequestID(); m_originToIDMap.set(origin, requestID); m_idToOriginMap.set(requestID, origin); m_idToCallbackMap.set(requestID, callback); m_page->send(Messages::WebPageProxy::RequestNotificationPermission(requestID, origin->toString())); #else UNUSED_PARAM(origin); UNUSED_PARAM(callback); #endif } That first if statement should invoke the callback. <rdar://problem/10923498>
Attachments
Patch (1.77 KB, patch)
2012-02-24 08:27 PST, Jessie Berlin
no flags
Jessie Berlin
Comment 1 2012-02-24 08:27:43 PST
Jessie Berlin
Comment 2 2012-02-24 10:52:24 PST
Note You need to log in before you can comment on or make changes to this bug.