[webkit-reviews] review granted: [Bug 210584] Crash in IndefiniteSizeStrategy::recomputeUsedFlexFractionIfNeeded when min-size can not be resolved : [Attachment 396601] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 16 02:19:10 PDT 2020


Manuel Rego Casasnovas <rego at igalia.com> has granted zalan <zalan at apple.com>'s
request for review:
Bug 210584: Crash in IndefiniteSizeStrategy::recomputeUsedFlexFractionIfNeeded
when min-size can not be resolved
https://bugs.webkit.org/show_bug.cgi?id=210584

Attachment 396601: Patch

https://bugs.webkit.org/attachment.cgi?id=396601&action=review




--- Comment #3 from Manuel Rego Casasnovas <rego at igalia.com> ---
Comment on attachment 396601
  --> https://bugs.webkit.org/attachment.cgi?id=396601
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=396601&action=review

Thanks for fixing this, LGTM.

> Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:1017
> +    freeSpace = std::max(freeSpace, minSize.valueOr(0_lu)) -
renderGrid->guttersSize(grid, ForRows, 0, grid.numTracks(ForRows),
availableSpace());

For heights we usually go with -1 when they're unknown (check just 2 lines
above), but this is not going to change anything in the end if we use -1 or 0.
If any of them is the max, then findFrUnitSize will return 0 (due to the early
return in GridTrackSizingAlgorithm::findFrUnitSize()) so the final result would
be the same.

>
LayoutTests/fast/css-grid-layout/crash-when-min-height-cant-be-resolved.html:6
> +    grid: 1fr / auto-flow;

Nit: This line can be simplified to "grid-template-rows: 1fr" as it's already
enough to cause the crash.


More information about the webkit-reviews mailing list