Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d6580489bce9662c8406afe674f26932ca3a835a
https://github.com/WebKit/WebKit/commit/d6580489bce9662c8406afe674f26932ca3a835a
Author: Alan Baradlay <[email protected]>
Date: 2025-01-31 (Fri, 31 Jan 2025)
Changed paths:
A LayoutTests/fast/repaint/emoji-glyph-overflow-repaint-fail-expected.txt
A LayoutTests/fast/repaint/emoji-glyph-overflow-repaint-fail.html
M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp
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
M Source/WebCore/layout/integration/LayoutIntegrationBoxTreeUpdater.cpp
M Source/WebCore/layout/layouttree/LayoutInlineTextBox.h
M Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp
M Source/WebCore/platform/graphics/ComplexTextController.cpp
M Source/WebCore/platform/graphics/ComplexTextController.h
M Source/WebCore/platform/graphics/FontCascade.h
M Source/WebCore/rendering/RenderText.cpp
M Source/WebCore/rendering/RenderText.h
Log Message:
-----------
Emoji is cut off when typing on the same line as text
https://bugs.webkit.org/show_bug.cgi?id=286593
<rdar://142911299>
Reviewed by Antti Koivisto.
enclosingGlyphBoundsForRunWithIterator fails to provide correct glyph bounds
for certain,
complex content where finding the correct font requires slightly involved logic
(e.g. emoji with variant selector).
-essentially we pick the wrong font and find no glyph overflow.
Figuring out the correct font for complex content is part of
ComplexTextController's collectComplexTextRunsForCharacters.
This patch adds 'static enclosingGlyphBoundsForTextRun' to
ComplexTextController() which returns glyph bounds after consulting
collectComplexTextRunsForCharacters
to make sure we use the correct font.
* LayoutTests/fast/repaint/emoji-glyph-overflow-repaint-fail-expected.txt:
Added.
* LayoutTests/fast/repaint/emoji-glyph-overflow-repaint-fail.html: Added.
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::enclosingGlyphBoundsForRunWithIterator):
(WebCore::Layout::TextUtil::enclosingGlyphBoundsForText):
* Source/WebCore/platform/graphics/ComplexTextController.cpp:
(WebCore::ComplexTextController::ComplexTextController):
(WebCore::ComplexTextController::enclosingGlyphBoundsForTextRun):
* Source/WebCore/platform/graphics/ComplexTextController.h:
Canonical link: https://commits.webkit.org/289610@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes