When the user navigates away from that page, or closes the tab or window associated with that page, or quits the application altogether, all of the page's associated notifications could be cleared depending on the implementation. <rdar://problem/10568907>
Created attachment 124598 [details] Patch
Comment on attachment 124598 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=124598&action=review > Source/WebCore/notifications/NotificationPresenter.h:62 > + virtual void clearNotifications(ScriptExecutionContext*) = 0; We could consider providing a default empty implementation. Then we would only need to override this for platforms as they implement it, and the patch would be a lot smaller. Unless we think people will really want to implement this on every platform. > Source/WebCore/page/DOMWindow.cpp:731 > + m_notifications->clearNotifications(); > m_notifications->disconnectFrame(); Could we just add the code to disconnectFrame instead of adding a new clearNotifications function?
(In reply to comment #2) > (From update of attachment 124598 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=124598&action=review > > > Source/WebCore/notifications/NotificationPresenter.h:62 > > + virtual void clearNotifications(ScriptExecutionContext*) = 0; > > We could consider providing a default empty implementation. Then we would only need to override this for platforms as they implement it, and the patch would be a lot smaller. Unless we think people will really want to implement this on every platform. Done. > > > Source/WebCore/page/DOMWindow.cpp:731 > > + m_notifications->clearNotifications(); > > m_notifications->disconnectFrame(); > > Could we just add the code to disconnectFrame instead of adding a new clearNotifications function? Yes, that makes sense. Thanks!
Committed r106592: <http://trac.webkit.org/changeset/106592>