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

Lucius Fox lucius.fox08 at gmail.com
Mon Jun 1 10:00:54 PDT 2009


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 you.



On Sun, May 31, 2009 at 3:11 PM, Eric Seidel <macdome at gmail.com> wrote:
> To expand Darin's answer:   there are exceptions to the
> relative-to-containing-block rule.  SVG results for example are absolute
> (mostly).  There are also hacks the the DRT output, where we "lie" about
> metrics in order to keep consistent with historical results (to minimize the
> scope of a single patch).  If you're trying to use DRT for anything other
> than testing, you will likely need to fork WebCore's RenderTreeAsText.cpp
> and SVGRenderTreeAsText.cpp substantially to fit your needs.
> -eric
> On Sun, May 31, 2009 at 10:19 AM, Darin Adler <darin at apple.com> wrote:
>>
>> Coordinates in DumpRenderTree output are relative to the containing block,
>> not absolute.
>>
>>    -- Darin
>>
>> _______________________________________________
>> webkit-dev mailing list
>> webkit-dev at lists.webkit.org
>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>


More information about the webkit-dev mailing list