[webkit-changes] [WebKit/WebKit] 93a5b7: [IFC][Partial layout] Convert PartialInlineItem's ...
Alan Baradlay
noreply at github.com
Sat Feb 11 07:44:50 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 93a5b7d1fbc26316baaedc8a1d6483428159c048
https://github.com/WebKit/WebKit/commit/93a5b7d1fbc26316baaedc8a1d6483428159c048
Author: Alan Baradlay <zalan at apple.com>
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
More information about the webkit-changes
mailing list