Bug 101590

Summary: HitTestResult should not be a HitTestLocation
Product: WebKit Reporter: Allan Sandfeld Jensen <allan.jensen>
Component: Layout and RenderingAssignee: Allan Sandfeld Jensen <allan.jensen>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, jchaffraix, ojan, webkit.review.bot
Priority: P2    
Version: 420+   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 98139    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch sam: review+

Description Allan Sandfeld Jensen 2012-11-08 04:48:15 PST
Currently HitTestResult inherits from HitTestLocation because the two classes used to be one. Conceptually the HitTestResult is not a HitTestLocation though since it representation as a point is merely where the hit test was original started.
Comment 1 Allan Sandfeld Jensen 2012-11-21 02:46:17 PST
Created attachment 175394 [details]
Patch
Comment 2 Allan Sandfeld Jensen 2012-11-21 08:02:50 PST
Created attachment 175449 [details]
Patch
Comment 3 Ojan Vafai 2012-11-21 09:09:04 PST
Comment on attachment 175449 [details]
Patch

I don't see the problem with HitTestResult being a HitTestLocation. Is there an eventual goal here that making this change enables?
Comment 4 Allan Sandfeld Jensen 2012-11-21 09:25:12 PST
(In reply to comment #3)
> (From update of attachment 175449 [details])
> I don't see the problem with HitTestResult being a HitTestLocation. Is there an eventual goal here that making this change enables?

The goal of this patch is only to clean up the code, but for the patch for bug #95204, it will greatly help to be able to be able to change how HitTestResult tracks point data, and which location data it stores.

Note HitTestLocation and HitTestResult are already used for very different things.
The only reason HitTestResult was kept as a HitTestLocation is because a few hit-test APIs still only take a HitTestResult as an input, and therefore needs to extract the HitTestLocation to begin at from HitTestResult. They can still do that after this change though, in fact they remain unchanged and still use the HitTestResult::hitTestLocation() method.
Comment 5 Allan Sandfeld Jensen 2012-11-26 05:55:07 PST
Committed r135710: <http://trac.webkit.org/changeset/135710>