Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b8a7a626127c0010a557c9d6466fefd38d9477c1
      
https://github.com/WebKit/WebKit/commit/b8a7a626127c0010a557c9d6466fefd38d9477c1
  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/animation/calc-size-height-interpolation-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/calc-size-flex-basis-on-column-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/calc-size-height-expected.txt
    M Source/WebCore/rendering/RenderBox.cpp
    M Source/WebCore/rendering/RenderBox.h

  Log Message:
  -----------
  [css-values-5 calc-size()] Resolve a percentage in the calculation against 
the containing block in the block axis
https://bugs.webkit.org/show_bug.cgi?id=324504
<rdar://problem/187738655>

Reviewed by Antti Koivisto.

    <div style="height: 100px">
      <div style="height: calc-size(max-content, 31%)">…</div>
    </div>

The percentage resolves against the container, so the inner box is 31px tall 
rather than 0px.

* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::resolveCalcSizeLogicalHeight const):
Takes the size a percentage resolves against, which until now was always zero 
in the block axis.

(WebCore::RenderBox::computeSizingKeywordLogicalContentHeightUsingGeneric 
const):
* Source/WebCore/rendering/RenderBox.h:

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/calc-size-height-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/calc-size-flex-basis-on-column-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/animation/calc-size-height-interpolation-expected.txt:
* LayoutTests/TestExpectations:

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



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

Reply via email to