XUL treeview cells containing supplementary characters may be cropped in mid-surrogate-pair
Categories
(Core :: XUL, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox108 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame)
References
Details
Attachments
(1 file)
STR from https://bugzilla.mozilla.org/show_bug.cgi?id=404856#c30:
Visit the testcases attachment 739762 [details] and attachment 8719500 [details]; then choose Show All History to open the Library window and view the entries in the recent history, and resize the Name column (or the overall window) so that truncation occurs.
Result: as the width varies, the titles containing supplementary-plane characters sometimes break mid-surrogate-pair and display a single surrogate code as a hexbox.
Assignee | ||
Comment 1•2 years ago
|
||
This is basically copied from how nsTextBoxFrame handles truncation, and avoids breaking surrogate pairs
(or other grapheme clusters such as base character + diacritic). It's still a "poor man's" version
of truncation that doesn't correctly measure the string in the presence of complex font shaping.
Longer-term, we should unify all this kind of truncation/ellipsizing of labels etc to use an implementation
based on CSS text-overflow, but that doesn't yet support center-cropping so it's not a drop-in replacement.
So I think we should do this as an interim measure to fix the most egregious brokenness, and make treeview
cells at least work similarly to textbox labels.
Tested manually; seems difficult to do automated tests as it'd be sensitive to exact glyph metrics.
Updated•2 years ago
|
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d31170282eb9 Avoid breaking surrogate pairs etc when truncating titles in nsTreeBodyFrame.cpp. r=emilio
Comment 4•2 years ago
|
||
bugherder |
Description
•