WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
92367
Move region from HitTestResult to HitTestPoint
https://bugs.webkit.org/show_bug.cgi?id=92367
Summary
Move region from HitTestResult to HitTestPoint
Allan Sandfeld Jensen
Reported
2012-07-26 04:42:00 PDT
HitTestResult currently keeps track of a region in which the current hit-test is being performed, but the region is not really specific to the result, and is more closely tied to the current point being tested, therefore it makes more sense to store the region in the HitTestPoint instead of the HitTestResult. The also makes it possible to get rid of setRegion() since it was only used to override and restore the original region in HitTestResult, since a new HitTestPoint is made when descending into a new region, this save/restore mechanic is no longer necessary, and region can be made a constant in HitTestPoint.
Attachments
Patch
(16.42 KB, patch)
2012-07-26 04:45 PDT
,
Allan Sandfeld Jensen
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Allan Sandfeld Jensen
Comment 1
2012-07-26 04:45:58 PDT
Created
attachment 154610
[details]
Patch
Antonio Gomes
Comment 2
2012-07-26 07:33:06 PDT
Comment on
attachment 154610
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=154610&action=review
r=me
> Source/WebCore/rendering/HitTestResult.cpp:107 > +HitTestPoint::HitTestPoint(const HitTestPoint& other, const LayoutSize& offset, RenderRegion* region) > + : m_point(other.m_point) > + , m_boundingBox(other.m_boundingBox) > + , m_transformedPoint(other.m_transformedPoint) > + , m_transformedRect(other.m_transformedRect) > + , m_region(region)
I wonder who owns this point. Can it be deleted elsewhere, and we get garbage here?
Antonio Gomes
Comment 3
2012-07-26 07:34:00 PDT
> > I wonder who owns this point. Can it be deleted elsewhere, and we get garbage here?
s/point/pointer/g
Allan Sandfeld Jensen
Comment 4
2012-07-26 08:22:30 PDT
(In reply to
comment #2
)
> (From update of
attachment 154610
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=154610&action=review
> > r=me > > > Source/WebCore/rendering/HitTestResult.cpp:107 > > +HitTestPoint::HitTestPoint(const HitTestPoint& other, const LayoutSize& offset, RenderRegion* region) > > + : m_point(other.m_point) > > + , m_boundingBox(other.m_boundingBox) > > + , m_transformedPoint(other.m_transformedPoint) > > + , m_transformedRect(other.m_transformedRect) > > + , m_region(region) > > I wonder who owns this point. Can it be deleted elsewhere, and we get garbage here?
It is owned by whoever created it, in this case in it just exists on the stack where it is created in renderflowthread, and is deleted automatically when that function returns.
WebKit Review Bot
Comment 5
2012-07-26 09:15:51 PDT
Comment on
attachment 154610
[details]
Patch Clearing flags on attachment: 154610 Committed
r123754
: <
http://trac.webkit.org/changeset/123754
>
WebKit Review Bot
Comment 6
2012-07-26 09:15:55 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug