Repository navigation
Conversation
…level highlight bounds
…BoxesForCharRange
…getBoxesForCharRange
|
Thanks, this is close! 🙏 textScaler and the doc fix look good, and all 7 tests pass on my side. A few things before merge:
Small stuff:
The red "Layout Regression" check is not from your change, the workflow can't post comments on fork PRs. Ignore it, I'll fix it on our side. Thanks again! |
Keep contiguous text highlights merged without spanning replaced inline content.
|
Thanks for your patience, and apologies for missing these issues in my first pass. I’ve updated the merge behavior, strengthened the image and pre assertions, removed debugLineFragments(), corrected the docs and range comment, and moved the method next to the other selection APIs. I really appreciate your careful review and guidance. |
- Set ellipsisVisibleLength on truncFrag and ellipsisFrag during layout - Use ellipsisVisibleLength in debugLineFragments to exclude ellipsis glyph - Unify getSelectionRects and getBoxesForCharRange via shared helper - Document RenderHyperBox coordinate locality in getBoxesForCharRange - Drop stale commit hash in boxes_for_char_range_test - Add regression test for truncated text bounds at narrow width Refs brewkits#19
Follows up on the review feedback from #17.
Cherry-picked onto main (v1.10.0), devtools files excluded.
Commits included
Changes
getBoxesForCharRangeroutes through_getTextPainter()which constructsTextPainter(textScaler: _textScaler)- highlights stay accurate when the user changes system font size.BoxHeightStyle.tightwhile y-boundaries useline.top / line.height(not the tight box coords).debugFragments()does not report.white-space: pre- leading spaces at the selection edge are preserved, not trimmed by theisPreformattedguard.maxGapheuristic does not collapse the two word rects into one.debug_line_fragments_test.dart- covers wrapped fragment geometry, character ranges, line metadata, ruby text, ellipsis visibility, and the distinction fromdebugFragments().