[Webkit-unassigned] [Bug 222376] [css-grid] Replace the use of -1 with WTF::nullopt

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 9 06:50:02 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=222376

--- Comment #12 from Javier Fernandez <jfernandez at igalia.com> ---
Comment on attachment 422684
  --> https://bugs.webkit.org/attachment.cgi?id=422684
Patch

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

> Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:554
> +Optional<LayoutUnit> GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChildForColumns(const RenderBox& child) const

Perhaps we don't need this function; we can just calling the generic function with the appropriated argument when needed.

> Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:558
> +Optional<LayoutUnit> GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChildForRows(const RenderBox& child) const

Ditto

> Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:839
> +    return minLogicalSizeForChild(child, childMinSize, gridAreaSize.valueOr(0_lu)) + baselineShim;

I'm not sure about this valurOr(0); it might be the root cause of the layout tests failures we have in the baseline alignment related tests.
I think this might be wrong when dealing with orthogonal grid items, so that we need nullopt here to detect indefinite size.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210309/b48b6220/attachment.htm>


More information about the webkit-unassigned mailing list