Add WKPage API to get whether the main frame is pinned to the top or bottom edge
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2012 20:30:38 +0000 (20:30 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2012 20:30:38 +0000 (20:30 +0000)
commit8565bfc1539ea2b59a2c60b6f091bdee58a745b6
tree3a0e6af6d26976cd75aeb02a92e36d85d216182b
parente76ff319d3a84badac55d65555d1e299e485f73a
Add WKPage API to get whether the main frame is pinned to the top or bottom edge
https://bugs.webkit.org/show_bug.cgi?id=99110

Reviewed by NOBODY (OOPS!).

This is very similar to r79025 where we add support to do this for the left and right sides.

* UIProcess/API/C/WKPage.cpp:
(WKPageIsPinnedToTopSide):
(WKPageIsPinnedToBottomSide):
* UIProcess/API/C/WKPage.h:
Add new API calls.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::processDidCrash):
(WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isPinnedToTopSide):
(WebKit::WebPageProxy::isPinnedToBottomSide):
Declare new data members for keeping track of the pinned states for
top and bottom sides. Initialize, reset, and update these states
at appropriate times. Implement getters for these states.

* UIProcess/WebPageProxy.messages.in:
Change the DidChangeScrollOffsetPinningForMainFrame message to take
the pinned states for top and bottom sides.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::didChangeScrollOffsetForMainFrame):
* WebProcess/WebPage/WebPage.h:
Cache the pinned states for top and bottom sides. Only notify the
UI process if the states have changed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Source/WebKit2/UIProcess/API/C/WKPage.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h