WebKit2: Need a way to get a snapshot of the visible contents of a page from the...
authorjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Apr 2011 17:43:39 +0000 (17:43 +0000)
committerjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Apr 2011 17:43:39 +0000 (17:43 +0000)
commit3598a12dd7851d2621ed8639e373b1a2e71dff3e
tree8de3f5811e49c53e29ccae9d1ec25e682a79ba2b
parent0836a97808cfc17212730c503698cf7e8ff70821
WebKit2: Need a way to get a snapshot of the visible contents of a page from the UI Process.
https://bugs.webkit.org/show_bug.cgi?id=59035

Reviewed by Sam Weinig.

Added a sync call from the UI Process to the Web Process with comments saying that it should
be removed as soon as possible.

* UIProcess/API/C/WKPage.cpp:
(WKPageVisibleContentsSnapshot):
* UIProcess/API/C/WKPagePrivate.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::createSnapshotOfVisibleContent):
* UIProcess/WebPageProxy.h:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createSnapshotOfVisibleContent):
Ask the FrameView for the visibleContentRect, and call scaledSnapshotInDocumentCoordinates
with a scale factor of 1 (which preserves the current scaling of the page - e.g. if the
page is already zoomed then the snapshot will reflect the zoomed content).
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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