Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8915f8ca6910bf8b55aeca9bd31f6591b476bf35
https://github.com/WebKit/WebKit/commit/8915f8ca6910bf8b55aeca9bd31f6591b476bf35
Author: Ahmad Saleem <[email protected]>
Date: 2026-09-18 (Fri, 18 Sep 2026)
Changed paths:
M Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
Log Message:
-----------
Avoid per-iteration Vector deep-copies in GridTrackSizingAlgorithm
https://bugs.webkit.org/show_bug.cgi?id=324522
rdar://187760402
Reviewed by Sammy Gill.
Two spots in the grid track-sizing algorithm copied a Vector on every
loop iteration with no need to:
- increaseSizesToAccommodateSpanningItemsGridLanes() iterated the
StdMap<SpanLength, Vector<GridLanesMinMaxTrackSizeWithGridSpan>> by
value, deep-copying each entry's Vector per span group. The entry is
only forwarded to a lambda taking a non-const reference, so iterate by
reference instead.
- IndefiniteSizeStrategy::accumulateFlexFractionGridLanes() took its
Vector<SingleThreadWeakPtr<RenderBox>> indefiniteItems parameter by
value, deep-copying it once per flexible track at the call site. It is
only read, so take it by const reference.
Both changes are behavior-preserving; no new tests.
* Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithm::increaseSizesToAccommodateSpanningItemsGridLanes):
(WebCore::IndefiniteSizeStrategy::accumulateFlexFractionGridLanes const):
Canonical link: https://commits.webkit.org/321426@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications