Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 38957d776655b57ee3279a93b223a598dbec693f
      
https://github.com/WebKit/WebKit/commit/38957d776655b57ee3279a93b223a598dbec693f
  Author: Alan Baradlay <[email protected]>
  Date:   2026-10-02 (Fri, 02 Oct 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/calc-size-flex-basis-on-column-expected.txt
    M Source/WebCore/rendering/RenderBox.cpp

  Log Message:
  -----------
  [css-values-5 calc-size()] Resolve a percentage in the calculation against 
the main axis size on flex-basis
https://bugs.webkit.org/show_bug.cgi?id=324663
<rdar://problem/187925208>

Reviewed by Antti Koivisto.

    <div style="display: flex; flex-direction: column; height: 200px">
      <div style="flex-basis: calc-size(max-content, 350%)">…</div>
    </div>

The percentage resolves against the main axis size, so the item is 700px tall 
rather than the 20px its
content needs. A percentage flex basis already resolves that way; this makes 
one inside a calc-size()
calculation do the same.

* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::computeSizingKeywordLogicalContentHeightUsingGeneric 
const):
Falls back to availableLogicalHeightForPercentageComputation() on the 
containing block when the item
is not allowed to resolve a percentage height of its own.

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



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

Reply via email to