[webkit-changes] [WebKit/WebKit] 5e33b7: Adding `text-autospace: normal` causes some pages ...
Vitor Roriz
noreply at github.com
Tue Feb 11 07:46:43 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5e33b70649807c4c933a35e6bc7d16bd3a600c4a
https://github.com/WebKit/WebKit/commit/5e33b70649807c4c933a35e6bc7d16bd3a600c4a
Author: Vitor Roriz <vitor.roriz at apple.com>
Date: 2025-02-11 (Tue, 11 Feb 2025)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-autospace/crashtests/text-autospace-ruby-crash-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-autospace/crashtests/text-autospace-ruby-crash-ref.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-autospace/crashtests/text-autospace-ruby-crash.html
M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp
Log Message:
-----------
Adding `text-autospace: normal` causes some pages to crash
https://bugs.webkit.org/show_bug.cgi?id=287423
rdar://144554727
Reviewed by Alan Baradlay.
We track box boundary text spacing with inlineBoxBoundaryTextSpacings by storing
the indexes to inline box start items which represent such a boundary.
When calculating width of inline text items at computeContentAttributesAndInlineTextItemWidths,
we check if the item before it was registered in inlineBoxBoundaryTextSpacings. If so, we
add text spacing to its width for layout (On drawing it will be placed between the box boundaries).
The crash here was that we forgot to skip the check for index 0.
Besides fixing it, We are also giving a name for such index for improving readability.
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-autospace/crashtests/text-autospace-ruby-crash-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-autospace/crashtests/text-autospace-ruby-crash-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-autospace/crashtests/text-autospace-ruby-crash.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::InlineItemsBuilder::computeContentAttributesAndInlineTextItemWidths):
Canonical link: https://commits.webkit.org/290211@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