[webkit-changes] [WebKit/WebKit] bc0673: [IFC] TextOnlyLineBuilder should handle content sp...
Alan Baradlay
noreply at github.com
Thu Aug 17 13:29:31 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: bc0673fa28a2a131cf39dafaba152fc295631801
https://github.com/WebKit/WebKit/commit/bc0673fa28a2a131cf39dafaba152fc295631801
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-08-17 (Thu, 17 Aug 2023)
Changed paths:
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.h
M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp
M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.h
Log Message:
-----------
[IFC] TextOnlyLineBuilder should handle content split between boxes
https://bugs.webkit.org/show_bug.cgi?id=260282
Reviewed by Antti Koivisto.
When continuous inline text content is split between boxes (and therefore between InlineTextItems) (e.g. createTextNode()) we need to be able to figure out
if there's a soft wrap opportunity between such inline items. This patch adds this ability to TextOnlyLineBuilder by reusing InlineLineBuilder's endsWithSoftWrapOpportunity logic.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp:
(WebCore::Layout::endsWithSoftWrapOpportunity):
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::InlineItemsBuilder::handleTextContent):
* Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp:
(WebCore::Layout::TextOnlySimpleLineBuilder::placeInlineTextContent):
(WebCore::Layout::TextOnlySimpleLineBuilder::handleInlineTextContent):
(WebCore::Layout::TextOnlySimpleLineBuilder::revertToTrailingItem):
(WebCore::Layout::TextOnlySimpleLineBuilder::revertToLastNonOverflowingItem):
(WebCore::Layout::TextOnlySimpleLineBuilder::rebuildLine): Deleted.
* Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.h:
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::mayBreakInBetween):
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.h:
Canonical link: https://commits.webkit.org/267011@main
More information about the webkit-changes
mailing list