[webkit-changes] [WebKit/WebKit] a74c01: Border doesn't show when linear gradient and borde...
Simon Fraser
noreply at github.com
Fri Jan 17 21:52:56 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a74c01d2221ac24385491ae159d42d52fae3210f
https://github.com/WebKit/WebKit/commit/a74c01d2221ac24385491ae159d42d52fae3210f
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2025-01-17 (Fri, 17 Jan 2025)
Changed paths:
A LayoutTests/fast/backgrounds/opaque-background-bleed-avoidance-expected.html
A LayoutTests/fast/backgrounds/opaque-background-bleed-avoidance.html
M Source/WebCore/rendering/BackgroundPainter.cpp
M Source/WebCore/rendering/RenderBox.cpp
Log Message:
-----------
Border doesn't show when linear gradient and border radius are set
https://bugs.webkit.org/show_bug.cgi?id=285300
rdar://142617573
Reviewed by Alan Baradlay.
The BleedAvoidance::BackgroundOverBorder logic fixes edge antialiasing issues by painting the border first,
and then painting a clipped background over the top. This worked for solid color backgrounds, where
`BackgroundPainter::paintFillLayer()` filled the inner shape, but did not work for opaque image backgrounds
(like opaque gradients, or opaque images like JPEG). To fix that, we need to clip to the padding box before
painting the background.
* LayoutTests/fast/backgrounds/opaque-background-bleed-avoidance-expected.html: Added.
* LayoutTests/fast/backgrounds/opaque-background-bleed-avoidance.html: Added.
* Source/WebCore/rendering/BackgroundPainter.cpp:
(WebCore::BackgroundPainter::paintFillLayer const):
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::determineBleedAvoidance const):
Canonical link: https://commits.webkit.org/289101@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list