Bug 209107

Summary: Share HitTestResult::addNodeToListBasedTestResult() impl for LayoutRect and FloatRect overloads
Product: WebKit Reporter: Daniel Bates <dbates>
Component: WebCore Misc.Assignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, esprehn+autocc, ews-watchlist, glenn, kondapallykalyan, pdr, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 209110    
Attachments:
Description Flags
Patch none

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>