Bug 263834

Summary: HTML dialog ::backdrop ignores all CSS variables
Product: WebKit Reporter: Wes <wes>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ahmad.saleem792, fotis.papadogeorgopoulos, ntim, webkit-bug-importer, webkit
Priority: P2 Keywords: GoodFirstBug, InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 263838    
Bug Blocks:    

Description Wes 2023-10-28 14:41:44 PDT
The spec was updated so that ::backdrop should inherit from originating element.  This will allow CSS variables to work properly in ::backdrop selectors.  See existing WPT for test case: https://wpt.fyi/results/html/semantics/interactive-elements/the-dialog-element/backdrop-inherits.html
Comment 1 Tim Nguyen (:ntim) 2023-10-28 21:43:44 PDT
https://searchfox.org/wubkat/rev/85e40ad30a15e2dfcda4ebad64ed7f41292908a4/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp#203-204

Should be as easy as changing `&renderer.view().style()` to `&renderer.style()` on that line (and the related comment).
Comment 2 Ahmad Saleem 2023-10-30 07:54:46 PDT
I think Keith has fix for this in his local branch:

https://github.com/keithamus/WebKit/commit/09077ac5976fea157c74dd161c7e49f511157477#diff-7f18480073b63da9fd4d75c26e4e35d003a101498030d45587ab9b5241b2e2bf

It just needs to be push on WebKit origin.
Comment 3 Keith Cirkel 2023-10-30 16:23:50 PDT
Yep I've got a patch. I'm first resyncing the web platform tests for dialog (see https://bugs.webkit.org/show_bug.cgi?id=263838 & https://github.com/WebKit/WebKit/pull/19682).
Comment 4 Radar WebKit Bug Importer 2023-11-04 14:42:13 PDT
<rdar://problem/117949961>
Comment 5 EWS 2023-11-05 08:33:49 PST
Committed 270246@main (d23e04b12f79): <https://commits.webkit.org/270246@main>

Reviewed commits have been landed. Closing PR #20007 and removing active labels.