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
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
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
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
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
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
6 matches
Mail list logo