Summary: | [WK2] Setting m_pageScaleFactor directly in WebPageProxy::scalePage | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Thiago de Barros Lacerda <thiago.lacerda> | ||||
Component: | WebKit2 | Assignee: | Thiago de Barros Lacerda <thiago.lacerda> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | benjamin, commit-queue, jinwoo7.song, simon.fraser, thorton | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Thiago de Barros Lacerda
2014-01-16 02:16:30 PST
*** Bug 126261 has been marked as a duplicate of this bug. *** Created attachment 221363 [details]
Patch
(In reply to comment #0) > When the client side sets the scale factor, the UIProcess will send the message to WebProcess and only after WebPageProxy::pageScaleFactorDidChange is called the desired scale factor is returned correctly by WebPageProxy::pageScaleFactor. > This will avoid the client side retrieve a wrong scale factor while UIProcess and WebProcess gets synchronized. What's the user-visible symptom of getting the wrong scale factor in the UI process? (In reply to comment #3) > (In reply to comment #0) > > When the client side sets the scale factor, the UIProcess will send the message to WebProcess and only after WebPageProxy::pageScaleFactorDidChange is called the desired scale factor is returned correctly by WebPageProxy::pageScaleFactor. > > This will avoid the client side retrieve a wrong scale factor while UIProcess and WebProcess gets synchronized. > > What's the user-visible symptom of getting the wrong scale factor in the UI process? I can imagine a scenario that the user double clicks the WebView, in order to zoom the page, then WKViewSetContentScaleFactor gets called. Right after that it may need to set the position of the contents inside the view, so it gets centralized where the user has clicked. Without this patch he will not get the correct scale factor and the position may not be set correctly, unless the user caches the scale, which in my opinion is just an unnecessary duplication of information. Besides that, I think is not good to have the UIProcess in a inconsistent state with the WebProcess, even for a short period of time. Comment on attachment 221363 [details] Patch Clearing flags on attachment: 221363 Committed r162382: <http://trac.webkit.org/changeset/162382> All reviewed patches have been landed. Closing bug. |