Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 92dc5fc313bdd00ace05da0d0f49377883e8d7a9
      
https://github.com/WebKit/WebKit/commit/92dc5fc313bdd00ace05da0d0f49377883e8d7a9
  Author: Brandon Stewart <[email protected]>
  Date:   2025-11-04 (Tue, 04 Nov 2025)

  Changed paths:
    M Source/WebCore/rendering/GridMasonryLayout.cpp

  Log Message:
  -----------
  [masonry] Crash with 0 elements
https://bugs.webkit.org/show_bug.cgi?id=301924
rdar://problem/164003234

Reviewed by Elika Etemad.

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>

* Source/WebCore/rendering/GridMasonryLayout.cpp

Canonical link: https://commits.webkit.org/302541@main



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

Reply via email to