Ensure that WebPageProxy's notion of pageScaleFactor is reset on didCommitLoad
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Jan 2013 18:44:48 +0000 (18:44 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Jan 2013 18:44:48 +0000 (18:44 +0000)
commit28f5aba2c345417f856259f8f3782b71b84031cb
treeb660cbc8d086561a61f7f4facf4ef6075c6d78ca
parentd85193f63a61fd9d988c9b5dfa956ff4c741a13a
Ensure that WebPageProxy's notion of pageScaleFactor is reset on didCommitLoad
https://bugs.webkit.org/show_bug.cgi?id=103290
<rdar://problem/12752467>

Reviewed by Darin Adler.

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.

Therefore, when WebPageProxy is notified that a standard main-frame load
is committed, reset its cached notion of the pageScaleFactor.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame): Add a parameter which corresponds to FrameLoadType, so we can
determine whether a frame load is of FrameLoadTypeStandard (which matches the check to reset page scale in
WebFrameLoaderClient::didCommitLoad), so we can reset m_pageScaleFactor.
* UIProcess/WebPageProxy.h:
(WebPageProxy): Add frameLoadType parameter to didCommitLoadForFrame.
* UIProcess/WebPageProxy.messages.in: Add frameLoadType parameter to didCommitLoadForFrame.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad): Pass frameLoadType parameter to didCommitLoadForFrame.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp