Re: [webkit-dev] How to interrupt Webkit Dump Render Tree output

2009-06-11 Thread Lucius Fox
On Wed, Jun 10, 2009 at 1:58 PM, tonikitoo (Antonio Gomes) wrote: > On Mon, Jun 1, 2009 at 1:31 PM, Simon Fraser wrote: >> There is a method on RenderObject to get the correct absolute coordinates of >> the renderer, which correctly takes transforms, scrolling etc into account: >> RenderObject::loc

Re: [webkit-dev] How to interrupt Webkit Dump Render Tree output

2009-06-10 Thread tonikitoo (Antonio Gomes)
On Mon, Jun 1, 2009 at 1:31 PM, Simon Fraser wrote: > There is a method on RenderObject to get the correct absolute coordinates of > the renderer, which correctly takes transforms, scrolling etc into account: > RenderObject::localToAbsolute(). This is not a trivial problem. localToAbsolute() is on

Re: [webkit-dev] How to interrupt Webkit Dump Render Tree output

2009-06-01 Thread Simon Fraser
There is a method on RenderObject to get the correct absolute coordinates of the renderer, which correctly takes transforms, scrolling etc into account: RenderObject::localToAbsolute(). This is not a trivial problem. There are APIs exposed to JavaScript for this too: the offsetParent/ offs

Re: [webkit-dev] How to interrupt Webkit Dump Render Tree output

2009-06-01 Thread Lucius Fox
Thank you. So to get absolute co-ordinates of each Render Object, I need to do something like: int absolute_x = 0; int absolute_y = 0; parent = renderObject.getParent() while (parent != RenderBody) { absolute_x += parent.getX(); absolute_y += parent.getY(); } Is that right? Thank y

Re: [webkit-dev] How to interrupt Webkit Dump Render Tree output

2009-05-31 Thread Darin Adler
Coordinates in DumpRenderTree output are relative to the containing block, not absolute. -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

[webkit-dev] How to interrupt Webkit Dump Render Tree output

2009-05-30 Thread Lucius Fox
I load www.google.com in WebKit and Dump Render Tree output. Here is the part of the output: But I don't understand is the y co-coordinate output. The 'Language Tools' y co-coordinate is 22. And the ' the web' y co-coordinate is 2. But visually, the text 'the web' is BELOW 'Language Tools', so wh