Repository navigation
fix(textbox): Draw spell-check squiggles below the descenders (6.8, backport of #25392) - #25620
Merged
ramezgerges merged 2 commits intoOct 29, 2026
Conversation
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
Contributor
|
The build 240637 did not find any UI Test snapshots differences. |
Contributor
|
|
ajpinedam
approved these changes
Oct 24, 2026
ramezgerges
enabled auto-merge
October 26, 2026 17:59
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
Contributor
|
|
2 of 5 tasks
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]>
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]>
ramezgerges
force-pushed
the
dev/rara/spellcheck-squiggle-6.8
branch
from
October 28, 2026 00:16
ac021dc to
0b341f8
Compare
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
Contributor
|
The build 242068 did not find any UI Test snapshots differences. |
Merged
1 task done
Merged
2 of 5 tasks
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)
PR Type:
🐞 Bugfix
What changed? 🚀
This backports #25392 to
servicing/6.8. It doesn't cherry-pick: 6.8 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:
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):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.8's native heads.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code