Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8ffc3352b0699dc3457f2cff6b0154879c48247f
https://github.com/WebKit/WebKit/commit/8ffc3352b0699dc3457f2cff6b0154879c48247f
Author: Sammy Gill <[email protected]>
Date: 2024-07-19 (Fri, 19 Jul 2024)
Changed paths:
M Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
M Source/WebCore/rendering/GridTrackSizingAlgorithm.h
Log Message:
-----------
[Grid][Cleanup] Factor out some logic used in intrinsic track sizing to
standalone functions
https://bugs.webkit.org/show_bug.cgi?id=276798
rdar://132040421
Reviewed by Ryan Reno.
This is an initial patch aimed to help slightly improve the readability
of the intrinsic track sizing logic by first moving some logic into
their own standalone functions. I think we can continue to improve the
code in this area but this is just a first step.
1.) Change extraMarginFromSubgridAncestorGutters in
accumulateIntrinsicSizesForTrack from being a lambda to a static function.
2.) Move the logic in accumulateIntrinsicSizesForTrack that determines
whether we should consider an item for sizing in this track for masonry
to shouldExcludeGridItemForMasonryTrackSizing
3.) Change the computeIndefiniteItems lambda in resolveIntrinsicTrackSizes
to a standalone method and renamed it to computeIndefiniteItemsForMasonry
to help distinguish it is for masonry layout.
* Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::extraMarginFromSubgridAncestorGutters):
(WebCore::GridTrackSizingAlgorithm::shouldExcludeGridItemForMasonryTrackSizing
const):
(WebCore::GridTrackSizingAlgorithm::accumulateIntrinsicSizesForTrack):
(WebCore::GridTrackSizingAlgorithm::computeIndefiniteItemsForMasonry const):
(WebCore::GridTrackSizingAlgorithm::resolveIntrinsicTrackSizes):
* Source/WebCore/rendering/GridTrackSizingAlgorithm.h:
Canonical link: https://commits.webkit.org/281141@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes