Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 967dcf8bdd957d0c5e563ff3325871a2fc3e3f5b
      
https://github.com/WebKit/WebKit/commit/967dcf8bdd957d0c5e563ff3325871a2fc3e3f5b
  Author: Sammy Gill <[email protected]>
  Date:   2026-05-29 (Fri, 29 May 2026)

  Changed paths:
    A 
LayoutTests/fast/overflow/intrinsic-width-container-with-scrollable-descendant-vertical-lr-expected.html
    A 
LayoutTests/fast/overflow/intrinsic-width-container-with-scrollable-descendant-vertical-lr.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/flex-orthogonal-writing-mode-with-scrollable-descendant-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/flex-orthogonal-writing-mode-with-scrollable-descendant.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/grid-orthogonal-writing-mode-with-scrollable-descendant-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/grid-orthogonal-writing-mode-with-scrollable-descendant.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/max-width-container-with-scrollable-descendant-vertical-rl-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/max-width-container-with-scrollable-descendant-vertical-rl-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/max-width-container-with-scrollable-descendant-vertical-rl.html
    M Source/WebCore/rendering/RelayoutScopeForScrollbarChange.cpp
    M Source/WebCore/rendering/RenderBlock.cpp
    M Source/WebCore/rendering/SubtreeScrollbarChangesState.cpp
    M Source/WebCore/rendering/SubtreeScrollbarChangesState.h

  Log Message:
  -----------
  SubtreeScrollbarChangesState should specify which scrollbars it wants to 
track.
https://bugs.webkit.org/show_bug.cgi?id=314656
rdar://problem/176905445

Reviewed by Alan Baradlay.

Currently, when we create SubtreeScrollbarChangesState we are saying
that we want to keep track of any descendant for any type of scrollbar
change. This may be not exactly true because in certain cases we may
want to know if a descendant has a certain type of scrollbar change. For
example, if a renderer has width: max-content then we only want to know
if a descendant gains a scrollbar that affects its inline-size in order
to make sure our max-content width is correct.

* Source/WebCore/rendering/RelayoutScopeForScrollbarChange.cpp:
(WebCore::mapScrollbarChangesToOrientations):
(WebCore::RelayoutScopeForScrollbarChange::~RelayoutScopeForScrollbarChange):
We want to only add the renderer to SubtreeScrollbarChangesState if the
scrollbar that changed affects one of the sizes that the state is
keeping track of.

* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::sizesAffectedByScrollbarsForSubtreeRoot):
We currently only want to track scrollbar changes if the logical width
is intrinsic which means that we only care about scrollbar changes that
affect the inline-size.

(WebCore::RenderBlock::layout):
* Source/WebCore/rendering/SubtreeScrollbarChangesState.cpp:
(WebCore::SubtreeScrollbarChangesState::sizesAffectedForSubtreeRootFromScrollbarChanges):
(WebCore::SubtreeScrollbarChangesState::addRendererWithScrollbarChange):
Since we are not just keeping track of the renderers anymore we changed
the underlying data structure to be a Vector. This makes the code a bit
more simple and I expect this list to not get very large. If that second
part ends up not becoming true we can build upon this a bit more and use
a different data structure.

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



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

Reply via email to