[webkit-help] Howto Calculate x, y points for GraphicsContext::drawFocusRing()

Vivek Satpute vivekonline86 at gmail.com
Fri Feb 12 01:06:35 PST 2010


Hi Ariya,

On Thu, Feb 11, 2010 at 11:19 PM, Ariya Hidayat <ariya.hidayat at gmail.com>wrote:

> > 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.
>
> I guess this is the reason you asked the endless hit test questions in
> the separate thread?

Yes, you are right.. :-)
Actually I was going step by step and trying to understand the things. But
then I
fell into a very confusing state that I could not even think on it. And
finally I posted
my objective. I would have to do this very early.. I wasted too much time.

> If only you would have told us your objective
> before...
>
> There are tons of ways to do that. Two I can think of:
>
> (1) Find all links in the page and calculate the distance to your
> click position. Pick the nearest one (or whatever algorithm you use).
>
> How to find all the links on a webpage ?

> (2) "Probe" in the vicinity of your click position for any presence of
> others links. An example I show in
> http://labs.trolltech.com/blogs/2009/06/06/qwebview-snap-scrolling/
> does the same, albeit for any type of elements instead of only links.
>
> Thanks for this but could you please point out me to the exact location
where you are
achieving this in snapping code ? And the snapping code seems to be use Qt
APIs, so
is it possible to implement my objective inside webkit code by modifying few
things in
hitTest or some other similar function ?

Regards,
Vivek

>
>
> Regards,
>
> --
> Ariya Hidayat
> http://www.linkedin.com/in/ariyahidayat
> _______________________________________________
> webkit-help mailing list
> webkit-help at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20100212/0cf56473/attachment.html>


More information about the webkit-help mailing list