Bug 301924

Summary: [masonry] Crash with 0 elements
Product: WebKit Reporter: Brandon <brandonstewart>
Component: New BugsAssignee: Brandon <brandonstewart>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Brandon
Reported 2025-11-04 04:04:59 PST
When a masonry container has 0 elements it is causing a crash, because we are asserting during item placement that we have tracks. This isn't accurate, because we have no elements. Since the test cases swapped over to using display: masonry this is the test case I used to verify the fix. <!DOCTYPE html> <html> <style> .empty-container { display: grid; grid-template-rows: masonry; and grid-template-columns: masonry; } </style> <body> <p>Test that an empty masonry container renders nothing.</p> <div class="empty-container"></div> </body> </html>
Attachments
Radar WebKit Bug Importer
Comment 1 2025-11-04 04:05:06 PST
Brandon
Comment 2 2025-11-04 04:07:30 PST
EWS
Comment 3 2025-11-04 07:56:58 PST
Committed 302541@main (92dc5fc313bd): <https://commits.webkit.org/302541@main> Reviewed commits have been landed. Closing PR #53389 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.