Title: [87638] trunk/Source/WebKit2
- Revision
- 87638
- Author
- [email protected]
- Date
- 2011-05-29 11:13:14 -0700 (Sun, 29 May 2011)
Log Message
2011-05-29 Beth Dakin <[email protected]>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=61700
Need WebKit2 API to get the size of the render tree
-and corresponding-
<rdar://problem/9512733>
* UIProcess/API/C/WKPage.cpp:
(WKPageGetRenderTreeSize):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::renderTreeSize):
(WebKit::WebPageProxy::setRenderTreeSize):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::setRenderTreeSize):
* WebProcess/WebCoreSupport/WebChromeClient.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (87637 => 87638)
--- trunk/Source/WebKit2/ChangeLog 2011-05-29 18:03:30 UTC (rev 87637)
+++ trunk/Source/WebKit2/ChangeLog 2011-05-29 18:13:14 UTC (rev 87638)
@@ -1,3 +1,23 @@
+2011-05-29 Beth Dakin <[email protected]>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=61700
+ Need WebKit2 API to get the size of the render tree
+ -and corresponding-
+ <rdar://problem/9512733>
+
+ * UIProcess/API/C/WKPage.cpp:
+ (WKPageGetRenderTreeSize):
+ * UIProcess/API/C/WKPage.h:
+ * UIProcess/WebPageProxy.h:
+ (WebKit::WebPageProxy::renderTreeSize):
+ (WebKit::WebPageProxy::setRenderTreeSize):
+ * UIProcess/WebPageProxy.messages.in:
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ (WebKit::WebChromeClient::setRenderTreeSize):
+ * WebProcess/WebCoreSupport/WebChromeClient.h:
+
2011-05-29 Darin Adler <[email protected]>
Reviewed by Anders Carlsson and Simon Fraser.
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (87637 => 87638)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp 2011-05-29 18:03:30 UTC (rev 87637)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp 2011-05-29 18:13:14 UTC (rev 87638)
@@ -171,6 +171,11 @@
return toAPI(toImpl(pageRef)->frameSetLargestFrame());
}
+uint64_t WKPageGetRenderTreeSize(WKPageRef page)
+{
+ return toImpl(page)->renderTreeSize();
+}
+
#if defined(ENABLE_INSPECTOR) && ENABLE_INSPECTOR
WKInspectorRef WKPageGetInspector(WKPageRef pageRef)
{
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.h (87637 => 87638)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.h 2011-05-29 18:03:30 UTC (rev 87637)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.h 2011-05-29 18:13:14 UTC (rev 87638)
@@ -299,6 +299,8 @@
WK_EXPORT WKFrameRef WKPageGetFrameSetLargestFrame(WKPageRef page);
WK_EXPORT double WKPageGetEstimatedProgress(WKPageRef page);
+WK_EXPORT uint64_t WKPageGetRenderTreeSize(WKPageRef page);
+
WK_EXPORT void WKPageSetMemoryCacheClientCallsEnabled(WKPageRef page, bool memoryCacheClientCallsEnabled);
#if defined(ENABLE_INSPECTOR) && ENABLE_INSPECTOR
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (87637 => 87638)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2011-05-29 18:03:30 UTC (rev 87637)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2011-05-29 18:13:14 UTC (rev 87638)
@@ -530,6 +530,8 @@
// FIXME: This is in violation of the no synchronous messages to the Web Process policy and
// should be removed as soon as possible.
PassRefPtr<WebImage> createSnapshotOfVisibleContent();
+
+ uint64_t renderTreeSize() const { return m_renderTreeSize; }
private:
WebPageProxy(PageClient*, PassRefPtr<WebProcessProxy>, WebPageGroup*, uint64_t pageID);
@@ -755,6 +757,8 @@
void scheduleChildWindowGeometryUpdate(const WindowGeometry&);
#endif
+ void setRenderTreeSize(uint64_t treeSize) { m_renderTreeSize = treeSize; }
+
PageClient* m_pageClient;
WebLoaderClient m_loaderClient;
WebPolicyClient m_policyClient;
@@ -884,6 +888,8 @@
WebCore::IntRect m_visibleScrollerThumbRect;
+ uint64_t m_renderTreeSize;
+
static WKPageDebugPaintFlags s_debugPaintFlags;
};
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (87637 => 87638)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2011-05-29 18:03:30 UTC (rev 87637)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2011-05-29 18:13:14 UTC (rev 87638)
@@ -41,6 +41,7 @@
TakeFocus(uint32_t direction)
FocusedFrameChanged(uint64_t frameID)
FrameSetLargestFrameChanged(uint64_t frameID)
+ SetRenderTreeSize(uint64_t treeSize)
SetToolbarsAreVisible(bool toolbarsAreVisible)
GetToolbarsAreVisible() -> (bool toolbarsAreVisible)
SetMenuBarIsVisible(bool menuBarIsVisible);
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (87637 => 87638)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2011-05-29 18:03:30 UTC (rev 87637)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2011-05-29 18:13:14 UTC (rev 87638)
@@ -796,4 +796,9 @@
m_page->send(Messages::WebPageProxy::NumWheelEventHandlersChanged(count));
}
+void WebChromeClient::setRenderTreeSize(size_t treeSize)
+{
+ m_page->send(Messages::WebPageProxy::SetRenderTreeSize(treeSize));
+}
+
} // namespace WebKit
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h (87637 => 87638)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h 2011-05-29 18:03:30 UTC (rev 87637)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h 2011-05-29 18:13:14 UTC (rev 87638)
@@ -226,6 +226,8 @@
virtual void numWheelEventHandlersChanged(unsigned);
+ virtual void setRenderTreeSize(size_t);
+
String m_cachedToolTip;
mutable RefPtr<WebFrame> m_cachedFrameSetLargestFrame;
mutable bool m_cachedMainFrameHasHorizontalScrollbar;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes