Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b7dcd15f16d4e1cb441b6eb030b8e8312af4f1b9
https://github.com/WebKit/WebKit/commit/b7dcd15f16d4e1cb441b6eb030b8e8312af4f1b9
Author: Alan Baradlay <[email protected]>
Date: 2026-02-23 (Mon, 23 Feb 2026)
Changed paths:
A LayoutTests/fast/inline/glyph-overflow-with-pagination-fail-expected.html
A LayoutTests/fast/inline/glyph-overflow-with-pagination-fail.html
M Source/WebCore/layout/formattingContexts/inline/InlineItem.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineItem.h
M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLine.h
M Source/WebCore/layout/formattingContexts/inline/InlineTextItem.h
M
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp
M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp
M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.h
Log Message:
-----------
[IFC] Inflated glyph overflow leads to line shifts when paginated
https://bugs.webkit.org/show_bug.cgi?id=308389
Reviewed by Antti Koivisto.
1. 305325@main implemented glyph overflow computation but it broke paginated
line placement with certain fonts (see webkit.org/b/308087)
2. 307942@main reverted 305325@main.
This change
1. reverts 307942@main (the revert)
2. and fixes webkit.org/b/308087 by not over-inflating glyph overflow anymore
(Over-inflation was caused by treating GlyphOverflow.top and .bottom as
overflow deltas, when they actually represent maximum glyph bounds)
* LayoutTests/fast/inline/glyph-overflow-with-pagination-fail-expected.html:
Added.
* LayoutTests/fast/inline/glyph-overflow-with-pagination-fail.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineItem.cpp:
* Source/WebCore/layout/formattingContexts/inline/InlineItem.h:
* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::nonWhitespaceContentWidth):
(WebCore::Layout::InlineItemsBuilder::computeInlineTextItemWidthsAndTextSpacing):
(WebCore::Layout::InlineItemsBuilder::buildInlineItemListForTextFromBreakingPositionsCache):
(WebCore::Layout::InlineItemsBuilder::handleTextContent):
* Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp:
(WebCore::Layout::Line::Run::Run):
(WebCore::Layout::Line::Run::expand):
* Source/WebCore/layout/formattingContexts/inline/InlineLine.h:
(WebCore::Layout::Line::Run::GlyphOverflow::isEmpty const):
(WebCore::Layout::Line::Run::glyphOverflow const):
* Source/WebCore/layout/formattingContexts/inline/InlineTextItem.h:
(WebCore::Layout::InlineTextItem::glyphOverflow const):
(WebCore::Layout::InlineTextItem::createNonWhitespaceItem):
(WebCore::Layout::InlineTextItem::setGlyphOverflow):
*
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::appendTextDisplayBox):
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::width):
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.h:
(WebCore::Layout::TextUtil::width):
Canonical link: https://commits.webkit.org/308037@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications