Enable process suppression when no windows in the application have drawn recently.
<http://webkit.org/b/113854> / <rdar://problem/13540351>

Reviewed by Darin Adler.

* UIProcess/mac/WebContextMac.mm:
(WebKit::applicationWindowModificationsStarted): Note that modifications are no longer stopped.
(WebKit::applicationWindowModificationsStopped): Note that modifications have stopped.
(WebKit::registerOcclusionNotificationHandlers): Register handlers for the start and stop notifications.
(WebKit::unregisterOcclusionNotificationHandlers): Unregister handlers for the start and stop notifications.
(WebKit::WebContext::canEnableProcessSuppressionForNetworkProcess): Allow suppression if the application is occluded
or the application has not drawn recently.
(WebKit::WebContext::canEnableProcessSuppressionForWebProcess): Ditto.
(WebKit::WebContext::canEnableProcessSuppressionForGlobalChildProcesses): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<http://webkit.org/b/113898> Eliminate some code duplication by introducing an array of handlers to register / unregister.

Reviewed by Antti Koivisto.

* UIProcess/mac/WebContextMac.mm:
(OcclusionNotificationHandler): Structure containing the notification name, type and handler.
(WebKit::registerOcclusionNotificationHandlers): Register all of the handlers in the array.
(WebKit::unregisterOcclusionNotificationHandlers): Unregister all of the handlers in the array.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Switch MediaPlayerPrivateBlackBerry.cpp's timer to use CLOCK_MONOTONIC
https://bugs.webkit.org/show_bug.cgi?id=113900

Patch by Otto Derek Cheung <otcheung@rim.com> on 2013-04-03
Reviewed by Rob Buis.
Internally Reviewed by Jeff Rogers.

Timers should use CLOCK_MONOTONIC to avoid undesirable effects when
the user switches the system time.

* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::drawBufferingAnimation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147594 268f45cc-cd09-0410-ab3c-d52691b4dbfc