[webkit-changes] [WebKit/WebKit] 4bd4d4: [FFC] Flex Formatting Context should follow IFC's ...

Alan Baradlay noreply at github.com
Thu Feb 8 10:47:49 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4bd4d4f8b539c90ee50e2384b3e1fa691f3486a3
      https://github.com/WebKit/WebKit/commit/4bd4d4f8b539c90ee50e2384b3e1fa691f3486a3
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
    M Source/WebCore/Headers.cmake
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/layout/LayoutContext.cpp
    M Source/WebCore/layout/LayoutState.cpp
    M Source/WebCore/layout/LayoutState.h
    M Source/WebCore/layout/formattingContexts/FormattingGeometry.cpp
    M Source/WebCore/layout/formattingContexts/FormattingGeometry.h
    M Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.h
    R Source/WebCore/layout/formattingContexts/flex/FlexFormattingGeometry.cpp
    R Source/WebCore/layout/formattingContexts/flex/FlexFormattingGeometry.h
    R Source/WebCore/layout/formattingContexts/flex/FlexFormattingState.cpp
    R Source/WebCore/layout/formattingContexts/flex/FlexFormattingState.h
    A Source/WebCore/layout/formattingContexts/flex/FlexFormattingUtils.cpp
    A Source/WebCore/layout/formattingContexts/flex/FlexFormattingUtils.h
    M Source/WebCore/layout/formattingContexts/flex/FlexLayout.cpp
    M Source/WebCore/layout/formattingContexts/flex/FlexLayout.h
    M Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp
    M Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.h

  Log Message:
  -----------
  [FFC] Flex Formatting Context should follow IFC's integration codepath design
https://bugs.webkit.org/show_bug.cgi?id=268885

Reviewed by Antti Koivisto.

1. FlexFormattingContext is no longer derived from FormattingContext
2. Geometry class -> Util (similar to InlineFormattingUtils)
3. Pass in LayoutState to FlexFormattingContext to read box geometry.

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/layout/LayoutContext.cpp:
(WebCore::Layout::LayoutContext::createFormattingContext):
* Source/WebCore/layout/LayoutState.cpp:
(WebCore::Layout::LayoutState::hasFormattingState const):
(WebCore::Layout::LayoutState::flexContentCache):
(WebCore::Layout::LayoutState::destroyFlexContentCache):
(WebCore::Layout::LayoutState::formattingStateForFlexFormattingContext const): Deleted.
(WebCore::Layout::LayoutState::ensureFlexFormattingState): Deleted.
* Source/WebCore/layout/LayoutState.h:
* Source/WebCore/layout/formattingContexts/FormattingGeometry.cpp:
* Source/WebCore/layout/formattingContexts/FormattingGeometry.h:
(WebCore::Layout::FormattingGeometry::isBlockFormattingGeometry const):
(WebCore::Layout::FormattingGeometry::isFlexFormattingGeometry const): Deleted.
* Source/WebCore/layout/formattingContexts/flex/FlexContentCache.h: Renamed from Source/WebCore/layout/formattingContexts/flex/FlexFormattingState.cpp.
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp:
(WebCore::Layout::FlexFormattingContext::FlexFormattingContext):
(WebCore::Layout::FlexFormattingContext::convertFlexItemsToLogicalSpace):
(WebCore::Layout::FlexFormattingContext::setFlexItemsGeometry):
(WebCore::Layout::FlexFormattingContext::geometryForFlexItem const):
(WebCore::Layout::FlexFormattingContext::geometryForFlexItem):
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.h:
(WebCore::Layout::FlexFormattingContext::root const):
(WebCore::Layout::FlexFormattingContext::formattingUtils const):
(WebCore::Layout::FlexFormattingContext::layoutState const):
(WebCore::Layout::FlexFormattingContext::layoutState):
(): Deleted.
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingGeometry.cpp: Removed.
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingUtils.cpp: Renamed from Source/WebCore/layout/formattingContexts/flex/FlexFormattingState.h.
(WebCore::Layout::FlexFormattingUtils::FlexFormattingUtils):
(WebCore::Layout::FlexFormattingUtils::isMainAxisParallelWithInlineAxis):
(WebCore::Layout::FlexFormattingUtils::isReversedToContentDirection):
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingUtils.h: Renamed from Source/WebCore/layout/formattingContexts/flex/FlexFormattingGeometry.h.
* Source/WebCore/layout/formattingContexts/flex/FlexLayout.cpp:
(WebCore::Layout::FlexLayout::handleMainAxisAlignment const):
* Source/WebCore/layout/formattingContexts/flex/FlexLayout.h:
* Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp:
(WebCore::LayoutIntegration::FlexLayout::FlexLayout):
(WebCore::LayoutIntegration::FlexLayout::~FlexLayout):
(WebCore::LayoutIntegration::FlexLayout::updateFormattingRootGeometryAndInvalidate):
(WebCore::LayoutIntegration::FlexLayout::updateFlexItemDimensions):
(WebCore::LayoutIntegration::FlexLayout::computeIntrinsicWidthConstraints):
(WebCore::LayoutIntegration::FlexLayout::layout):
(WebCore::LayoutIntegration::FlexLayout::updateRenderers):
(WebCore::LayoutIntegration::FlexLayout::contentLogicalHeight const):
(WebCore::LayoutIntegration::FlexLayout::updateRenderers const): Deleted.
* Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.h:
(WebCore::LayoutIntegration::FlexLayout::layoutState const):

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




More information about the webkit-changes mailing list