[webkit-changes] [WebKit/WebKit] 639f7f: [IFC] Introduce RangeBasedLineBuilder

Alan Baradlay noreply at github.com
Thu Mar 21 17:11:34 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 639f7f3a3aa1ea0b6060337b0b18433cdca6af01
      https://github.com/WebKit/WebKit/commit/639f7f3a3aa1ea0b6060337b0b18433cdca6af01
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2024-03-21 (Thu, 21 Mar 2024)

  Changed paths:
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/layout/formattingContexts/inline/AbstractLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/AbstractLineBuilder.h
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLine.h
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/IntrinsicWidthHandler.cpp
    A Source/WebCore/layout/formattingContexts/inline/RangeBasedLineBuilder.cpp
    A Source/WebCore/layout/formattingContexts/inline/RangeBasedLineBuilder.h
    M Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.h

  Log Message:
  -----------
  [IFC] Introduce RangeBasedLineBuilder
https://bugs.webkit.org/show_bug.cgi?id=271359

Reviewed by Antti Koivisto.

RangeBasedLineBuilder is meant to support a mix of content where a simplified line builder can be used on
well-defined content range(s).
Currently it supports a very simple case only where text content is nested inside an inline box.

  e.g. <div><span>this is text only content</span></div>

In this case we can use the TextOnlySimpleLineBuilder for the nested content while adjusting the result
with the enclosing inline box geometry.

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layout):
* Source/WebCore/layout/formattingContexts/inline/InlineLine.h:
* Source/WebCore/layout/formattingContexts/inline/RangeBasedLineBuilder.cpp: Added.
(WebCore::Layout::RangeBasedLineBuilder::RangeBasedLineBuilder):
(WebCore::Layout::RangeBasedLineBuilder::layoutInlineContent):
(WebCore::Layout::RangeBasedLineBuilder::isEligibleForRangeInlineLayout):
* Source/WebCore/layout/formattingContexts/inline/RangeBasedLineBuilder.h: Added.

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list