Summary: | Need a WebKit2 API for setting media volume | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ada Chan <adachan> | ||||||||
Component: | WebKit2 | Assignee: | Ada Chan <adachan> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | mitz | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Ada Chan
2012-01-18 12:06:02 PST
Created attachment 122974 [details]
Patch
Comment on attachment 122974 [details]
Patch
Like most settings on WKPage, this setting needs to persist even if the Web process crashes and gets relaunched. This means that you need to cache it in a member variable in WebPagePorxy, and add it to WebPageCreationParameters and to WebPageProxy::creationParameters() and the WebPage constructor. Having the value cached in the WebPageProxy would also make it easy to add a getter on WKPage in addition to the setter you’ve added.
(In reply to comment #2) > (From update of attachment 122974 [details]) > Like most settings on WKPage, this setting needs to persist even if the Web process crashes and gets relaunched. This means that you need to cache it in a member variable in WebPagePorxy, and add it to WebPageCreationParameters and to WebPageProxy::creationParameters() and the WebPage constructor. Having the value cached in the WebPageProxy would also make it easy to add a getter on WKPage in addition to the setter you’ve added. Thanks for the review! I'll make the changes you suggested. Created attachment 123026 [details]
Take 2: Make sure WebPageProxy caches the media volume value.
Created attachment 123044 [details]
Take 3
Two more fixes:
- Need to set the media volume with value from WebPageCreationParameters in WebPage::WebPage().
- Need to set WebPageProxy::m_mediaVolume even if the associated WebPage is no longer valid in the web process, since that updated value should be used when the web process is relaunched.
Committed: http://trac.webkit.org/changeset/105439 |