[Webkit-unassigned] [Bug 40197] Enhance the hit testing to take a rectangle instead of a point

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 11 09:23:08 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=40197





--- Comment #15 from Antonio Gomes (tonikitoo) <tonikitoo at webkit.org>  2010-06-11 09:23:04 PST ---
(In reply to comment #11)
> I like the point padding approach (Grace's patch), mainly because it's very minimally intrusive, and it lets the code read in such a way that someone just looking at point-based hit testing doesn't get confused by the "area' terminology.
> 
> Both patches seem to be using Vector node lists to collect the nodes.  It seems like a HashSet would be better to avoid crawling the list looking for the Node before adding it.

> By the way, one caveat with collecting multiple nodes is that you may need to distinguish between hit test layers (e.g., background of one element vs. foreground of another).  If I'm understanding this right, the patches just collect the nodes and don't really distinguish between a foreground hit and a background hit.  I suspect that information may end up being needed but am not sure.

About hyatt's suggestion, I have one concern: by using a Vector we
have for free the z-order (background elements are hittest'ed before foreground nes- see RenderLayer::hitTestLayer). With a hash we would gain performance on adding a new node to the rawNodeList, since we would not need to traverse it to verify if it has been already added, but lose the order.

@hyatt, please correct if I am wrong.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list