Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5ac3ac75ef745cbb90357d1305e5159e683f418b
      
https://github.com/WebKit/WebKit/commit/5ac3ac75ef745cbb90357d1305e5159e683f418b
  Author: Alan Baradlay <[email protected]>
  Date:   2026-04-24 (Fri, 24 Apr 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/calc-margins-percent-flex-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/calc-margins-percent-flex.html
    M Source/WebCore/rendering/RenderBlock.cpp

  Log Message:
  -----------
  [Flex] Fix 
imported/w3c/web-platform-tests/css/css-sizing/calc-margins-flex.html
https://bugs.webkit.org/show_bug.cgi?id=313239

Reviewed by Antti Koivisto.

A flex item with margin-left: calc(10% + 100px) inside a min-content
flex container should contribute 100px to the container's intrinsic
width (the percentage resolves to 0 in intrinsic sizing).

marginIntrinsicLogicalWidthForChild only supports fixed values.

The fix uses Style::evaluateMinimum which properly extracts the fixed
component from calc() expressions (the percentage part resolves to 0
when the available width is 0).

* LayoutTests/TestExpectations:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/calc-margins-percent-flex-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/calc-margins-percent-flex.html:
 Added.
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::marginIntrinsicLogicalWidthForChild const):

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



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

Reply via email to