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>
Created attachment 128739 [details] Patch
Comment on attachment 128739 [details] Patch Fixed in http://trac.webkit.org/changeset/108822