RESOLVED FIXED 61700
Need WebKit2 API to get the size of the render tree
https://bugs.webkit.org/show_bug.cgi?id=61700
Summary Need WebKit2 API to get the size of the render tree
Beth Dakin
Reported 2011-05-28 21:06:18 PDT
<rdar://problem/9512733> We need a WebKit 2 API to get the size of the render tree. Patch forthcoming.
Attachments
Patch (9.25 KB, patch)
2011-05-28 21:12 PDT, Beth Dakin
no flags
Beth Dakin
Comment 1 2011-05-28 21:12:39 PDT
Created attachment 95280 [details] Patch Right now this is set up to send the updated render tree size to the UI process in every FrameView::performPostLayoutTasks(). Then the value is cached in the UIProcess. While convenient, we may want to improve on this later to avoid sending so many messages. In the meantime, this does not have any measurable affect on performance.
Simon Fraser (smfr)
Comment 2 2011-05-28 21:19:13 PDT
Comment on attachment 95280 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=95280&action=review > Source/WebCore/page/ChromeClient.h:328 > + virtual void setRenderTreeSize(size_t) { } 'size' is ambiguous: memory use, renderer count? A more explicit name would help. > Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp:801 > + m_page->send(Messages::WebPageProxy::SetRenderTreeSize(treeSize)); Is there an existing message that we pass whose payload can be expanded to carry these data?
Beth Dakin
Comment 3 2011-05-28 23:44:20 PDT
(In reply to comment #2) > (From update of attachment 95280 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=95280&action=review > > > Source/WebCore/page/ChromeClient.h:328 > > + virtual void setRenderTreeSize(size_t) { } > > 'size' is ambiguous: memory use, renderer count? A more explicit name would help. > I'll think on this. > > Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp:801 > > + m_page->send(Messages::WebPageProxy::SetRenderTreeSize(treeSize)); > > Is there an existing message that we pass whose payload can be expanded to carry these data? We could be mistaken (must consult Sam or Anders), but Geoff and I think CoreIPC automatically bundles small messages into one bigger message.
Darin Adler
Comment 4 2011-05-29 11:10:13 PDT
Comment on attachment 95280 [details] Patch Patch looks fine. No obvious better terminology to use beyond “render tree size”. I could imagine more-abstract names or more-concrete names.
Darin Adler
Comment 5 2011-05-29 11:13:18 PDT
Comment on attachment 95280 [details] Patch Clearing flags on attachment: 95280 Committed r87638: <http://trac.webkit.org/changeset/87638>
Darin Adler
Comment 6 2011-05-29 11:13:22 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 7 2011-05-29 12:02:46 PDT
Half the patch wasn’t landed the first time. Committed the other half as r87639: <http://trac.webkit.org/changeset/87639>
Sam Weinig
Comment 8 2011-05-29 14:25:16 PDT
> We could be mistaken (must consult Sam or Anders), but Geoff and I think CoreIPC automatically bundles small messages into one bigger message. CoreIPC doesn't have this functionality. All messages get a mach message.
Note You need to log in before you can comment on or make changes to this bug.