Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 38de7bdbbe8d6fcd44c0abc4f48d6ac3a37b8ef1
      
https://github.com/WebKit/WebKit/commit/38de7bdbbe8d6fcd44c0abc4f48d6ac3a37b8ef1
  Author: Alan Baradlay <[email protected]>
  Date:   2026-05-27 (Wed, 27 May 2026)

  Changed paths:
    M Source/WebCore/rendering/RenderBlock.cpp
    M Source/WebCore/rendering/RenderBlock.h
    M Source/WebCore/rendering/RenderFlexibleBox.cpp
    M Source/WebCore/rendering/RenderGrid.cpp

  Log Message:
  -----------
  [cleanup] Rename computePreferredWidthsForExcludedChildren to 
computeIntrinsicLogicalWidthsForFieldsetLegend
https://bugs.webkit.org/show_bug.cgi?id=315570

Reviewed by Antti Koivisto.

The name claimed two inaccurate things. "ExcludedChildren" implied the
function handled any kind of excluded-from-normal-layout child, but the
body bails on !isFieldset() and only ever computes the legend's
contribution. The other excluded-child kind in WebKit, the multicol
fragmented flow, participates through the regular preferred-width walk
and never reaches this function. "Preferred" suggested the spec's
preferred-size property values (css-sizing-3 line 425), but the
function actually returns the legend's min-content / max-content
intrinsic widths.

Renamed to computeIntrinsicLogicalWidthsForFieldsetLegend, matching the
surrounding intrinsic-sizing family (computeIntrinsicLogicalWidths,
intrinsicLogicalMarginStartAndEnd, intrinsicScrollbarLogicalWidth).
Also switched the bool + out-param signature to a
std::pair<LayoutUnit, LayoutUnit> return, matching
intrinsicLogicalMarginStartAndEnd's shape; the {0, 0} from the
no-fieldset / no-legend path is a no-op for the callers' subsequent
std::max calls, so the gating bool was not carrying its weight.

No behavior change.

* Source/WebCore/rendering/RenderBlock.h:
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
(WebCore::RenderBlock::computeIntrinsicLogicalWidthsForFieldsetLegend):
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths):
* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeIntrinsicLogicalWidths):

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



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

Reply via email to