[webkit-changes] [WebKit/WebKit] 729768: [IFC][Ruby] Annotation may take up space at half-l...
Alan Baradlay
noreply at github.com
Sat Jan 20 17:30:25 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7297682932ea12c54515ccf83378bac11bf4c39f
https://github.com/WebKit/WebKit/commit/7297682932ea12c54515ccf83378bac11bf4c39f
Author: Alan Baradlay <zalan at apple.com>
Date: 2024-01-20 (Sat, 20 Jan 2024)
Changed paths:
A LayoutTests/fast/ruby/annotation-with-line-gap-expected.html
A LayoutTests/fast/ruby/annotation-with-line-gap.html
M LayoutTests/fast/ruby/bopomofo-mixed-expected.txt
M LayoutTests/fast/ruby/ruby-expansion-cjk-3-expected.html
M LayoutTests/fast/ruby/ruby-expansion-cjk-4-expected.html
M LayoutTests/fast/ruby/ruby-expansion-cjk-5-expected.html
M LayoutTests/platform/ios/TestExpectations
M LayoutTests/platform/ios/fast/css/bidi-override-in-anonymous-block-expected.txt
M LayoutTests/platform/ios/fast/ruby/base-shorter-than-text-expected.txt
M LayoutTests/platform/ios/fast/ruby/bopomofo-expected.txt
M LayoutTests/platform/ios/fast/ruby/bopomofo-letter-spacing-expected.txt
M LayoutTests/platform/ios/fast/ruby/bopomofo-mixed-expected.txt
M LayoutTests/platform/ios/fast/ruby/bopomofo-rl-expected.txt
M LayoutTests/platform/ios/fast/ruby/nested-ruby-expected.txt
M LayoutTests/platform/ios/fast/ruby/ruby-empty-rt-expected.txt
M LayoutTests/platform/ios/fast/ruby/ruby-simple-expected.txt
M LayoutTests/platform/ios/fast/ruby/ruby-simple-rp-expected.txt
M LayoutTests/platform/ios/fast/ruby/ruby-text-before-after-content-expected.txt
M LayoutTests/platform/ios/fast/ruby/rubyDOM-remove-text2-expected.txt
M LayoutTests/platform/ios/fast/writing-mode/japanese-ruby-horizontal-bt-expected.txt
M LayoutTests/platform/ios/fast/writing-mode/japanese-ruby-vertical-lr-expected.txt
M LayoutTests/platform/ios/fast/writing-mode/japanese-ruby-vertical-rl-expected.txt
M LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-ruby/br-clear-all-001-expected.txt
M LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-ruby/br-clear-all-002-expected.txt
M LayoutTests/platform/mac/fast/ruby/bopomofo-expected.txt
M LayoutTests/platform/mac/fast/ruby/bopomofo-letter-spacing-expected.txt
M LayoutTests/platform/mac/fast/ruby/bopomofo-rl-expected.txt
M LayoutTests/platform/mac/fast/ruby/nested-ruby-expected.txt
M LayoutTests/platform/mac/fast/writing-mode/japanese-ruby-horizontal-bt-expected.txt
M LayoutTests/platform/mac/fast/writing-mode/japanese-ruby-vertical-lr-expected.txt
M LayoutTests/platform/mac/fast/writing-mode/japanese-ruby-vertical-rl-expected.txt
M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp
M Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h
Log Message:
-----------
[IFC][Ruby] Annotation may take up space at half-leading
https://bugs.webkit.org/show_bug.cgi?id=267751
<rdar://121072633>
Reviewed by Antti Koivisto.
1. Annotation box height should not incorporate half-leading/line-height (annotation box's line is not the dominant line)
2. Adjust annotation box contribution to line height to match legacy ruby as follows:
- annotation box can use half-leading space (gap between lines)
- check if line-height provides sufficient space for annotation
* LayoutTests/fast/ruby/annotation-with-line-gap-expected.html: Added.
* LayoutTests/fast/ruby/annotation-with-line-gap.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:
(WebCore::Layout::LineBoxBuilder::setLayoutBoundsForInlineBox const):
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp:
(WebCore::Layout::RubyFormattingContext::adjustLayoutBoundsAndStretchAncestorRubyBase):
(WebCore::Layout::RubyFormattingContext::applyAnnotationContributionToLayoutBounds):
Canonical link: https://commits.webkit.org/273268@main
More information about the webkit-changes
mailing list