Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 93a5b7d1fbc26316baaedc8a1d6483428159c048
      
https://github.com/WebKit/WebKit/commit/93a5b7d1fbc26316baaedc8a1d6483428159c048
  Author: Alan Baradlay <[email protected]>
  Date:   2023-02-11 (Sat, 11 Feb 2023)

  Changed paths:
    M 
Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/InlineLineTypes.h

  Log Message:
  -----------
  [IFC][Partial layout] Convert PartialInlineItem's length to endOffset
https://bugs.webkit.org/show_bug.cgi?id=252028

Reviewed by Antti Koivisto.

Currently when an InlineTextItem overflows the line, we store the length of the 
overflowing
content in PartialInlineItem. When we start laying out the subsequent line we 
use
this length to create a leading run out of the overflowing InlineTextItem.
With this patch we transition from length to offset (breaking position).
(e.g. when foobar overflows at [foob][ar], length is 2 while offset is 4)
This is going to be used by partial layout as well, when the last line
start at an InlineTextItem offset.

* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::indexOfFirstInlineItemForNextLine):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::partialOverflowingContent):
(WebCore::Layout::LineBuilder::layoutInlineContent):
(WebCore::Layout::LineBuilder::computedIntrinsicWidth):
(WebCore::Layout::LineBuilder::initialize):
* Source/WebCore/layout/formattingContexts/inline/InlineLineTypes.h:
(WebCore::Layout::PartialInlineItem::endOffset const):
(WebCore::Layout::PartialInlineItem::length const): Deleted.

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


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

Reply via email to