Bug 101590 - HitTestResult should not be a HitTestLocation
Summary: HitTestResult should not be a HitTestLocation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Allan Sandfeld Jensen
URL:
Keywords:
Depends on: 98139
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-08 04:48 PST by Allan Sandfeld Jensen
Modified: 2012-11-26 05:55 PST (History)
4 users (show)

See Also:


Attachments
Patch (6.85 KB, patch)
2012-11-21 02:46 PST, Allan Sandfeld Jensen
no flags Details | Formatted Diff | Diff
Patch (6.86 KB, patch)
2012-11-21 08:02 PST, Allan Sandfeld Jensen
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>