[wk2] Scroll pinning state is wrong until the first scroll event

https://bugs.webkit.org/show_bug.cgi?id=127437

Reviewed by Simon Fraser.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::didChangeScrollOffset):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updateMainFrameScrollOffsetPinning):
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
Rename WebPage::didChangeScrollOffsetForMainFrame to
updateMainFrameScrollOffsetPinning, which better describes what it
actually does. Call it when a load is committed, so that we have valid
pinning state before the first scroll event comes in.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 332743e3
2014-01-22 Tim Horton <timothy_horton@apple.com>
[wk2] Scroll pinning state is wrong until the first scroll event
https://bugs.webkit.org/show_bug.cgi?id=127437
Reviewed by Simon Fraser.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::didChangeScrollOffset):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updateMainFrameScrollOffsetPinning):
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
Rename WebPage::didChangeScrollOffsetForMainFrame to
updateMainFrameScrollOffsetPinning, which better describes what it
actually does. Call it when a load is committed, so that we have valid
pinning state before the first scroll event comes in.
2014-01-22 Anders Carlsson <andersca@apple.com>
Add WKWebViewConfiguration class
......
......@@ -1551,7 +1551,7 @@ void WebFrameLoaderClient::didChangeScrollOffset()
if (!m_frame->coreFrame()->view())
return;
webPage->didChangeScrollOffsetForMainFrame();
webPage->updateMainFrameScrollOffsetPinning();
}
bool WebFrameLoaderClient::allowScript(bool enabledPerSettings)
......
......@@ -3004,7 +3004,7 @@ void WebPage::clearSelection()
m_page->focusController().focusedOrMainFrame().selection().clear();
}
void WebPage::didChangeScrollOffsetForMainFrame()
void WebPage::updateMainFrameScrollOffsetPinning()
{
Frame& frame = m_page->mainFrame();
IntPoint scrollPosition = frame.view()->scrollPosition();
......@@ -3953,6 +3953,8 @@ void WebPage::didCommitLoad(WebFrame* frame)
#endif
WebProcess::shared().updateActivePages();
updateMainFrameScrollOffsetPinning();
}
void WebPage::didFinishLoad(WebFrame* frame)
......
......@@ -581,7 +581,7 @@ public:
void setMediaVolume(float);
void setMayStartMediaWhenInWindow(bool);
void didChangeScrollOffsetForMainFrame();
void updateMainFrameScrollOffsetPinning();
void mainFrameDidLayout();
......
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