[webkit-changes] [WebKit/WebKit] 01a8c9: [FFC] Add support for [9.2.3.E] use max-content wh...

Alan Baradlay noreply at github.com
Sat Jul 1 15:44:22 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 01a8c97f3b3ea942a256749cdf0e93daf28f49b8
      https://github.com/WebKit/WebKit/commit/01a8c97f3b3ea942a256749cdf0e93daf28f49b8
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-07-01 (Sat, 01 Jul 2023)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/flex/FlexLayout.cpp
    M Source/WebCore/layout/formattingContexts/flex/FlexLayout.h
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h

  Log Message:
  -----------
  [FFC] Add support for [9.2.3.E] use max-content when flex-basis is content...
https://bugs.webkit.org/show_bug.cgi?id=258761

Reviewed by Antti Koivisto.

Partially implement https://www.w3.org/TR/css-flexbox-1/#algo-main-item 9.3.3.E when
content should be sized using max-content.

1. IFC type of flex item only
2. Use non-integration codepath to compute max-content for now

* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp:
(WebCore::Layout::FlexFormattingContext::layout):
* Source/WebCore/layout/formattingContexts/flex/FlexLayout.cpp:
(WebCore::Layout::FlexLayout::FlexLayout):
(WebCore::Layout::FlexLayout::maxContentForFlexItem const):
(WebCore::Layout::FlexLayout::flexBaseAndHypotheticalMainSizeForFlexItems const):
(WebCore::Layout::FlexLayout::stretchFlexLines const):
(WebCore::Layout::FlexLayout::handleMainAxisAlignment const):
(WebCore::Layout::FlexLayout::handleCrossAxisAlignmentForFlexItems const):
(WebCore::Layout::FlexLayout::handleCrossAxisAlignmentForFlexLines const):
(WebCore::Layout::FlexLayout::flexContainer const):
(WebCore::Layout::FlexLayout::flexFormattingContext const):
* Source/WebCore/layout/formattingContexts/flex/FlexLayout.h:
(WebCore::Layout::FlexLayout::isSingleLineFlexContainer const):
(WebCore::Layout::FlexLayout::flexContainerStyle const):
(WebCore::Layout::FlexLayout::flexContainer const): Deleted.
(WebCore::Layout::FlexLayout::rootStyle const): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::maximumContentSize):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h:

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




More information about the webkit-changes mailing list