Add API for getting and setting the active state of a CoordinatedGraphicsScene
Created attachment 207416 [details] Patch
A view being in the "active" state generally means that it is not in the "background", although this definition can vary depending on the platform under consideration. This patch adds the following APIs: - bool WKCoordinatedSceneIsActive(WKCoordinatedScene) This API accepts a WKCoordinatedScene as parameter and returns a boolean indicating whether the given scene is active. - void WKCoordinatedSceneSetActive(WKCoordinatedScene, bool) This API accepts a WKCoordinatedScene and a boolean as parameter, and it sets the active state of given scene to the boolean argument. Additionally, this patch adds enablers to get the WKCoordinatedScene from a WKView.
Comment on attachment 207416 [details] Patch This doesn't belong in WKCoordinatedScene, as it needs to send a message to WebPageProxy/WebPage as well (something like viewStateDidChange), so that the focus controller is aware of the page being deactivated. See how it's done in QRawWebView or QQuickWebPage|View.
Created attachment 207651 [details] Patch Updated as per Noam's feedback.
Comment on attachment 207651 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=207651&action=review looks good > Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h:60 > + bool isActive(); const method?
Comment on attachment 207651 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=207651&action=review >> Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h:60 >> + bool isActive(); > > const method? Please make const before submitting.
Created attachment 207659 [details] Patch Marking WebView::isActive() const
Comment on attachment 207659 [details] Patch Clearing flags on attachment: 207659 Committed r153428: <http://trac.webkit.org/changeset/153428>