Bug 42536 - WebKitTestRunner needs to support layoutTestController.setFrameFlatteningEnabled
Summary: WebKitTestRunner needs to support layoutTestController.setFrameFlatteningEnabled
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Chang Shu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-07-18 21:38 PDT by Maciej Stachowiak
Modified: 2011-04-22 18:14 PDT (History)
9 users (show)

See Also:


Attachments
fix patch (10.70 KB, patch)
2011-04-21 08:08 PDT, Chang Shu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Stachowiak 2010-07-18 21:38:24 PDT
WebKitTestRunner needs to support layoutTestController.setFrameFlatteningEnabled
Comment 1 Maciej Stachowiak 2010-07-18 21:50:52 PDT
<rdar://problem/8204906>
Comment 2 Kenneth Rohde Christiansen 2010-10-08 04:42:51 PDT
This should be easy to implement, there is already a WebKit2 C API for turning on frame flattening.
Comment 3 Chang Shu 2011-04-13 11:43:06 PDT
(In reply to comment #2)
> This should be easy to implement, there is already a WebKit2 C API for turning on frame flattening.

Kenneth, the current api is for UIProcess. We need one for WebProcess, do I get it right?
Comment 4 Kenneth Rohde Christiansen 2011-04-14 00:51:59 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > This should be easy to implement, there is already a WebKit2 C API for turning on frame flattening.
> 
> Kenneth, the current api is for UIProcess. We need one for WebProcess, do I get it right?

Right :-) well then it is just calling into WebCore::Settings
Comment 5 Chang Shu 2011-04-14 10:45:09 PDT
Per discussion on IRC with Maciej, we planned to send an InjectedBundle message from WebProcess to UIProcess, and calling WK API to set preference over there. I have managed to make the code work. But only partially, because even I used synchronous messaging from WebProcess, the 2nd message (preferenceDidChange) from UIProcess is async, and it causes some problem, I believe. I doubt we can make both messaging synchronous because the WebProcess is pending on waiting for the 1st message back.
Comment 6 Chang Shu 2011-04-18 07:44:31 PDT
Based on my investigation, I plan to add WK API in WebProcess and notify UIProcess through preferenceDidChange message. I think the race condition of setting from UIProcess and WebProcess at the same time is not critical since there is no use case of such. Any thoughts, concerns? Thanks.
Comment 7 Chang Shu 2011-04-21 06:08:49 PDT
It seems the notify-UIprocess part is not necessary for most of the setting changes, including this one. And we don't have to touch the preference store either. So it should be trivial as Kenneth has stated. :)
Comment 8 Chang Shu 2011-04-21 08:08:35 PDT
Created attachment 90534 [details]
fix patch
Comment 9 WebKit Commit Bot 2011-04-22 18:14:24 PDT
Comment on attachment 90534 [details]
fix patch

Clearing flags on attachment: 90534

Committed r84721: <http://trac.webkit.org/changeset/84721>
Comment 10 WebKit Commit Bot 2011-04-22 18:14:30 PDT
All reviewed patches have been landed.  Closing bug.