Bug 24313 - hitTest() on a single line input only works through happenstance.
Summary: hitTest() on a single line input only works through happenstance.
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.5
: P2 Normal
Assignee: Simon Fraser (smfr)
Depends on:
Blocks: 24312
  Show dependency treegraph
Reported: 2009-03-02 20:09 PST by Simon Fraser (smfr)
Modified: 2009-03-02 22:16 PST (History)
1 user (show)

See Also:

Patch (1.54 KB, patch)
2009-03-02 21:46 PST, Simon Fraser (smfr)
adele: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2009-03-02 20:09:20 PST
Hit testing on a RenderTextControlSingleLine seems to work only because of a side-effect of HitTestResult behavior.

What I see happening is this.
RenderLayer::hitTest calls hitTest() on the renderer, which goes into RenderTextControlSingleLine::nodeAtPoint(). This ends up setting the TextControlInnerTextElement as the innerNode() on the result. However, RenderTextControlSingleLine::nodeAtPoint() then returns false!

So we continue to hit test all the way up to the body. The body's layer ends up being the one hit, but we use the node in the result anyway.

This is hurting my karma. See bug 24312.
Comment 1 Simon Fraser (smfr) 2009-03-02 21:46:48 PST
Created attachment 28212 [details]

I'm pretty sure it was just wrong to test against m_innerBlock, because the superclass could never have set that on the result.
Comment 2 Simon Fraser (smfr) 2009-03-02 22:16:19 PST