[webkit-changes] [WebKit/WebKit] 015d4c: [IFC][InlineContentBreaker] Add fast path for text...

Alan Baradlay noreply at github.com
Mon Aug 21 09:51:47 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 015d4c615abfa677f32ff1e20a544b0adf7cbee0
      https://github.com/WebKit/WebKit/commit/015d4c615abfa677f32ff1e20a544b0adf7cbee0
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-08-21 (Mon, 21 Aug 2023)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.h
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp
    M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.h

  Log Message:
  -----------
  [IFC][InlineContentBreaker] Add fast path for text only minimum intrinsic width computation
https://bugs.webkit.org/show_bug.cgi?id=260433

Reviewed by Antti Koivisto.

Minimum width computation is heavily used by flex, table, float and out-of-flow content.

~10% progression on PerformanceTests/Layout/line-layout-preferred-width-break-all.html.

* Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp:
(WebCore::Layout::InlineContentBreaker::processInlineContent):
(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::InlineContentBreaker::simplifiedMinimumInstrinsicWidthBreak const):
(WebCore::Layout::InlineContentBreaker::wordBreakBehavior const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::append):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::appendTextContent):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::reset):
(WebCore::Layout::hasTextRun): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.h:
(WebCore::Layout::InlineContentBreaker::ContinuousContent::hasTextContent const):
(WebCore::Layout::InlineContentBreaker::ContinuousContent::isTextContent const):
(WebCore::Layout::InlineContentBreaker::setIsMinimumInIntrinsicWidthMode):
(WebCore::Layout::InlineContentBreaker::isMinimumInIntrinsicWidthMode const):
(WebCore::Layout::InlineContentBreaker::setIsInIntrinsicWidthMode): Deleted.
(WebCore::Layout::InlineContentBreaker::isInIntrinsicWidthMode const): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::handleInlineContent):
* Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp:
(WebCore::Layout::TextOnlySimpleLineBuilder::handleOverflowingTextContent):
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::width):
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.h:

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




More information about the webkit-changes mailing list