Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 74528f2862c6efe87763a2b99e20cc8cca7375c3
https://github.com/WebKit/WebKit/commit/74528f2862c6efe87763a2b99e20cc8cca7375c3
Author: Alan Baradlay <[email protected]>
Date: 2026-07-18 (Sat, 18 Jul 2026)
Changed paths:
M Source/WebCore/rendering/RenderFlexLayout.cpp
M Source/WebCore/rendering/RenderFlexLayout.h
M Source/WebCore/rendering/RenderFlexibleBox.cpp
Log Message:
-----------
[cleanup] Read the flex container's scrollbar extents from constraints
instead of off the container
https://bugs.webkit.org/show_bug.cgi?id=318702
Reviewed by Antti Koivisto.
FlexLayout read the container's scrollbar thickness live off the container in
six places while stacking lines,
placing items, and sizing the container (crossAxisScrollbarExtent /
mainAxisScrollbarExtent, and open-coded
verticalScrollbarWidth/horizontalScrollbarHeight). The container's scrollbars
are constant during flex layout:
they are established before it (the initial logical height already seeds in
scrollbarLogicalHeight) and only
re-evaluated afterwards, so they are a fixed input, not something to read back
mid-algorithm.
Snapshot them into FlexLayoutConstraints as mainAxisScrollbarExtent and
crossAxisScrollbarExtent (built in
flexLayoutConstraints) and read those instead. Two sites open-coded the flow
mapping: the column producer's
scrollbarLogicalHeight() equals mainAxisScrollbarExtent for column flow, and
the vertical-writing-mode
rtl-column flip's horizontalScrollbarHeight() equals crossAxisScrollbarExtent
there. With this, FlexLayout no
longer consults the container's geometry at all.
No change in behavior.
* Source/WebCore/rendering/RenderFlexLayout.cpp:
* Source/WebCore/rendering/RenderFlexLayout.h:
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(RenderFlexibleBox::flexLayoutConstraints):
Canonical link: https://commits.webkit.org/317498@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications