Commit 5c43b871 authored by mjs@apple.com's avatar mjs@apple.com
Browse files

2011-01-25 Maciej Stachowiak <mjs@apple.com>

        Reviewed by Anders Carlsson.

        Improve scale factor resetting
        https://bugs.webkit.org/show_bug.cgi?id=53093
        
        Two key changes:
        - Don't set the scale factor to what it already is, as this causes an
        uneeded force layout and scroll
        - Don't ever set the scale factor based on a non-main frame committing
        
        This fixes two WebKit2 layout tests.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6fefd21f
2011-01-25 Maciej Stachowiak <mjs@apple.com>
Reviewed by Anders Carlsson.
Improve scale factor resetting
https://bugs.webkit.org/show_bug.cgi?id=53093
Two key changes:
- Don't set the scale factor to what it already is, as this causes an
uneeded force layout and scroll
- Don't ever set the scale factor based on a non-main frame committing
This fixes two WebKit2 layout tests.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
2011-01-24 Chris Marrin <cmarrin@apple.com>
 
Reviewed by Eric Seidel.
......@@ -430,14 +430,11 @@ void WebFrameLoaderClient::dispatchDidCommitLoad()
webPage->send(Messages::WebPageProxy::DidCommitLoadForFrame(m_frame->frameID(), response.mimeType(), m_frameHasCustomRepresentation, PlatformCertificateInfo(response), InjectedBundleUserMessageEncoder(userData.get())));
// Restore the page scale factor.
double newPageScaleFactor = m_frame->coreFrame()->pageScaleFactor();
// Only restore the scale factor for standard frame loads (of the main frame).
if (m_frame->isMainFrame() && m_frame->coreFrame()->loader()->loadType() == FrameLoadTypeStandard)
newPageScaleFactor = 1.0;
webPage->scaleWebView(newPageScaleFactor, IntPoint());
if (m_frame->isMainFrame() && m_frame->coreFrame()->loader()->loadType() == FrameLoadTypeStandard) {
if (m_frame->coreFrame()->pageScaleFactor() != 1.0)
webPage->scaleWebView(1.0, IntPoint());
}
}
void WebFrameLoaderClient::dispatchDidFailProvisionalLoad(const ResourceError& error)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment