[webkit-help] understanding nodeAtPoint() function..

Ariya Hidayat ariya.hidayat at gmail.com
Wed Feb 10 04:24:58 PST 2010


> This function gets _x, _y, _tx, _ty paramenters. The parameters _tx and _ty
> are related to LayerBounds. I am not getting what is LayerBounds and in
> subsequent calls of nodeAtPoint(), those _tx , _ty values are getting
> changes.
> How and what is it ?

Layer bounds in that context is the rect of the render layer, IIRC
it's relative to its parent (render) layer.

> In nodeAtPoint(), what is following calculation:
>     int tx = _tx + x();
>     int ty = _ty + y();
>
> and how values of x(), y() are changing in subsequent calls ?

What do you mean that the values are changing? If you mean you see
different values while debugging, that is probably because you are
stepping into the render layer hierarchy, i.e. the offsets are
different because they belong to different layers.



-- 
Ariya Hidayat
http://www.linkedin.com/in/ariyahidayat


More information about the webkit-help mailing list