Bug 227182 - Move rectForPoint() static function out from the HitTestLocation class
Summary: Move rectForPoint() static function out from the HitTestLocation class
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks: 227185 227186
  Show dependency treegraph
 
Reported: 2021-06-19 13:09 PDT by zalan
Modified: 2021-06-20 12:47 PDT (History)
11 users (show)

See Also:


Attachments
Patch (6.58 KB, patch)
2021-06-19 13:13 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (6.74 KB, patch)
2021-06-20 11:39 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2021-06-19 13:09:42 PDT
It should just a static function.
Comment 1 zalan 2021-06-19 13:13:15 PDT
Created attachment 431799 [details]
Patch
Comment 2 Sam Weinig 2021-06-20 09:47:59 PDT
Comment on attachment 431799 [details]
Patch

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

> Source/WebCore/ChangeLog:7
> +

Please add a short why here.

> Source/WebCore/rendering/HitTestLocation.cpp:29
> +    IntPoint actualPoint(flooredIntPoint(point));

Could be slightly nicer by using assignment + auto to avoid stating IntPoint twice. (I do realize you are just moving it, but still).

> Source/WebCore/rendering/HitTestLocation.cpp:37
> +    return IntRect(actualPoint, actualPadding);

This could probably just be return { actualPoint, actualPadding };
Comment 3 Sam Weinig 2021-06-20 09:50:29 PDT
(In reply to Sam Weinig from comment #2)
> Comment on attachment 431799 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=431799&action=review
> 
> > Source/WebCore/ChangeLog:7
> > +
> 
> Please add a short why here.
> 
> > Source/WebCore/rendering/HitTestLocation.cpp:29
> > +    IntPoint actualPoint(flooredIntPoint(point));
> 
> Could be slightly nicer by using assignment + auto to avoid stating IntPoint
> twice. (I do realize you are just moving it, but still).
> 
> > Source/WebCore/rendering/HitTestLocation.cpp:37
> > +    return IntRect(actualPoint, actualPadding);
> 
> This could probably just be return { actualPoint, actualPadding };

I see these change in a subsequent patch, so feel free to ignore.
Comment 4 zalan 2021-06-20 11:39:57 PDT
Created attachment 431822 [details]
Patch
Comment 5 EWS 2021-06-20 12:46:16 PDT
Committed r279057 (238977@main): <https://commits.webkit.org/238977@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 431822 [details].
Comment 6 Radar WebKit Bug Importer 2021-06-20 12:47:25 PDT
<rdar://problem/79540449>