[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
Wed Jul 7 09:56:38 PDT 2010


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





--- Comment #36 from Simon Fraser (smfr) <simon.fraser at apple.com>  2010-07-07 09:56:37 PST ---
(In reply to comment #35)

> The problem is that in RenderLayer::hitTestContests we have
> 
> bool RenderLayer::hitTestContents(...)
> {
>   if (!renderer()->hitTest(request, result, hitTestPoint,
>                           layerBounds.x() - renderBoxX(),
>                           layerBounds.y() - renderBoxY(), 
>                           hitTestFilter)) {
>       // It's wrong to set innerNode, but then claim that you didn't hit anything.
>       ASSERT(!result.innerNode());
>       return false;
>   }
>   ...
> }
> 
> this ASSERT controverses the rect-based hit test, once we in such mode,  returning 'false' does not necesseraly mean that nothing was hit.
> 
> Would it make sense to modify the assert condition, so we do not hit that?

Well, the question is what does result.innerNode() mean when doing area hit testing? Since you're returning a list of nodes, I don't see why you'd bother with result.innerNode() at all.

So you may need more conditional behavior inside the hit testing code when doing area hit testing.

-- 
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