Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dc83324137d024dddf47dfe2c86be3da528b9a3b
      
https://github.com/WebKit/WebKit/commit/dc83324137d024dddf47dfe2c86be3da528b9a3b
  Author: Alan Baradlay <[email protected]>
  Date:   2023-08-20 (Sun, 20 Aug 2023)

  Changed paths:
    M 
Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp
    M 
Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.h

  Log Message:
  -----------
  [IFC] Do not populate InlineContentBreaker::ContinuousContent eagerly with 
candidate content
https://bugs.webkit.org/show_bug.cgi?id=260403

Reviewed by Antti Koivisto.

InlineContentBreaker::ContinuousContent pre-processes the candidate content to 
provide trailing/trimming information for InlineContentBreaker.
However we don't need that information until after we feed the content to line 
breaking.
Let's populate ContinuousContent lazily right before calling 
handleOverflowingTextContent.

(when content fits, we directly commit to line, otherwise
1. commit to ContinuousContent first
2. call InlineContentBreaker
3. commit the result to line)

This is ~10% progression on PerformanceTests/Layout/line-layout.html.

* Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp:
(WebCore::Layout::CandidateTextContent::append):
(WebCore::Layout::measuredInlineTextItem):
(WebCore::Layout::appendInlineTextItem):
(WebCore::Layout::TextOnlySimpleLineBuilder::placeInlineTextContent):
(WebCore::Layout::TextOnlySimpleLineBuilder::placeNonWrappingInlineTextContent):
(WebCore::Layout::TextOnlySimpleLineBuilder::handleOverflowingTextContent):
(WebCore::Layout::TextOnlySimpleLineBuilder::revertToTrailingItem):
(WebCore::Layout::TextOnlySimpleLineBuilder::revertToLastNonOverflowingItem):
(WebCore::Layout::TextOnlySimpleLineBuilder::availableWidth const):
(WebCore::Layout::inlineTextItemWidth): Deleted.
(WebCore::Layout::TextOnlySimpleLineBuilder::handleInlineTextContent): Deleted.
* Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.h:

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to