Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: dbf4f545d85696c4067e1c566e17c60fd44505fa
https://github.com/WebKit/WebKit/commit/dbf4f545d85696c4067e1c566e17c60fd44505fa
Author: Yulun Wu <[email protected]>
Date: 2026-07-13 (Mon, 13 Jul 2026)
Changed paths:
M Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.cpp
M Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.h
M Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.cpp
M Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.h
M Source/WebCore/layout/formattingContexts/grid/TrackSizingAlgorithm.cpp
Log Message:
-----------
[GFC] Add scaffolding to classify intrinsic-width sizing path
https://bugs.webkit.org/show_bug.cgi?id=316591
<rdar://179042344>
Reviewed by Sammy Gill.
This PR adds scaffolding in GridFormattingContext for an intrinsic-width
fast-path classifier. GridFormattingContext now tracks IntrinsicWidthSizingPath
(ColumnsOnly | NeedsFullSizing) to improve intrinsic sizing performance.
This PR adds the first triggers for detecting block size dependent grid items.
Orthogonal grid items' inline axis contribution is determined by its block size,
meaning that we need to run the full layout path to determine the intrinsic
width
of a grid with orthogonal grid items.
Grid items with preferred aspect ratio and grid items that depend on their
containing
block size may also require the full layout path for intrinsic width
calcualations.
No behavior change in this PR.
* Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.cpp:
(WebCore::Layout::GridFormattingContext::GridFormattingContext):
(WebCore::Layout::GridFormattingContext::classifyIntrinsicWidthSizingPath
const):
(WebCore::Layout::GridFormattingContext::computeIntrinsicWidths):
* Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.h:
(WebCore::Layout::GridFormattingContext::intrinsicWidthSizingPath const):
* Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.cpp:
(WebCore::Layout::GridLayoutUtils::inlineContributionMayRequireFullSizingAlgorithmForIntrinsicWidth):
(WebCore::Layout::GridLayoutUtils::preferredSizeDependsOnContainingBlockSize):
Deleted.
* Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.h:
(WebCore::Layout::GridLayoutUtils::sizeDependsOnContainingBlockSize):
* Source/WebCore/layout/formattingContexts/grid/TrackSizingAlgorithm.cpp:
(WebCore::Layout::minimumContributions):
Canonical link: https://commits.webkit.org/317063@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications