Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4a5c967fabbe3a3872d3bad460b5f7d527180fd4
https://github.com/WebKit/WebKit/commit/4a5c967fabbe3a3872d3bad460b5f7d527180fd4
Author: Aditya Keerthi <[email protected]>
Date: 2025-05-09 (Fri, 09 May 2025)
Changed paths:
A
LayoutTests/fast/borders/border-left-system-color-border-bottom-same-resolved-color-expected.html
A
LayoutTests/fast/borders/border-left-system-color-border-bottom-same-resolved-color.html
M Source/WebCore/rendering/BorderEdge.h
Log Message:
-----------
Visible (single-pixel) corner joint when two border sides have the same
resolved color, but only one is a system color
https://bugs.webkit.org/show_bug.cgi?id=292795
rdar://151025313
Reviewed by Simon Fraser and Richard Robinson.
If adjacent border sides have a different color, `BorderPainter` takes a
slightly
more complex painting path to mitre (join at an angle) the sides. In that
scenario,
`BorderPainter` builds and draws a path, as opposed to a simple rect. Even when
used for the same resolved color, the two painting codepaths can therefore
result
in small pixel differences.
When using a system color on one side and an explicitly specified color equal to
the same resolved color on the other, the mitre path is used since
`edgesShareColor`
performs strict `Color` equality. System colors have the "semantic" bit set,
which
means they will never be strictly equal to a non-system color.
Fix by updating `edgesShareColor` to perform color comparison ignoring the
semantic
bit. This ensures the simple painting path is always used when two border sides
have the same resolved color.
*
LayoutTests/fast/borders/border-left-system-color-border-bottom-same-resolved-color-expected.html:
Added.
*
LayoutTests/fast/borders/border-left-system-color-border-bottom-same-resolved-color.html:
Added.
* Source/WebCore/rendering/BorderEdge.h:
(WebCore::edgesShareColor):
Canonical link: https://commits.webkit.org/294741@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes