Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 90ec9ef66e245b040582b315c46e40603d4a4879
      
https://github.com/WebKit/WebKit/commit/90ec9ef66e245b040582b315c46e40603d4a4879
  Author: Alan Baradlay <[email protected]>
  Date:   2026-05-22 (Fri, 22 May 2026)

  Changed paths:
    M Source/WebCore/rendering/RenderFlexibleBox.cpp

  Log Message:
  -----------
  [cleanup] Cache the inner flex base size in m_blockAxisSize so callers don't 
subtract border + padding
https://bugs.webkit.org/show_bug.cgi?id=315302

Reviewed by Antti Koivisto.

m_blockAxisSize was caching the flex item's border-box main size (essentially
flexItem.logicalHeight()), and the only consumer in flexBaseSizeForFlexItem
branch 9.2.3 E immediately subtracted border + padding to get the content-box
value used by the flex algorithm. The spec calls that content-box value the
"inner flex base size" (css-flexbox-1/Overview.bs:3771-3772).

Cache the inner value directly: subtract border + padding inside
blockAxisSizeForFlexItem before storing, and have the caller's branch E
return the cached value as is. Same final values reach the flex algorithm,
but the cache now matches the spec's inner-flex-base-size semantics and
the use site loses one subtraction.

* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::flexBaseSizeForFlexItem):
(WebCore::RenderFlexibleBox::blockAxisSizeForFlexItem):

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



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

Reply via email to