Bug 11461 - HitTestResult should be split into HitTestRequest and HitTestResult
Summary: HitTestResult should be split into HitTestRequest and HitTestResult
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Beth Dakin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-30 13:06 PST by Beth Dakin
Modified: 2006-10-31 13:57 PST (History)
0 users

See Also:


Attachments
Creates a struct for the request (56.71 KB, patch)
2006-10-30 13:10 PST, Beth Dakin
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Beth Dakin 2006-10-30 13:06:36 PST
The boolean member variables of HitTestResult (readonly, active, and mouseMove) are not a part of the RESULT of the hit test. Rather, they are more like conditions for conducting the hit test. So it does not really make sense that they are part of the HitTestResult class.
Comment 1 Beth Dakin 2006-10-30 13:10:34 PST
Created attachment 11289 [details]
Creates a struct for the request

The thing that I dislike about this patch is that it adds a new boolean parameter to all of the nodeAtPoint()s. The only nodeAtPoint() implementation to use any of the fields of HitTestRequst is RenderFrameSet::nodeAtPoint() which asks about readonly. So instead of sending the entire HitTestRequest into all of the nodeAtPoint()s, I just sent the readonly value. I wish I didn't have to do that since no one else needs it, but it doesn't seem like there is another way. Or is there??
Comment 2 Maciej Stachowiak 2006-10-31 11:27:16 PST
Comment on attachment 11289 [details]
Creates a struct for the request

 I'd suggest passing the whole HitTestRequest to the nodeAtPoint methods even though they only need the one bool, just for consistency

r=me either way
Comment 3 Beth Dakin 2006-10-31 13:57:35 PST
Committed with r17494.