Title: [87646] branches/safari-534-branch/Source/WebKit2

Diff

Modified: branches/safari-534-branch/Source/WebKit2/ChangeLog (87645 => 87646)


--- branches/safari-534-branch/Source/WebKit2/ChangeLog	2011-05-29 20:45:10 UTC (rev 87645)
+++ branches/safari-534-branch/Source/WebKit2/ChangeLog	2011-05-29 20:54:10 UTC (rev 87646)
@@ -1,3 +1,27 @@
+2011-05-29  Mark Rowe  <[email protected]>
+
+        Merge r87638.
+
+    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-28  Mark Rowe  <[email protected]>
 
         Merge r87624.

Modified: branches/safari-534-branch/Source/WebKit2/UIProcess/API/C/WKPage.cpp (87645 => 87646)


--- branches/safari-534-branch/Source/WebKit2/UIProcess/API/C/WKPage.cpp	2011-05-29 20:45:10 UTC (rev 87645)
+++ branches/safari-534-branch/Source/WebKit2/UIProcess/API/C/WKPage.cpp	2011-05-29 20:54:10 UTC (rev 87646)
@@ -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: branches/safari-534-branch/Source/WebKit2/UIProcess/API/C/WKPage.h (87645 => 87646)


--- branches/safari-534-branch/Source/WebKit2/UIProcess/API/C/WKPage.h	2011-05-29 20:45:10 UTC (rev 87645)
+++ branches/safari-534-branch/Source/WebKit2/UIProcess/API/C/WKPage.h	2011-05-29 20:54:10 UTC (rev 87646)
@@ -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: branches/safari-534-branch/Source/WebKit2/UIProcess/WebPageProxy.h (87645 => 87646)


--- branches/safari-534-branch/Source/WebKit2/UIProcess/WebPageProxy.h	2011-05-29 20:45:10 UTC (rev 87645)
+++ branches/safari-534-branch/Source/WebKit2/UIProcess/WebPageProxy.h	2011-05-29 20:54:10 UTC (rev 87646)
@@ -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: branches/safari-534-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in (87645 => 87646)


--- branches/safari-534-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2011-05-29 20:45:10 UTC (rev 87645)
+++ branches/safari-534-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2011-05-29 20:54:10 UTC (rev 87646)
@@ -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: branches/safari-534-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (87645 => 87646)


--- branches/safari-534-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp	2011-05-29 20:45:10 UTC (rev 87645)
+++ branches/safari-534-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp	2011-05-29 20:54:10 UTC (rev 87646)
@@ -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: branches/safari-534-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h (87645 => 87646)


--- branches/safari-534-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h	2011-05-29 20:45:10 UTC (rev 87645)
+++ branches/safari-534-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h	2011-05-29 20:54:10 UTC (rev 87646)
@@ -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

Reply via email to