[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
commit-queue at webkit.org
commit-queue at webkit.org
Fri Jan 21 15:02:52 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit a473a3427aa4ba1bc7901452f65b534ed47db121
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jan 6 19:08:43 2011 +0000
2011-01-06 Jeff Miller <jeffm at apple.com>
Reviewed by Darin Adler.
WebKit2: Add APIs to WKBundleFrame to get content bounds and scroll offset
https://bugs.webkit.org/show_bug.cgi?id=51968
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameGetContentBounds):
(WKBundleFrameGetScrollOffset):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
Add WKBundleFrameGetContentBounds() and WKBundleFrameGetScrollOffset().
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 7268236..3dab648 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,16 @@
+2011-01-06 Jeff Miller <jeffm at apple.com>
+
+ Reviewed by Darin Adler.
+
+ WebKit2: Add APIs to WKBundleFrame to get content bounds and scroll offset
+ https://bugs.webkit.org/show_bug.cgi?id=51968
+
+ * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
+ (WKBundleFrameGetContentBounds):
+ (WKBundleFrameGetScrollOffset):
+ * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
+ Add WKBundleFrameGetContentBounds() and WKBundleFrameGetScrollOffset().
+
2011-01-06 James Robinson <jamesr at chromium.org>
Reviewed by Simon Fraser.
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
index 6738565..c93e800 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
@@ -30,6 +30,7 @@
#include "WKBundleAPICast.h"
#include "WebFrame.h"
#include <WebCore/Frame.h>
+#include <WebCore/FrameView.h>
using namespace WebCore;
using namespace WebKit;
@@ -138,3 +139,36 @@ bool WKBundleFrameAllowsFollowingLink(WKBundleFrameRef frameRef, WKURLRef urlRef
{
return toImpl(frameRef)->allowsFollowingLink(WebCore::KURL(WebCore::KURL(), toImpl(urlRef)->string()));
}
+
+WKRect WKBundleFrameGetContentBounds(WKBundleFrameRef frameRef)
+{
+ WKRect contentBounds = { {0, 0}, {0, 0} };
+
+ Frame* coreFrame = toImpl(frameRef)->coreFrame();
+ if (!coreFrame)
+ return contentBounds;
+
+ FrameView* view = coreFrame->view();
+ if (!view)
+ return contentBounds;
+
+ contentBounds.size.width = view->contentsWidth();
+ contentBounds.size.height = view->contentsHeight();
+
+ return contentBounds;
+}
+
+WK_EXPORT WKSize WKBundleFrameGetScrollOffset(WKBundleFrameRef frameRef)
+{
+ WKSize scrollOffset = { 0, 0 };
+
+ Frame* coreFrame = toImpl(frameRef)->coreFrame();
+ if (!coreFrame)
+ return scrollOffset;
+
+ FrameView* view = coreFrame->view();
+ if (!view)
+ return scrollOffset;
+
+ return toAPI(view->scrollOffset());
+}
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h
index 4496b58..e3997f6 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h
@@ -28,6 +28,7 @@
#include <JavaScriptCore/JavaScript.h>
#include <WebKit2/WKBase.h>
+#include <WebKit2/WKGeometry.h>
#ifdef __cplusplus
extern "C" {
@@ -51,6 +52,9 @@ WK_EXPORT WKBundlePageRef WKBundleFrameGetPage(WKBundleFrameRef frame);
WK_EXPORT bool WKBundleFrameAllowsFollowingLink(WKBundleFrameRef frame, WKURLRef url);
+WK_EXPORT WKRect WKBundleFrameGetContentBounds(WKBundleFrameRef frame);
+WK_EXPORT WKSize WKBundleFrameGetScrollOffset(WKBundleFrameRef frame);
+
#ifdef __cplusplus
}
#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list