Repository navigation
fix(textbox): Draw spell-check squiggles below the descenders (6.7, backport of #25392) - #25935
Merged
agneszitte merged 2 commits intoNov 2, 2026
Conversation
The squiggle crossed the descenders of g, y and p. A text box's text is clipped to its lines by the scroll presenter, and the line box ends less than a pixel below the descenders, so the wave was clamped into the line and overlapped them. The wave's top edge now sits on the font's descent, below the line box. The parsed text no longer draws the squiggles with the text: IParsedText.DrawSpellCheckSquiggles draws them on request, and TextBoxView draws them in a layer on its content element, clipped to the padding box, so the text's own clipping is unchanged. The layer follows scrolling and repaints when the text is parsed again. Backport of unoplatform#25392, adapted to 6.8's SkiaSharp text stack. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> (cherry picked from commit f03ee12)
Checks the squiggle is drawn below the text's descenders, and that it scrolls out of view with its word. Backport of unoplatform#25392. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> (cherry picked from commit 0b341f8)
ramezgerges
enabled auto-merge
November 2, 2026 17:02
Xiaoy312
approved these changes
Nov 2, 2026
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
agneszitte
disabled auto-merge
November 2, 2026 20:41
agneszitte
merged commit Nov 2, 2026
0a76d89
into
unoplatform:release/stable/6.7
42 of 47 checks passed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue: related to unoplatform/kahua-private#556 (backport of #25392 via #25620)
PR Type:
🐞 Bugfix
What changed? 🚀
This backports #25392 to
release/stable/6.7, by cherry-picking the two commits of its 6.8 backport #25620, which apply cleanly. 6.7 shares 6.8's text stack, so the 6.8 adaptation applies unchanged. As for 6.8, the fix doesn't cherry-pick from master directly: 6.7 has the SkiaSharp text stack (UnicodeText.skia.cs,SKCanvaspainting) and no managed RichEditBox, so only the TextBox half applies. It's adapted as follows.In a TextBox, the spell-check squiggle overlapped the descenders of g, y and p. The text is clipped to its lines by the
ScrollContentPresenter, and the line box ends less than a pixel below the descenders. The wave was therefore clamped into the line and overlapped them.SKFontMetrics.Descent), below the line box.UnicodeText.Drawno longer draws the squiggles.IParsedText.DrawSpellCheckSquiggles(SKCanvas, opacity)draws them on request, in the text's own coordinates.TextBoxViewdraws them in a layer on the TextBox's content element (TextBoxView.SpellCheck.skia.cs):TextBox.skia.csattaches it where it sets up theTextBoxView.Differences from master (same as in #25620):
ElementCompositionPreview.SetElementChildVisualwraps the visual in a new container on each call and can't takenullto remove it.Validation (Skia desktop on Windows,
SamplesApp.Skia.Genericnet10.0, built from this branch):When_SpellCheck_Squiggle_Is_Below_Descenders(14)When_SpellCheck_Squiggle_Is_Below_Descenders(20)When_SpellCheck_Squiggle_Scrolled_Out_Of_ViewThe tests are restricted to Skia (
PlatformCondition Include Skia), since this file also runs on 6.7's native heads.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code