Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 3f2a366bd8d0e9aafe6722b2d4d4cb05ef8eaae0 https://github.com/WebKit/WebKit/commit/3f2a366bd8d0e9aafe6722b2d4d4cb05ef8eaae0 Author: Sammy Gill <sammy.g...@apple.com> Date: 2025-03-05 (Wed, 05 Mar 2025)
Changed paths: M Source/WebCore/rendering/GridLayoutState.h M Source/WebCore/rendering/RenderGrid.cpp M Source/WebCore/rendering/RenderGrid.h Log Message: ----------- [Grid][Cleanup] Move m_hasAspectRatioBlockSizeDependentItem to GridLayoutState rdar://146314286 https://bugs.webkit.org/show_bug.cgi?id=289180 Reviewed by Brandon Stewart. m_hasAspectRatioBlockSizeDependentItem is a member variable which lives on RenderGrid but is only computed and used during grid layout. This makes it a prime candidate to be moved to GridLayoutState, which is a helper class to store information to be used during grid layout. The logic handling this bool seems to be: 1.) Set the value to false in computeAspectRatioDependentBaselineItems and potentially set it to true depending on what happens during this function. This function is one of the first things to happen in layoutGrid/layoutMasonry. 2.) Check its value during repeatTrackSizingIfNeeded to determine if it is one of the reasons which forces us to perform the second iteration of the track sizing algorithm. Based off of this, we should just be able to initialize it to false in GridLayoutState, which is created at the beginning of grid/masonry layout, and set/check the value according to the logic described above. * Source/WebCore/rendering/GridLayoutState.h: (WebCore::GridLayoutState::setHasAspectRatioBlockSizeDependentItem): (WebCore::GridLayoutState::hasAspectRatioBlockSizeDependentItem const): * Source/WebCore/rendering/RenderGrid.cpp: (WebCore::RenderGrid::repeatTracksSizingIfNeeded): (WebCore::RenderGrid::layoutGrid): (WebCore::RenderGrid::layoutMasonry): * Source/WebCore/rendering/RenderGrid.h: Canonical link: https://commits.webkit.org/291677@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes