Closed Bug 377923 Opened 17 years ago Closed 17 years ago

Visible newline glyph in preformatted text with new textframe

Categories

(Core :: Graphics, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: smontagu, Assigned: roc)

References

Details

(Keywords: testcase)

Attachments

(2 files)

Attached file Testcase
With the new textframe turned on I see a funny little glyph (a white circle on a black background) at the end of every line in preformatted text.
Blocks: 367177
Comments in gfxFont.h say "\r and \n characters must be ignored completely", but I can't find any code that does so.
Ok, we can fix this by modifying glyph extraction to make all \r and \n characters just call SetCharacterGlyph(offset, g.SetMissing()).
Will need doing for Linux/Pango too, and I assume others.
OS: Windows XP → All
Doing what comment 2 says leaves us with a bug in caret browsing, where the caret appears to stick at the end of each line as it moves across the invisible newline.
I think that's a textframe issue, then.
Attached patch fixSplinter Review
This patch makes \r, \n and \t guaranteed to be invisible and zero-width on all platforms. This is what nsTextFrameThebes wants. It could be handled by layout but that would require us to keep an extra copy of preformatted text in most situations, which is probably good to avoid (large plain-text files are an important test case).
Assignee: nobody → roc
Status: NEW → ASSIGNED
Attachment #265209 - Flags: review?(vladimir)
Comment on attachment 265209 [details] [diff] [review]
fix

switching review to stuart
Attachment #265209 - Flags: review?(vladimir) → review?(pavlov)
Attachment #265209 - Flags: review?(pavlov) → review+
checked in
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: