Changeset 294237 in webkit


Ignore:
Timestamp:
May 16, 2022 9:33:38 AM (2 years ago)
Author:
Alan Bujtas
Message:

[LFC][FFC] Add "flex-direction: column-reverse" basic visual/logical conversion
https://bugs.webkit.org/show_bug.cgi?id=240434

Reviewed by Antti Koivisto.

With "flex-direction: column-reverse" the main axis progression is from visual bottom to top (with default writing mode and all that).

  • layout/formattingContexts/flex/FlexFormattingContext.cpp:

(WebCore::Layout::FlexFormattingContext::layoutInFlowContentForIntegration):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r294234 r294237  
     12022-05-16  Alan Bujtas  <zalan@apple.com>
     2
     3        [LFC][FFC] Add "flex-direction: column-reverse" basic visual/logical conversion
     4        https://bugs.webkit.org/show_bug.cgi?id=240434
     5
     6        Reviewed by Antti Koivisto.
     7
     8        With "flex-direction: column-reverse" the main axis progression is from visual bottom to top (with default writing mode and all that).
     9
     10        * layout/formattingContexts/flex/FlexFormattingContext.cpp:
     11        (WebCore::Layout::FlexFormattingContext::layoutInFlowContentForIntegration):
     12
    1132022-05-16  Patrick Angle  <pangle@apple.com>
    214
  • trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp

    r294233 r294237  
    145145                break;
    146146            case FlexDirection::Column:
     147            case FlexDirection::ColumnReverse:
    147148                logicalSize = { flexItemGeometry.marginBoxHeight(), flexItemGeometry.marginBoxWidth() };
    148                 break;
    149             case FlexDirection::ColumnReverse:
    150                 ASSERT_NOT_IMPLEMENTED_YET();
    151149                break;
    152150            default:
     
    169167    auto convertLogicalToVisual = [&] {
    170168        // FIXME: Convert logical coordinates to visual.
     169        auto logicalWidth = logicalFlexItemList.last().rect.right() - logicalFlexItemList.first().rect.left();
    171170        auto direction = root().style().flexDirection();
    172171        for (auto& logicalFlexItem : logicalFlexItemList) {
     
    187186            }
    188187            case FlexDirection::ColumnReverse:
    189                 ASSERT_NOT_IMPLEMENTED_YET();
     188                topLeft = { constraints.horizontal().logicalLeft + logicalFlexItem.rect.top(), constraints.logicalTop() + logicalWidth - logicalFlexItem.rect.right() };
    190189                break;
    191190            default:
Note: See TracChangeset for help on using the changeset viewer.