[webkit-changes] [WebKit/WebKit] 722de1: Using ruby tag within a hanging-punctuation specif...
Alan Baradlay
noreply at github.com
Wed Mar 13 08:38:39 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 722de1a0a5f59ea87d662ccbc9c304b7bbf0e76c
https://github.com/WebKit/WebKit/commit/722de1a0a5f59ea87d662ccbc9c304b7bbf0e76c
Author: Alan Baradlay <zalan at apple.com>
Date: 2024-03-13 (Wed, 13 Mar 2024)
Changed paths:
A LayoutTests/fast/text/hanging-punctuation-with-bidi-expected.html
A LayoutTests/fast/text/hanging-punctuation-with-bidi.html
M Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLine.h
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/LineLayoutResult.h
M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp
Log Message:
-----------
Using ruby tag within a hanging-punctuation specifies element, hanging appears not to apply.
https://bugs.webkit.org/show_bug.cgi?id=270780
<rdar://problem/124386802>
Reviewed by Antti Koivisto.
Let's take punctuation offset into account when processing (left-to-right) bidi based inline content.
1. Pass leading punctuation width over to display content build as part of the line layout result
2. Offset "visual left start position" with the punctuation width (negative offset)
- non-bidi content works fine as we already take this negative offset into account while building the line -which we lose when dealing with bidi reordering
- right-to-left is also fine as punctuation width being visually trailing does not contribute to visual left
* LayoutTests/fast/text/hanging-punctuation-with-bidi-expected.html: Added.
* LayoutTests/fast/text/hanging-punctuation-with-bidi.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp:
(WebCore::Layout::Line::close):
* Source/WebCore/layout/formattingContexts/inline/InlineLine.h:
(WebCore::Layout::Line::HangingContent::leadingPunctuationWidth const):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::layoutInlineContent):
* Source/WebCore/layout/formattingContexts/inline/LineLayoutResult.h:
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):
Canonical link: https://commits.webkit.org/276026@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