Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b63b114edafb1fcf440ef17c473a316dc9081c01
      
https://github.com/WebKit/WebKit/commit/b63b114edafb1fcf440ef17c473a316dc9081c01
  Author: Ruthvik Konda <[email protected]>
  Date:   2026-07-01 (Wed, 01 Jul 2026)

  Changed paths:
    A 
LayoutTests/ipc/dynamic-content-scaling-display-list-during-prepare-for-display-expected.txt
    A 
LayoutTests/ipc/dynamic-content-scaling-display-list-during-prepare-for-display.html
    M LayoutTests/platform/visionos/TestExpectations
    M Source/WebKit/GPUProcess/graphics/RemoteImageBufferSet.cpp

  Log Message:
  -----------
  Dynamic content scaling display lists should not be requested while preparing 
for display
https://bugs.webkit.org/show_bug.cgi?id=313460
rdar://174414109

Reviewed by Simon Fraser.

The WebProcess can send DynamicContentScalingDisplayList while 
prepareBufferForDisplay
is still active on the GPU Process. This is semantically invalid.

DynamicContentScalingDisplayList calls dynamicContentScalingDisplayList() on the
front buffer, which calls releaseGraphicsContext() — destroying the graphics 
context
that prepareBufferForDisplay is actively using through m_context. This leads to 
a
dangling reference.

This is a variant of rdar://167565825 (939a2f7876f3) that survives the existing
MESSAGE_CHECK on markSurfacesVolatile. Only reachable on PLATFORM(VISION) where
ENABLE(RE_DYNAMIC_CONTENT_SCALING) is defined.

To fix, we add a MESSAGE_CHECK to reject when dynamicContentScalingDisplayList 
is
called while drawing is ongoing, mirroring the existing guard on 
markSurfacesVolatile.

Test: ipc/dynamic-content-scaling-display-list-during-prepare-for-display.html

* 
LayoutTests/ipc/dynamic-content-scaling-display-list-during-prepare-for-display-expected.txt:
 Added.
* 
LayoutTests/ipc/dynamic-content-scaling-display-list-during-prepare-for-display.html:
 Added.
* LayoutTests/platform/visionos/TestExpectations:
* Source/WebKit/GPUProcess/graphics/RemoteImageBufferSet.cpp:
(WebKit::RemoteImageBufferSet::dynamicContentScalingDisplayList):

Originally-landed-as: 305413.743@safari-7624-branch (5364d0966d20). 
rdar://180437851
Canonical link: https://commits.webkit.org/316256@main



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

Reply via email to