Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b46c0917d14d731f9e1792e262acd4ea47d34562
https://github.com/WebKit/WebKit/commit/b46c0917d14d731f9e1792e262acd4ea47d34562
Author: Taher Ali <[email protected]>
Date: 2026-04-14 (Tue, 14 Apr 2026)
Changed paths:
A
LayoutTests/compositing/overflow/scroll-container-background-with-composited-child-expected.html
A
LayoutTests/compositing/overflow/scroll-container-background-with-composited-child.html
M Source/WebCore/rendering/RenderLayerBacking.cpp
Log Message:
-----------
Scroll container with composited child paints background twice
https://bugs.webkit.org/show_bug.cgi?id=311738
rdar://171024685
Reviewed by Simon Fraser.
When a scroll container has a background and a composited child, the
background color is painted twice. Once in the layer's bitmap and
once in a contents color sublayer.
The fix skips creating the contents color sublayer for scroll containers,
since their bitmap already paints the background.
User impact: This was visible on sites like etsy.com where checkout and
edit modal dialogs use a semi-transparent scrollable overlay with composited
children. The overlay background would appear noticeably darker than
intended, then flash to the correct shade when children de-composite.
Test:
compositing/overflow/scroll-container-background-with-composited-child.html
*
LayoutTests/compositing/overflow/scroll-container-background-with-composited-child-expected.html:
Added.
*
LayoutTests/compositing/overflow/scroll-container-background-with-composited-child.html:
Added.
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer const):
Canonical link: https://commits.webkit.org/311198@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications