Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 83e73fd66b2dbeebf76f2f425d868d15e859184e
      
https://github.com/WebKit/WebKit/commit/83e73fd66b2dbeebf76f2f425d868d15e859184e
  Author: Sammy Gill <[email protected]>
  Date:   2026-05-20 (Wed, 20 May 2026)

  Changed paths:
    A 
LayoutTests/fast/overflow/intrinsic-width-container-with-scrollable-descendant-expected.html
    A 
LayoutTests/fast/overflow/intrinsic-width-container-with-scrollable-descendant.html
    A 
LayoutTests/fast/overflow/min-intrinsic-width-container-with-scrollable-descendant-expected.html
    A 
LayoutTests/fast/overflow/min-intrinsic-width-container-with-scrollable-descendant.html
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flexbox-min-height-auto-003-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flexbox-min-height-auto-004-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/abspos-shrink-to-fit-with-scrollable-descendant-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/abspos-shrink-to-fit-with-scrollable-descendant-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/abspos-shrink-to-fit-with-scrollable-descendant.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/button-with-scrollable-descendant-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/button-with-scrollable-descendant-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/button-with-scrollable-descendant.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/float-with-scrollable-descendant-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/float-with-scrollable-descendant-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/float-with-scrollable-descendant.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/inline-block-with-scrollable-descendant-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/inline-block-with-scrollable-descendant-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/inline-block-with-scrollable-descendant.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/max-content-with-float-scrollable-descendant-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/max-content-with-float-scrollable-descendant-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/max-content-with-float-scrollable-descendant.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/max-content-with-multiple-scrollable-descendants-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/max-content-with-multiple-scrollable-descendants-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/max-content-with-multiple-scrollable-descendants.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/orthogonal-writing-mode-with-scrollable-descendant-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/orthogonal-writing-mode-with-scrollable-descendant-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/orthogonal-writing-mode-with-scrollable-descendant.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/table-max-content-with-scrollable-descendant-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/table-max-content-with-scrollable-descendant-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/table-max-content-with-scrollable-descendant.html
    M Source/WebCore/rendering/RenderBlock.cpp
    M Source/WebCore/rendering/SubtreeScrollbarChangesState.cpp

  Log Message:
  -----------
  Scrollbar changes in subtree are not properly handled for various shrink to 
fit type of content.
https://bugs.webkit.org/show_bug.cgi?id=290452
rdar://problem/148428628

Reviewed by Alan Baradlay.

In 311766@main we added some support that allows renderers with certain
types of computed widths to respond to scrollbar changes in its subtree.
For example, if we have a renderer with width: max-content and a
descendant ends up getting a scrollbar, then that width should take into
consideration the scrollbar. The commit message in 311766@main has a
much more detailed explanation.

However, there are other types of content that have similar
characteristics that are still currently broken. Two examples are inline
blocks and absolutely positioned elements with auto insets, both of
which determine their widths as shrink-to-fit. This patch
expands upon our current infrastructure to allow more type of content.
We use the sizesPreferredLogicalWidthToFitContent to help identify these
cases. Two restrictions that we place are flex items and grid items since those
seem like they will need a bit of additional work which will be done in
a follow up. Note that while EWS does not show any immediate issues with
gird items, I am inluding that content in these restrictions just due to
some similarities between those pieces of code. It is possible that the
investigation to fix the issues with flex will reveal that the
underlying issue does not actually exist in grid.

(WebCore::SubtreeScrollbarChangesHandler::~SubtreeScrollbarChangesHandler):
Unlike the width: max-content cases, the width of the absolutely
positioned elements and inline blocks are computed by calling preferred
widths on the renderer itself. As a result, we need to make sure that it
gets invalidated as well since we were previously stopping at it.

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



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

Reply via email to