Bug 119067 - CoordinatedGraphics: Add API to get and set the active state of a WebView
Summary: CoordinatedGraphics: Add API to get and set the active state of a WebView
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sergio Correia (qrwteyrutiyoup)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-24 15:48 PDT by Sergio Correia (qrwteyrutiyoup)
Modified: 2013-07-31 07:02 PDT (History)
9 users (show)

See Also:


Attachments
Patch (18.31 KB, patch)
2013-07-24 15:50 PDT, Sergio Correia (qrwteyrutiyoup)
no flags Details | Formatted Diff | Diff
Patch (17.43 KB, patch)
2013-07-29 07:15 PDT, Sergio Correia (qrwteyrutiyoup)
noam: review+
noam: commit-queue-
Details | Formatted Diff | Diff
Patch (17.48 KB, patch)
2013-07-29 08:38 PDT, Sergio Correia (qrwteyrutiyoup)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio Correia (qrwteyrutiyoup) 2013-07-24 15:48:09 PDT
Add API for getting and setting the active state of a CoordinatedGraphicsScene
Comment 1 Sergio Correia (qrwteyrutiyoup) 2013-07-24 15:50:32 PDT
Created attachment 207416 [details]
Patch
Comment 2 Sergio Correia (qrwteyrutiyoup) 2013-07-24 15:52:13 PDT
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 3 Noam Rosenthal 2013-07-25 08:21:11 PDT
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.
Comment 4 Sergio Correia (qrwteyrutiyoup) 2013-07-29 07:15:03 PDT
Created attachment 207651 [details]
Patch

Updated as per Noam's feedback.
Comment 5 Mikhail Pozdnyakov 2013-07-29 07:20:40 PDT
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 6 Noam Rosenthal 2013-07-29 07:29:39 PDT
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.
Comment 7 Sergio Correia (qrwteyrutiyoup) 2013-07-29 08:38:03 PDT
Created attachment 207659 [details]
Patch

Marking WebView::isActive() const
Comment 8 WebKit Commit Bot 2013-07-29 09:23:57 PDT
Comment on attachment 207659 [details]
Patch

Clearing flags on attachment: 207659

Committed r153428: <http://trac.webkit.org/changeset/153428>