Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fd2edbac21f5950d58d0720afc0471640061a6e7
      
https://github.com/WebKit/WebKit/commit/fd2edbac21f5950d58d0720afc0471640061a6e7
  Author: Elika Etemad <[email protected]>
  Date:   2026-01-05 (Mon, 05 Jan 2026)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/flex/FlexLayout.cpp
    M Source/WebCore/rendering/PositionedLayoutConstraints.cpp
    M Source/WebCore/rendering/RenderBox.cpp
    M Source/WebCore/rendering/RenderFlexibleBox.cpp
    M Source/WebCore/rendering/RenderGrid.cpp
    M Source/WebCore/rendering/style/StyleSelfAlignmentData.h
    M Source/WebCore/style/StyleAdjuster.cpp
    M Source/WebCore/style/values/align/StyleAlignItems.cpp
    M Source/WebCore/style/values/align/StyleAlignItems.h
    M Source/WebCore/style/values/align/StyleAlignSelf.cpp
    M Source/WebCore/style/values/align/StyleAlignSelf.h
    M Source/WebCore/style/values/align/StyleJustifyItems.cpp
    M Source/WebCore/style/values/align/StyleJustifyItems.h
    M Source/WebCore/style/values/align/StyleJustifySelf.cpp
    M Source/WebCore/style/values/align/StyleJustifySelf.h

  Log Message:
  -----------
  Refactor self-alignment property resolution to manage 'auto' instead of 
'normal'
https://bugs.webkit.org/show_bug.cgi?id=304716
rdar://167221674

Reviewed by Sammy Gill.

The way 'normal' resolution is looped through the style system ties into our
layout code in an awkward way. Instead, loop 'auto' resolution through the
style system, and make layout code handle 'normal' (which is much more
tied to formatting context subtleties) directly. This creates more
straightforward logic in both systems, divides the work along a more
appropriate boundary, and also avoids doing 'normal' resolution work when
we don't need it.

This is Part 1 of a refactoring stack for grid-lanes item sizing (bug 304715).

* Source/WebCore/layout/formattingContexts/flex/FlexLayout.cpp:
(WebCore::Layout::FlexLayout::crossSizeForFlexLines const):
(WebCore::Layout::FlexLayout::computeCrossSizeForFlexItems const):
(WebCore::Layout::FlexLayout::handleCrossAxisAlignmentForFlexItems const):
* Source/WebCore/rendering/PositionedLayoutConstraints.cpp:
(WebCore::PositionedLayoutConstraints::remainingSpaceForStaticAlignment const):
(WebCore::PositionedLayoutConstraints::resolveAlignmentValue const):
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::styleDidChange):
(WebCore::RenderFlexibleBox::overflowAlignmentForFlexItem const):
(WebCore::RenderFlexibleBox::alignmentForFlexItem const):
* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::styleDidChange):
(WebCore::RenderGrid::columnAxisPositionForGridItem const):
(WebCore::RenderGrid::alignSelfForGridItem const): Deleted.
(WebCore::RenderGrid::justifySelfForGridItem const): Deleted.
* Source/WebCore/rendering/style/StyleSelfAlignmentData.h:
(WebCore::StyleSelfAlignmentData::isNormal const):
(WebCore::StyleSelfAlignmentData::isStretch const):
* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjust const):
* Source/WebCore/style/values/align/StyleAlignItems.cpp:
(WebCore::Style::AlignItems::resolve const):
* Source/WebCore/style/values/align/StyleAlignItems.h:
* Source/WebCore/style/values/align/StyleAlignSelf.cpp:
(WebCore::Style::AlignSelf::resolve const):
* Source/WebCore/style/values/align/StyleAlignSelf.h:
* Source/WebCore/style/values/align/StyleJustifyItems.cpp:
(WebCore::Style::JustifyItems::resolve const):
* Source/WebCore/style/values/align/StyleJustifyItems.h:
* Source/WebCore/style/values/align/StyleJustifySelf.cpp:
(WebCore::Style::JustifySelf::resolve const):
* Source/WebCore/style/values/align/StyleJustifySelf.h:

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



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

Reply via email to