RESOLVED FIXED 103290
Ensure that WebPageProxy's notion of pageScaleFactor is reset on didCommitLoad
https://bugs.webkit.org/show_bug.cgi?id=103290
Summary Ensure that WebPageProxy's notion of pageScaleFactor is reset on didCommitLoad
Tim Horton
Reported 2012-11-26 13:51:56 PST
When a standard main frame load is committed, we reset the WebPage's pageScaleFactor, if it's not the default. However, if the previous page had a full-main-frame plugin that was handling page scaling itself, WebPageProxy can have a cached pageScaleFactor != 1, while WebPage now (since the plugin that was overriding (set)pageScaleFactor is gone) has a pageScaleFactor of 1, causing us to skip the call to reset the WebPage's pageScaleFactor. We need to notify WebPageProxy of the change in this case.
Attachments
patch (3.89 KB, patch)
2012-11-26 14:46 PST, Tim Horton
no flags
patch (6.98 KB, patch)
2012-11-28 03:31 PST, Tim Horton
darin: review+
Tim Horton
Comment 1 2012-11-26 13:53:11 PST
This causes pinch-to-zooming in PDFPlugin to break initial pinch-to-zooming in the next page loaded.
Tim Horton
Comment 2 2012-11-26 13:53:38 PST
Tim Horton
Comment 3 2012-11-26 14:46:32 PST
Tim Horton
Comment 4 2012-11-27 04:29:48 PST
Comment on attachment 176077 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=176077&action=review > Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:471 > + float pageScaleFactor = webPage->pageScaleFactor(); Don't need this temporary, and it should be a double anyway.
Darin Adler
Comment 5 2012-11-27 09:55:22 PST
Comment on attachment 176077 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=176077&action=review Can you make a test case? I’m OK with this change, but it seems to be an indirect way to solve the problem, and I suspect there’s a better way. > Source/WebKit2/ChangeLog:19 > + instead of reaching into WebCore immediately. immediately -> directly > Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:479 > + webPage->send(Messages::WebPageProxy::PageScaleFactorDidChange(1)); Is it really appropriate to send this message after every single load? These redundant messages don’t seem to be conveying information. Can’t the other process determine this without having to receive a cross-process message? There must be a better way to solve this. It seems bogus to just send extra scale factor did change messages when the scale factor did not change.
Tim Horton
Comment 6 2012-11-27 12:01:15 PST
Hmm, you're right, there's probably somewhere that the UIProcess can do this itself already. A test case might be tricky, but I'll try (I'd like to get more of this PDFPlugin stuff tested, but that's difficult for obvious reasons).
Tim Horton
Comment 7 2012-11-28 03:31:39 PST
Created attachment 176446 [details] patch How about this instead?
Tim Horton
Comment 8 2012-11-28 03:32:48 PST
I don't think there's any way to test this at the moment (without building a plugin that takes over page scale that can be built on all platforms, etc. etc.).
Eric Seidel (no email)
Comment 9 2013-01-04 00:42:13 PST
Comment on attachment 176077 [details] patch Cleared Darin Adler's review+ from obsolete attachment 176077 [details] so that this bug does not appear in http://webkit.org/pending-commit.
Darin Adler
Comment 10 2013-01-10 09:53:55 PST
Comment on attachment 176446 [details] patch Seems a bit inelegant to send the load type across, but I don’t have an immediate better idea and this is internal to the code so it doesn’t affect API or anything like that.
Tim Horton
Comment 11 2013-01-10 10:46:36 PST
Note You need to log in before you can comment on or make changes to this bug.