Show more links on mouse over
commit88b02d3d8dfef1c23adab55e9815c08623ceef65
authorDavid Kettler <David.Kettler@dsto.defence.gov.au>
Tue, 28 Oct 2008 18:00:54 +0000 (28 14:00 -0400)
committerJohn Foerch <jjfoerch@earthlink.net>
Tue, 28 Oct 2008 18:00:54 +0000 (28 14:00 -0400)
tree1f060a79f8718c661ef4de18db6429d290141a29
parent86195e32f8bffb892e5235feb792b26efbbad0f4
Show more links on mouse over

Previously only simple links were shown in the echo area when the
mouse was hovered over the link.  Now image links and links containing
formatting will also be shown.

An example where this makes a difference is at the conkeror webgit
http://repo.or.cz/w/conkeror.git.  The git image in the top right
corner is clickable but without this patch it doesn't show the link on
mouseover.

This patch copies the parent chasing code from
element_get_load_spec().  That's more expensive than the previous
code, but I don't notice any performance degradation on my box.

My main concern with the approach though, is that I want a guarantee
that the link I see when I hover is what I'll get when I click.  But
the current code has seperate implementations for these two cases, so
the result may differ.

I considered calling element_get_load_spec() from the event handler,
but it seems rather heavy weight.

I wonder if it's possible to hook in while the DOM is being
constructed and attach the href from an anchor element to its bottom
level child.  And do some of the other cases handled by
element_get_load_spec() at that time too.  Then the simplified
element_get_load_spec() and the mouseover event handler need only
check the element for a href; they will get the same result.
modules/content-buffer.js