Bug 311750

Summary: A quirksmode.org page fails to render correctly in Safari
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: bfulgham, karlcow, koivisto, pp.koch, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
URL: https://quirksmode.org/spelverkoop/
See Also: https://bugs.webkit.org/show_bug.cgi?id=286403
Attachments:
Description Flags
rendering in safari, firefox, chrome
none
testcase
none
testcase rendering in safari, firefox, chrome none

Simon Fraser (smfr)
Reported 2026-04-08 12:48:11 PDT
The main content is missing on https://quirksmode.org/spelverkoop/ in Safari only. Tested on macOS 26.4.
Attachments
rendering in safari, firefox, chrome (2.82 MB, image/png)
2026-04-08 17:50 PDT, Karl Dubost
no flags
testcase (551 bytes, text/html)
2026-04-08 18:38 PDT, Karl Dubost
no flags
testcase rendering in safari, firefox, chrome (117.46 KB, image/png)
2026-04-08 18:39 PDT, Karl Dubost
no flags
Simon Fraser (smfr)
Comment 1 2026-04-08 12:48:21 PDT
Radar WebKit Bug Importer
Comment 2 2026-04-08 12:48:54 PDT
Simon Fraser (smfr)
Comment 3 2026-04-08 13:31:46 PDT
This looks like a :has() invalidation bug.
Alexey Proskuryakov
Comment 4 2026-04-08 15:33:36 PDT
This reproduces in Safari 18.6, too.
Karl Dubost
Comment 5 2026-04-08 17:50:58 PDT
Created attachment 478972 [details] rendering in safari, firefox, chrome Safari Technology Preview 26.0 21625.1.12 Firefox Nightly 151.0a1 15126.4.7 Google Chrome Canary 149.0.7780.0 7780.0
Karl Dubost
Comment 6 2026-04-08 18:37:27 PDT
The CSS contains inside the html file: main:has(tbody:empty) { display: none; } The tbody is populated by JavaScript when the page is loading window.onload = function() { let wr = document.querySelector('tbody'); … let doel = wr; … wr.appendChild(tr) } So I guess the main:has(tbody:empty) is not checked again when the content is changed dynamically. That should be verifiable with a div.
Karl Dubost
Comment 7 2026-04-08 18:38:41 PDT
Created attachment 478973 [details] testcase The rendering should be green when this is working.
Karl Dubost
Comment 8 2026-04-08 18:39:34 PDT
Created attachment 478974 [details] testcase rendering in safari, firefox, chrome Yup very simple testcase with divs.
Peter-Paul Koch
Comment 9 2026-04-09 11:58:46 PDT
Simon Fraser (smfr)
Comment 10 2026-04-09 18:15:07 PDT
*** This bug has been marked as a duplicate of bug 286403 ***
Note You need to log in before you can comment on or make changes to this bug.