Bug 85965 - Factor HitTestPoint out of HitTestResult
Summary: Factor HitTestPoint out of HitTestResult
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Allan Sandfeld Jensen
URL:
Keywords:
Depends on:
Blocks: 85792
  Show dependency treegraph
 
Reported: 2012-05-09 01:45 PDT by Allan Sandfeld Jensen
Modified: 2012-05-15 10:40 PDT (History)
12 users (show)

See Also:


Attachments
Patch (19.33 KB, patch)
2012-05-09 01:54 PDT, Allan Sandfeld Jensen
no flags 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-05-09 01:45:47 PDT
In preparation for handling transformations on area-based hit-testing (bug #85792), we need to factor test-point and test-area out of HitTestResult so it can be transformed independently.

To maintain the current API as closely as possible HitTestResult can inherit from HitTestPoint, representing the original untransformed hitTestPoint.
Comment 1 Allan Sandfeld Jensen 2012-05-09 01:54:51 PDT
Created attachment 140886 [details]
Patch
Comment 2 Eric Seidel (no email) 2012-05-09 02:00:00 PDT
I'm not sure I really understand where you're going here. :)  The idea of a "rect-based" point with possible padding is a bit odd to me.  Do you plan to have a second subclass of HitTestPoint?
Comment 3 Allan Sandfeld Jensen 2012-05-09 02:15:34 PDT
(In reply to comment #2)
> I'm not sure I really understand where you're going here. :)  The idea of a "rect-based" point with possible padding is a bit odd to me.  Do you plan to have a second subclass of HitTestPoint?

No, the point can be seen in bug #85792.  The HitTestPoint class, will be used to replace the LayoutPoint argument given to all hit-test classes (usually called hitTestPoint or pointInContainer). So that hit-testing can recurse using the transformed area, and not just the transformed point.
Comment 4 Antonio Gomes 2012-05-09 04:56:27 PDT
Comment on attachment 140886 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=140886&action=review

Ping smfr or hyatt on IRC about reviewing this. Some comments (on a bus but can look more soon)

- HitTestPoint + padding = HitTestTarget? :)

> Source/WebCore/rendering/HitTestResult.cpp:181
> +    m_shadowContentFilterPolicy  = other.shadowContentFilterPolicy();

space

> Source/WebCore/rendering/HitTestResult.h:74
> +private:

make this protected , and make HitTestResult access it directly (it makes the patch a bit smaller)?
Comment 5 Allan Sandfeld Jensen 2012-05-09 05:12:06 PDT
(In reply to comment #4)
> (From update of attachment 140886 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=140886&action=review
> 
> Ping smfr or hyatt on IRC about reviewing this. Some comments (on a bus but can look more soon)
> 
> - HitTestPoint + padding = HitTestTarget? :)
> 
> > Source/WebCore/rendering/HitTestResult.cpp:181
> > +    m_shadowContentFilterPolicy  = other.shadowContentFilterPolicy();
> 
> space
> 
> > Source/WebCore/rendering/HitTestResult.h:74
> > +private:
> 
> make this protected , and make HitTestResult access it directly (it makes the patch a bit smaller)?

Good point, but I was hoping to separate the classes better at a later time, and using accessors instead of internals would help with that.
Comment 6 WebKit Review Bot 2012-05-15 10:40:50 PDT
Comment on attachment 140886 [details]
Patch

Clearing flags on attachment: 140886

Committed r117091: <http://trac.webkit.org/changeset/117091>
Comment 7 WebKit Review Bot 2012-05-15 10:40:55 PDT
All reviewed patches have been landed.  Closing bug.