Bug 209107 - Share HitTestResult::addNodeToListBasedTestResult() impl for LayoutRect and FloatRect overloads
Summary: Share HitTestResult::addNodeToListBasedTestResult() impl for LayoutRect and F...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks: 209110
  Show dependency treegraph
 
Reported: 2020-03-14 10:31 PDT by Daniel Bates
Modified: 2020-03-14 12:20 PDT (History)
7 users (show)

See Also:


Attachments
Patch (3.96 KB, patch)
2020-03-14 10:46 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2020-03-14 10:31:39 PDT
There are two overloads HitTestResult::addNodeToListBasedTestResult(): one for LayoutRect and one for FloatRect. Maybe one of the overloads is not necessary. I don't know, yet, but the implementation of these overloads are identical. As a first step towards future simplifications let's share the implementation and thus remove duplication.
Comment 1 Daniel Bates 2020-03-14 10:46:25 PDT
Created attachment 393585 [details]
Patch
Comment 2 Daniel Bates 2020-03-14 10:48:25 PDT
Comment on attachment 393585 [details]
Patch

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

> Source/WebCore/rendering/HitTestResult.h:152
> +    template<typename RectType> HitTestProgress addNodeToListBasedTestResultCommon(Node*, const HitTestRequest&, const HitTestLocation&, const RectType&);

Could also make node const....I'll try and maybe fold it into this patch.
Comment 3 Daniel Bates 2020-03-14 10:50:38 PDT
Comment on attachment 393585 [details]
Patch

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

>> Source/WebCore/rendering/HitTestResult.h:152
>> +    template<typename RectType> HitTestProgress addNodeToListBasedTestResultCommon(Node*, const HitTestRequest&, const HitTestLocation&, const RectType&);
> 
> Could also make node const....I'll try and maybe fold it into this patch.

Actually, I am not going to do this in this patch as I would need to fix up more things....
Comment 4 Daniel Bates 2020-03-14 11:59:21 PDT
Thanks for the review!
Comment 5 Daniel Bates 2020-03-14 12:01:52 PDT
Comment on attachment 393585 [details]
Patch

Clearing flags on attachment: 393585

Committed r258468: <https://trac.webkit.org/changeset/258468>
Comment 6 Daniel Bates 2020-03-14 12:01:53 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2020-03-14 12:02:14 PDT
<rdar://problem/60457690>