[webkit-changes] [WebKit/WebKit] 44bc05: [IFC] Use fast line builder for min/max computatio...

Alan Baradlay noreply at github.com
Fri Aug 11 15:35:36 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 44bc05527994e02f8c2600065eca3d7c50264e46
      https://github.com/WebKit/WebKit/commit/44bc05527994e02f8c2600065eca3d7c50264e46
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/AbstractLineBuilder.h
    M Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.h
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h
    M Source/WebCore/layout/formattingContexts/inline/TextOnlyLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/TextOnlyLineBuilder.h

  Log Message:
  -----------
  [IFC] Use fast line builder for min/max computation when applicable
https://bugs.webkit.org/show_bug.cgi?id=259936

Reviewed by Antti Koivisto.

This patch takes simplified inline builder into use when computing min/max intrinsic sizes.

Small related changes:
1. InlineContentBreaker only needs to know whether we are in intrinsic mode or not.
2, No need to reconstruct InlineContentBreaker for each lines
3, No need to construct a new instance of InlineBuilder for min/max computation.

* Source/WebCore/layout/formattingContexts/inline/AbstractLineBuilder.h:
(WebCore::Layout::AbstractLineBuilder::setIntrinsicWidthMode):
(WebCore::Layout::AbstractLineBuilder::intrinsicWidthMode const):
(WebCore::Layout::AbstractLineBuilder::isInIntrinsicWidthMode const):
* Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp:
(WebCore::Layout::InlineContentBreaker::InlineContentBreaker): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.h:
(WebCore::Layout::InlineContentBreaker::setHyphenationDisabled):
(WebCore::Layout::InlineContentBreaker::setIsInIntrinsicWidthMode):
(WebCore::Layout::InlineContentBreaker::isInIntrinsicWidthMode const):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutInFlowAndFloatContent):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::InlineFormattingContext::maximumContentSize):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h:
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::LineBuilder):
(WebCore::Layout::LineBuilder::placeInlineAndFloatContent):
(WebCore::Layout::LineBuilder::handleInlineContent):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h:
(WebCore::Layout::LineBuilder::intrinsicWidthMode const): Deleted.
(WebCore::Layout::LineBuilder::isInIntrinsicWidthMode const): Deleted.
* Source/WebCore/layout/formattingContexts/inline/TextOnlyLineBuilder.cpp:
(WebCore::Layout::TextOnlyLineBuilder::TextOnlyLineBuilder):
(WebCore::Layout::TextOnlyLineBuilder::placeInlineTextContent):
(WebCore::Layout::TextOnlyLineBuilder::placeNonWrappingInlineTextContent):
(WebCore::Layout::TextOnlyLineBuilder::handleInlineTextContent):
(WebCore::Layout::TextOnlyLineBuilder::isEligibleForSimplifiedTextOnlyInlineLayout):
* Source/WebCore/layout/formattingContexts/inline/TextOnlyLineBuilder.h:
(WebCore::Layout::TextOnlyLineBuilder::isFirstFormattedLine const):
(WebCore::Layout::TextOnlyLineBuilder::TextOnlyLineBuilder): Deleted.
(WebCore::Layout::TextOnlyLineBuilder::intrinsicWidthMode const): Deleted.
(WebCore::Layout::TextOnlyLineBuilder::isInIntrinsicWidthMode const): Deleted.

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




More information about the webkit-changes mailing list