[webkit-changes] [WebKit/WebKit] 71a0de: Detach InlineFormattingContext from FormattingCont...

Alan Baradlay noreply at github.com
Thu Oct 5 08:31:31 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 71a0ded8866160e4f9ae799050094fc4d1856aa9
      https://github.com/WebKit/WebKit/commit/71a0ded8866160e4f9ae799050094fc4d1856aa9
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-10-05 (Thu, 05 Oct 2023)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/FormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/FormattingContext.h
    M Source/WebCore/layout/formattingContexts/inline/InlineContentBalancer.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.h
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.h
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxVerticalAligner.h
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h
    M Source/WebCore/layout/formattingContexts/inline/InlineQuirks.cpp
    M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp

  Log Message:
  -----------
  Detach InlineFormattingContext from FormattingContext base class
https://bugs.webkit.org/show_bug.cgi?id=262588

Reviewed by Antti Koivisto.

Different formatting contexts don't have much shared logic after all.
With this change, IFC is completely decoupled (context, geometry, quirk) from the rest of the LFC codebase.

* Source/WebCore/layout/formattingContexts/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::geometryForBox const):
* Source/WebCore/layout/formattingContexts/FormattingContext.h:
(WebCore::Layout::FormattingContext::isBlockFormattingContext const):
(WebCore::Layout::FormattingContext::isInlineFormattingContext const): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineContentBalancer.cpp:
(WebCore::Layout::InlineContentBalancer::initialize):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::InlineFormattingContext):
(WebCore::Layout::InlineFormattingContext::layout):
(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::layoutFloatContentOnly):
(WebCore::Layout::InlineFormattingContext::updateInlineLayoutStateWithLineLayoutResult):
(WebCore::Layout::InlineFormattingContext::createDisplayContentForInlineContent):
(WebCore::Layout::InlineFormattingContext::createDisplayContentForLineFromCachedContent):
(WebCore::Layout::InlineFormattingContext::initializeInlineLayoutState):
(WebCore::Layout::isOkToAccessBoxGeometry):
(WebCore::Layout::InlineFormattingContext::geometryForBox const):
(WebCore::Layout::InlineFormattingContext::geometryForBox):
(WebCore::Layout::InlineFormattingContext::initializeLayoutState): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h:
(WebCore::Layout::InlineFormattingContext::root const):
(WebCore::Layout::InlineFormattingContext::layoutState):
(WebCore::Layout::InlineFormattingContext::layoutState const):
(WebCore::Layout::InlineFormattingContext::inlineLayoutState): Deleted.
(WebCore::Layout::InlineFormattingContext::inlineLayoutState const): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp:
(WebCore::Layout::InlineFormattingUtils::inlineLevelBoxAffectsLineBox const):
(WebCore::Layout::InlineFormattingUtils::initialLineHeight const):
(WebCore::Layout::InlineFormattingUtils::layoutState const):
(WebCore::Layout::InlineFormattingUtils::inlineLayoutState const): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.h:
* Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:
(WebCore::Layout::LineBoxBuilder::setVerticalPropertiesForInlineLevelBox const):
(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):
(WebCore::Layout::LineBoxBuilder::adjustOutsideListMarkersPosition):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.h:
(WebCore::Layout::LineBoxBuilder::layoutState const):
(WebCore::Layout::LineBoxBuilder::blockLayoutState const):
(WebCore::Layout::LineBoxBuilder::inlineLayoutState const): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp:
(WebCore::Layout::LineBoxVerticalAligner::computeLogicalHeightAndAlign const):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBoxVerticalAligner.h:
(WebCore::Layout::LineBoxVerticalAligner::layoutState const):
(WebCore::Layout::LineBoxVerticalAligner::inlineLayoutState const): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::tryPlacingFloatBox):
(WebCore::Layout::LineBuilder::handleInlineContent):
(WebCore::Layout::LineBuilder::layoutState const):
(WebCore::Layout::LineBuilder::layoutState):
(WebCore::Layout::LineBuilder::inlineLayoutState const): Deleted.
(WebCore::Layout::LineBuilder::inlineLayoutState): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h:
(WebCore::Layout::LineBuilder::blockLayoutState const):
* Source/WebCore/layout/formattingContexts/inline/InlineQuirks.cpp:
(WebCore::Layout::InlineQuirks::initialLineHeight const):
(WebCore::Layout::InlineQuirks::inlineBoxAffectsLineBox const):
(WebCore::Layout::InlineQuirks::adjustedRectForLineGridLineAlign const):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::InlineDisplayContentBuilder):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp:
(WebCore::Layout::InlineDisplayLineBuilder::collectEnclosingLineGeometry const):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::layout):

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




More information about the webkit-changes mailing list