Bug 250803 - Improve intersection precision in FloatPoint
Summary: Improve intersection precision in FloatPoint
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-01-18 16:00 PST by Ahmad Saleem
Modified: 2023-01-30 11:15 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-01-18 16:00:47 PST
Hi Team,

While going through Blink's commit, I came cross this interesting commit:

Blink Commit - https://chromium.googlesource.com/chromium/blink/+/4fee9ba6e16e703f282b5460d999ba207842b4ef

WebKit Source - https://searchfox.org/wubkat/source/Source/WebCore/platform/graphics/GeometryUtilities.cpp#56

Should we merge this and whether it will gain any benefit, appreciate if someone can share input?

Thanks!
Comment 1 Ahmad Saleem 2023-01-21 18:56:15 PST
It is inspired from this - https://github.com/servo/skia-snapshots/blob/master/skia/experimental/Intersection/LineIntersection.cpp#L43

as per commentary on Review and also from https://en.wikipedia.org/wiki/Line–line_intersection.

There were three tests requiring baseline after this:

One of them - related to border:

https://jsfiddle.net/nmL1g95c/show

In Safari, we have hairline gaps in Safari 16.2 & STP161 while we don't have those in Chrome Canary 111.
Comment 2 Radar WebKit Bug Importer 2023-01-25 16:01:48 PST
<rdar://problem/104671777>
Comment 3 Myles C. Maxfield 2023-01-27 11:36:38 PST
This seems like a good change.

If we merge it, does it cause any tests to pass? It looks like it caused some Chrome tests to pass for them.
Comment 4 Ahmad Saleem 2023-01-27 14:49:42 PST
(In reply to Myles C. Maxfield from comment #3)
> This seems like a good change.
> 
> If we merge it, does it cause any tests to pass? It looks like it caused
> some Chrome tests to pass for them.

I haven't run it through EWS or any specific test suite but I have it as local testing on my local build since past two days and I tried to look into border radius, border shadow test cases with hairline gaps but it seems that it does not improve anything across them but it is just cleaner code as of right now.

Let me do PR in Draft and see if anything pop-up. Thanks!
Comment 5 EWS 2023-01-30 11:15:44 PST
Committed 259574@main (4ecebb76cee1): <https://commits.webkit.org/259574@main>

Reviewed commits have been landed. Closing PR #9257 and removing active labels.