[webkit-changes] [WebKit/WebKit] f10662: [masonry] Optimize items that span multiple tracks

Brandon Stewart noreply at github.com
Mon Aug 19 14:50:41 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f10662fe88d05adea16c6cdccd850905acd342f2
      https://github.com/WebKit/WebKit/commit/f10662fe88d05adea16c6cdccd850905acd342f2
  Author: Brandon Stewart <brandonstewart at apple.com>
  Date:   2024-08-19 (Mon, 19 Aug 2024)

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

  Log Message:
  -----------
  [masonry] Optimize items that span multiple tracks
https://bugs.webkit.org/show_bug.cgi?id=276733
rdar://problem/132435056

Reviewed by Sammy Gill and Yusuke Suzuki.

The implementation is split up into several steps.

1. Gather indefinite items into groups, and calculate their min/max sizes. Definite items
should be documented for later use too.

2. Update intrinsic tracks with single span items.

3. Convert indefinite items to definite items.

3. Update instrinsic tracks with multi span items that do not cross a flex track.

4. Update flex tracks with items that are single or multi span that cross a flex track.

Note: This masonry implementation does not support Subgrid at this point.

* LayoutTests/TestExpectations:
* Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:
 (WebCore::GridTrackSizingAlgorithm::computeTrackBasedSize const):
 (WebCore::GridTrackSizingAlgorithm::sizeTrackToFitSingleSpanMasonryGroup):
 (WebCore::GridTrackSizingAlgorithm::itemSizeForTrackSizeComputationPhaseMasonry const):
 (WebCore::GridTrackSizingAlgorithm::increaseSizesToAccommodateSpanningItemsMasonry):
 (WebCore::GridTrackSizingAlgorithm::increaseSizesToAccommodateSpanningItemsMasonryWithFlex):
 (WebCore::GridTrackSizingAlgorithm::convertIndefiniteItemsToDefiniteMasonry):
 (WebCore::GridTrackSizingAlgorithm::distributeSpaceToTracks const):
 (WebCore::GridTrackSizingAlgorithmStrategy::minContentForGridItem const):
 (WebCore::GridTrackSizingAlgorithm::canParticipateInBaselineAlignment const):
 (WebCore::GridTrackSizingAlgorithm::computeIndefiniteItemsForMasonry):
 (WebCore::GridTrackSizingAlgorithm::resolveIntrinsicTrackSizesMasonry):
 (WebCore::GridTrackSizingAlgorithm::accumulateIntrinsicSizesForTrackMasonry): Deleted.
 (WebCore::GridTrackSizingAlgorithm::computeIndefiniteItemsForMasonry const): Deleted.
* Source/WebCore/rendering/GridTrackSizingAlgorithm.h:

Canonical link: https://commits.webkit.org/282464@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list