Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8f58d37f11a9e7e5556eb1c4bbd523cc956db99f
      
https://github.com/WebKit/WebKit/commit/8f58d37f11a9e7e5556eb1c4bbd523cc956db99f
  Author: Sammy Gill <[email protected]>
  Date:   2024-08-01 (Thu, 01 Aug 2024)

  Changed paths:
    M Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
    M Source/WebCore/rendering/GridTrackSizingAlgorithm.h
    M Source/WebCore/rendering/RenderGrid.cpp

  Log Message:
  -----------
  [Grid] Plumb GridLayoutState through GridTrackSizingAlgorithm
https://bugs.webkit.org/show_bug.cgi?id=277449
rdar://132930737

Reviewed by Alan Baradlay and Tim Nguyen.

GridLayoutState is supposed to be a stack based helper class that helps
hold onto information that is only needed during layout. This is to
avoid tossing state onto the renderer or other long lived objects and
risk having stale state which could result in the form of bugs. In
the initial implementation I ended up having GridTrackSizingAlgorithm
hold onto this state with a WeakPtr and guarded it using a CheckedRef.
This is wrong and instead we should plumb it throughout
GridTrackSizingAlgorithm so that it can access it wherever it is needed.

* Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem):
(WebCore::GridTrackSizingAlgorithm::itemSizeForTrackSizeComputationPhase const):
(WebCore::GridTrackSizingAlgorithm::increaseSizesToAccommodateSpanningItems):
(WebCore::GridTrackSizingAlgorithmStrategy::logicalHeightForGridItem const):
(WebCore::GridTrackSizingAlgorithmStrategy::minContentForGridItem const):
(WebCore::GridTrackSizingAlgorithmStrategy::maxContentForGridItem const):
(WebCore::GridTrackSizingAlgorithmStrategy::minSizeForGridItem const):
(WebCore::IndefiniteSizeStrategy::accumulateFlexFraction const):
(WebCore::IndefiniteSizeStrategy::findUsedFlexFraction const):
(WebCore::DefiniteSizeStrategy::findUsedFlexFraction const):
(WebCore::DefiniteSizeStrategy::minContentForGridItem const):
(WebCore::GridTrackSizingAlgorithm::accumulateIntrinsicSizesForTrack):
(WebCore::GridTrackSizingAlgorithm::accumulateIntrinsicSizesForTrackMasonry):
(WebCore::GridTrackSizingAlgorithm::computeIndefiniteItemsForMasonry const):
(WebCore::GridTrackSizingAlgorithm::resolveIntrinsicTrackSizes):
(WebCore::GridTrackSizingAlgorithm::resolveIntrinsicTrackSizesMasonry):
(WebCore::GridTrackSizingAlgorithm::stretchFlexibleTracks):
(WebCore::GridTrackSizingAlgorithm::setup):
(WebCore::GridTrackSizingAlgorithm::run):
* Source/WebCore/rendering/GridTrackSizingAlgorithm.h:
* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeTrackSizesForDefiniteSize):
(WebCore::RenderGrid::layoutGrid):
(WebCore::RenderGrid::computeTrackSizesForIndefiniteSize const):

Canonical link: https://commits.webkit.org/281711@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

Reply via email to