Changeset 87638 in webkit


Ignore:
Timestamp:
May 29, 2011 11:13:14 AM (13 years ago)
Author:
Darin Adler
Message:

2011-05-29 Beth Dakin <Beth Dakin>

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:
Location:
trunk/Source/WebKit2
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r87637 r87638  
     12011-05-29  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=61700
     6        Need WebKit2 API to get the size of the render tree
     7        -and corresponding-
     8        <rdar://problem/9512733>
     9
     10        * UIProcess/API/C/WKPage.cpp:
     11        (WKPageGetRenderTreeSize):
     12        * UIProcess/API/C/WKPage.h:
     13        * UIProcess/WebPageProxy.h:
     14        (WebKit::WebPageProxy::renderTreeSize):
     15        (WebKit::WebPageProxy::setRenderTreeSize):
     16        * UIProcess/WebPageProxy.messages.in:
     17        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
     18        (WebKit::WebChromeClient::setRenderTreeSize):
     19        * WebProcess/WebCoreSupport/WebChromeClient.h:
     20
    1212011-05-29  Darin Adler  <darin@apple.com>
    222
  • trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp

    r86584 r87638  
    172172}
    173173
     174uint64_t WKPageGetRenderTreeSize(WKPageRef page)
     175{
     176    return toImpl(page)->renderTreeSize();
     177}
     178
    174179#if defined(ENABLE_INSPECTOR) && ENABLE_INSPECTOR
    175180WKInspectorRef WKPageGetInspector(WKPageRef pageRef)
  • trunk/Source/WebKit2/UIProcess/API/C/WKPage.h

    r86584 r87638  
    300300WK_EXPORT double WKPageGetEstimatedProgress(WKPageRef page);
    301301
     302WK_EXPORT uint64_t WKPageGetRenderTreeSize(WKPageRef page);
     303
    302304WK_EXPORT void WKPageSetMemoryCacheClientCallsEnabled(WKPageRef page, bool memoryCacheClientCallsEnabled);
    303305
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r86812 r87638  
    531531    // should be removed as soon as possible.
    532532    PassRefPtr<WebImage> createSnapshotOfVisibleContent();
     533
     534    uint64_t renderTreeSize() const { return m_renderTreeSize; }
    533535 
    534536private:
     
    756758#endif
    757759
     760    void setRenderTreeSize(uint64_t treeSize) { m_renderTreeSize = treeSize; }
     761
    758762    PageClient* m_pageClient;
    759763    WebLoaderClient m_loaderClient;
     
    885889    WebCore::IntRect m_visibleScrollerThumbRect;
    886890
     891    uint64_t m_renderTreeSize;
     892
    887893    static WKPageDebugPaintFlags s_debugPaintFlags;
    888894};
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in

    r86806 r87638  
    4242    FocusedFrameChanged(uint64_t frameID)
    4343    FrameSetLargestFrameChanged(uint64_t frameID)
     44    SetRenderTreeSize(uint64_t treeSize)
    4445    SetToolbarsAreVisible(bool toolbarsAreVisible)
    4546    GetToolbarsAreVisible() -> (bool toolbarsAreVisible)
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp

    r87421 r87638  
    797797}
    798798
     799void WebChromeClient::setRenderTreeSize(size_t treeSize)
     800{
     801    m_page->send(Messages::WebPageProxy::SetRenderTreeSize(treeSize));
     802}
     803
    799804} // namespace WebKit
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h

    r86806 r87638  
    227227    virtual void numWheelEventHandlersChanged(unsigned);
    228228
     229    virtual void setRenderTreeSize(size_t);
     230
    229231    String m_cachedToolTip;
    230232    mutable RefPtr<WebFrame> m_cachedFrameSetLargestFrame;
Note: See TracChangeset for help on using the changeset viewer.