Changeset 295273 in webkit


Ignore:
Timestamp:
Jun 5, 2022 5:04:13 PM (2 years ago)
Author:
Alan Bujtas
Message:

column-reverse content should take resolved flex box height into account when computing visual position
https://bugs.webkit.org/show_bug.cgi?id=241313

Reviewed by Antti Koivisto.

When the flex box has resolvable height, use it as the anchor point to compute the column-reverse content's visual vertical position.

  • Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp:

(WebCore::Layout::FlexFormattingContext::setFlexItemsGeometry):

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp

    r295263 r295273  
    265265            break;
    266266        }
    267         case FlexDirection::ColumnReverse:
     267        case FlexDirection::ColumnReverse: {
     268            auto visualBottom = constraints.logicalTop() + constraints.availableVerticalSpace().value_or(logicalWidth);
    268269            borderBoxTopLeft = {
    269270                constraints.horizontal().logicalLeft + logicalFlexItem.top(),
    270                 constraints.logicalTop() + logicalWidth - logicalFlexItem.right() + flexItemGeometry.marginBefore()
     271                visualBottom - logicalFlexItem.right() + flexItemGeometry.marginBefore()
    271272            };
    272273            break;
     274        }
    273275        default:
    274276            ASSERT_NOT_REACHED();
Note: See TracChangeset for help on using the changeset viewer.