[webkit-changes] [WebKit/WebKit] eb6c92: [Grid] Make ItemsLayoutRequirements use an OptionSet.
Sammy Gill
noreply at github.com
Mon Aug 12 17:02:56 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: eb6c9200a90d08be93b661a64ba8568cc61c51a3
https://github.com/WebKit/WebKit/commit/eb6c9200a90d08be93b661a64ba8568cc61c51a3
Author: Sammy Gill <sammy.gill at apple.com>
Date: 2024-08-12 (Mon, 12 Aug 2024)
Changed paths:
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
A Source/WebCore/rendering/GridLayoutState.cpp
M Source/WebCore/rendering/GridLayoutState.h
M Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
M Source/WebCore/rendering/RenderGrid.cpp
Log Message:
-----------
[Grid] Make ItemsLayoutRequirements use an OptionSet.
https://bugs.webkit.org/show_bug.cgi?id=277963
rdar://problem/133697448
Reviewed by Alan Baradlay.
Currently ItemsLayoutRequirements maps a grid item renderer to a single
ItemLayoutRequirement. In order to fix grid-item-inline-contribution-003,
I plan on allowing grid items to have multiple layout requirements so
we should instead make this an OptionSet<ItemLayoutRequirement>.
Also let's remove the public method that allows access to this map and
instead define an API that will allow adding a layout requirement to
an item and checking if a grid item contains a specific requirement.
In this patch I also went ahead and removed CanMakeCheckedPtr and
CanMakeWeakPtr from GridLayoutState since it should only be a stack
based helper class.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/rendering/GridLayoutState.cpp: Copied from Source/WebCore/rendering/GridLayoutState.h.
(WebCore::GridLayoutState::containsLayoutRequirementForGridItem const):
(WebCore::GridLayoutState::setLayoutRequirementForGridItem):
* Source/WebCore/rendering/GridLayoutState.h:
(WebCore::GridLayoutState::itemsLayoutRequirements): Deleted.
* Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithmStrategy::logicalHeightForGridItem const):
* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeLayoutRequirementsForItemsBeforeLayout const):
(WebCore::RenderGrid::applyStretchAlignmentToGridItemIfNeeded):
Canonical link: https://commits.webkit.org/282149@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