[webkit-changes] [WebKit/WebKit] 0e26fb: Assertion failure in GridIterator ASSERT(m_grid.nu...

Arunsundar Kannan noreply at github.com
Tue May 23 09:29:42 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0e26fb7015a6a98eaf2a59fd616efaba4988e207
      https://github.com/WebKit/WebKit/commit/0e26fb7015a6a98eaf2a59fd616efaba4988e207
  Author: Arunsundar Kannan <arunsundar_kannan at apple.com>
  Date:   2023-05-23 (Tue, 23 May 2023)

  Changed paths:
    A LayoutTests/fast/css-grid-layout/gridmatrix-columnSize-failure-expected.txt
    A LayoutTests/fast/css-grid-layout/gridmatrix-columnSize-failure.html
    M Source/WebCore/rendering/Grid.cpp
    M Source/WebCore/rendering/Grid.h

  Log Message:
  -----------
  Assertion failure in GridIterator ASSERT(m_grid.numTracks(ForColumns))
https://bugs.webkit.org/show_bug.cgi?id=253127
rdar://105548703

Reviewed by Matt Woodrow.

The grid matrix for a subgrid of an element in the row-axis has one row with no columns, which are then lazily created as needed. An assertion in GridIterator constructor fails as column size is zero. This change additionally checks the maximum Columns ivar of the grid class to assert only for valid cases.

* Source/WebCore/rendering/Grid.cpp:
(WebCore::Grid::gridItemSpanIgnoringCollapsedTracks const):
(WebCore::GridIterator::GridIterator):
(WebCore::GridIterator::nextGridItem):
(WebCore::GridIterator::isEmptyAreaEnough const):
(WebCore::GridIterator::nextEmptyGridArea):
* Source/WebCore/rendering/Grid.h:

Originally-landed-as: 259548.376 at safari-7615-branch (189d480c5fbd). rdar://105548703
Canonical link: https://commits.webkit.org/264420@main




More information about the webkit-changes mailing list