[webkit-help] Howto Calculate x, y points for GraphicsContext::drawFocusRing()
Vivek Satpute
vivekonline86 at gmail.com
Wed Feb 10 04:14:47 PST 2010
Hi,
I started GtkLauncher program and it has loaded a webpage which have many
links to other webpages. If I click on any link, then webkit calls
RenderInline::addFocusRingRects() function before calling
GraphicsContext::drawFocusRing().
If I am not making any mistake, RenderInline::addFocusRingRects() functions
decides the
(rect_x, rect_y, width, height) parameters to draw a dotted rectangle around
the link.
My question is, If I have link "News" on webpage. So, if I click on
character i.e. N, e, w or s
of link "News", my clicked point (x, y) changes. That (x, y) I get in
webkit_web_view_button_press_event()
in variable *GdkEventButton* event*. Even if clicked location (x, y)
changes, the (rect_x, rect_y) point
of Rectangle (which is to be drawn over link) always remains same for same
link "News".
So, how this is achieved in webkit? How webkit decides (rec_x, rect_y)
co-ordinate of Rectangle (to be drawn
around link) from clicked co-ordinated (x, y) in *GdkEventButton* event ?
*Actually, I want to increase active area of links, in such a way that event
if I clicked below the link,
(i.e. not exactly over the link) the nearer link should get selected and
gets loaded. Right now, I have
to click exactly over the link.
*
*Thanks in advance,
Vivek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20100210/89ff895f/attachment-0001.html>
More information about the webkit-help
mailing list