Bug 266561

Summary: Display:contents elements are "rendered" for innerText
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: cdumez, karlcow, webkit-bug-importer
Priority: P2 Keywords: BrowserCompat, InRadar, WPTImpact
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Ahmad Saleem 2023-12-17 15:58:45 PST
Hi Team,

While going through Blink's commit and WPT failures, I came across another failing test cases:

Blink Commit: https://chromium.googlesource.com/chromium/src.git/+/1db9cd28e195d4af700dc841988282de7c58bbd6

WebKit Source: https://searchfox.org/wubkat/rev/9222f67347ee90fcc400687e756ef8c8979748f0/Source/WebCore/dom/Element.cpp#3891

I tried in the past (hasDisplayContents() <- bool function in Element.cpp) but we start failing / crashing WPT test case on release.

WPT Test Case: https://wpt.fyi/results/html/dom/elements/the-innertext-and-outertext-properties/getter.html?label=master&label=experimental&aligned=&q=safari%3Afail

> display:contents not processed via textContent ("<div style='display:contents'> ")

We fail above which this Blink progressed.

Thanks!
Comment 1 Radar WebKit Bug Importer 2023-12-24 15:59:14 PST
<rdar://problem/120100373>