Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Grid track sizing should reset the override width as well as height t…
…o compute intrinsic sizing. https://bugs.webkit.org/show_bug.cgi?id=247465 <rdar://101304306> Reviewed by Alan Baradlay. Grid layout (sometimes) sets the override content size and containing block sizes, so that grid items get sized relative to their grid tracks, rather than the size of the grid element. During the sizing process, we want to know the intrinsic size of children, so we reset any overrides and re-layout children to measure them. We're currently not resetting the content logical width, and there's a comment saying that grid never uses it, but that's out of date and we do need to reset this. * LayoutTests/fast/dynamic/relayout-grid-should-reset-instrinsic-sizes-expected.html: Added. * LayoutTests/fast/dynamic/relayout-grid-should-reset-instrinsic-sizes.html: Added. * Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp: (WebCore::GridTrackSizingAlgorithmStrategy::logicalHeightForChild const): * Source/WebCore/rendering/RenderGrid.cpp: Canonical link: https://commits.webkit.org/256622@main
- Loading branch information
Showing 4 changed files with 41 additions and 6 deletions.