Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[leading-trim][IFC] Add support for leading-trim on non-root inline b…
…oxes https://bugs.webkit.org/show_bug.cgi?id=248644 Reviewed by Antti Koivisto. This patch adds initial support for leading-trim on non-root inline boxes. "leading-trim" consults "text-edge" and trims the over/under sides accordingly. Trimming here means that the content box of the inline box shrinks to match what "text-edge" says. It also means that now the content logical top inside the inline box does not necessarily match the inline box's logical top. e.g. when text-edge says "ex" and leading-trim says "start", the "over ex" part of the text content starts overflowing the inline box's content box, or in other words the text content's top position is above the containing inline box's top. * Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h: (WebCore::Layout::InlineLevelBox::leadingTrim const): (WebCore::Layout::InlineLevelBox::inlineBoxContentOffsetForLeadingTrim const): (WebCore::Layout::InlineLevelBox::setInlineBoxContentOffsetForLeadingTrim): (WebCore::Layout::m_style): * Source/WebCore/layout/formattingContexts/inline/InlineLineBox.cpp: (WebCore::Layout::LineBox::logicalRectForTextRun const): * Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp: (WebCore::Layout::LineBoxBuilder::computedAsentAndDescentForInlineBox const): (WebCore::Layout::LineBoxBuilder::setVerticalPropertiesForInlineLevelBox const): * Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.h: Canonical link: https://commits.webkit.org/257338@main
- Loading branch information
1 parent
fc7f341
commit 951ce5d
Showing
4 changed files
with
69 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters