Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c310b02276953cd72ce53b9c8ec72d5d8a977d45
https://github.com/WebKit/WebKit/commit/c310b02276953cd72ce53b9c8ec72d5d8a977d45
Author: Yusuke Suzuki <[email protected]>
Date: 2024-04-26 (Fri, 26 Apr 2024)
Changed paths:
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/platform/graphics/FontCascade.cpp
Log Message:
-----------
[WebCore] Optimize text layout building
https://bugs.webkit.org/show_bug.cgi?id=273301
rdar://127095998
Reviewed by Alan Baradlay.
This does micro-optimizations for Text Layout.
1. TextUtil::containsStrongDirectionalityText should use StringView::codePoints.
2. FontCascade::characterRangeCodePath should first take size and data from
span.
3. TextOnlySimpleLineBuilder should take rootStyle and threading it through
line building code.
4. InlineItemsBuilder should appropriately expand the Vector capacity before
appending items in loop.
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::InlineItemsBuilder::buildInlineItemListForTextFromBreakingPositionsCache):
(WebCore::Layout::InlineItemsBuilder::handleTextContent):
* Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.cpp:
(WebCore::Layout::TextOnlySimpleLineBuilder::layoutInlineContent):
(WebCore::Layout::TextOnlySimpleLineBuilder::placeInlineTextContent):
(WebCore::Layout::TextOnlySimpleLineBuilder::placeNonWrappingInlineTextContent):
(WebCore::Layout::TextOnlySimpleLineBuilder::commitCandidateContent):
(WebCore::Layout::TextOnlySimpleLineBuilder::handleOverflowingTextContent):
(WebCore::Layout::TextOnlySimpleLineBuilder::handleLineEnding):
(WebCore::Layout::TextOnlySimpleLineBuilder::revertToTrailingItem):
(WebCore::Layout::TextOnlySimpleLineBuilder::revertToLastNonOverflowingItem):
* Source/WebCore/layout/formattingContexts/inline/TextOnlySimpleLineBuilder.h:
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::containsStrongDirectionalityText):
Canonical link: https://commits.webkit.org/278044@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes