Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 66b092fde2ecd56a0106331d83fcc7569cf18d1b
      
https://github.com/WebKit/WebKit/commit/66b092fde2ecd56a0106331d83fcc7569cf18d1b
  Author: Simon Fraser <[email protected]>
  Date:   2026-05-06 (Wed, 06 May 2026)

  Changed paths:
    A LayoutTests/compositing/hdr/hdr-in-shared-backing-expected.txt
    A LayoutTests/compositing/hdr/hdr-in-shared-backing.html
    M Source/WebCore/rendering/RenderLayerBacking.cpp

  Log Message:
  -----------
  [HDR] Some HDR images on gregbenzphotography.com page flicker to SDR when 
hovered
https://bugs.webkit.org/show_bug.cgi?id=305407
rdar://163382580

Reviewed by Mike Wyrzykowski.

The content on https://gregbenzphotography.com/hdr-gain-map-gallery/ hit the 
"shared backing"
compositing logic (sibling compositing layers drawing into the same backing 
store). The
logic that detects HDR content was broken in this scenario, by failing to 
traverse the
contents of the sharing layers.

Fix by traversing sharing layers in 
`traverseVisibleNonCompositedDescendantLayers()`
as in the order of the backing they are drawing into, rather than their normal
z-order list postion. Opt the contents detection logic into this at
`determineNonCompositedLayerDescendantsPaintedContent()`.

Test: compositing/hdr/hdr-in-shared-backing.html

* LayoutTests/compositing/hdr/hdr-in-shared-backing-expected.txt: Added.
* LayoutTests/compositing/hdr/hdr-in-shared-backing.html: Added.
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::traverseVisibleNonCompositedDescendantLayers):
(WebCore::RenderLayerBacking::determineNonCompositedLayerDescendantsPaintedContent
 const):
(WebCore::RenderLayerBacking::hasVisibleNonCompositedDescendants const):

Canonical link: https://commits.webkit.org/312702@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to