Repository navigation
fix(textbox): Draw spell-check squiggles below the descenders - #25392
ramezgerges merged 2 commits into
Conversation
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-25392/wasm-skia-net9/index.html |
|
The build 239190 found UI Test snapshots differences: Details
|
65123bc to
7547c67
Compare
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. TextBox and RichEditBox both host their text through TextBoxView. The layer follows scrolling and repaints when the text is parsed again. 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. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
7547c67 to
29b0b42
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-25392/wasm-skia-net9/index.html |
|
The build 239223 found UI Test snapshots differences: Details
|
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
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]>
…le-6.8 fix(textbox): Draw spell-check squiggles below the descenders (6.8, backport of #25392)
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 #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 #25392. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> (cherry picked from commit 0b341f8)
…le-6.7 fix(textbox): Draw spell-check squiggles below the descenders (6.7, backport of #25392)
GitHub Issue: closes unoplatform/kahua-private#556
PR Type:
🐞 Bugfix
What changed? 🚀
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.Draw.IParsedText.DrawSpellCheckSquigglesdraws them on request, in the text's own coordinates.TextBoxViewdraws them in a layer on its content element, usingElementCompositionPreview.SetElementChildVisual. TextBox and RichEditBox both host their text throughTextBoxView, so both get the fix.The squiggle can't be fixed by extending the presenter's clip instead. In a multi-line TextBox, that would let the next line's text show through the bottom padding.
Validation
Given_TextBox.When_SpellCheck_Squiggle_Is_Below_Descenders(font sizes 14 and 20) fails before the fix and passes after it.Given_TextBox.When_SpellCheck_Squiggle_Scrolled_Out_Of_Viewpasses.Given_RichEditBox.When_SpellCheck_Squiggle_Is_Below_Descenderspasses. It fails if RichEditBox doesn't attach the layer, so it guards against RichEditBox losing its squiggles.Given_TextBox,Given_TextBlock,Given_PasswordBoxandGiven_RichEditBox: 1,434 passed, 26 skipped, 0 failed.TextBox_Simple): the squiggle sits below the descenders.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code