If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Tab characters in fixed width text shouldn't expand to nothing

VERIFIED FIXED

Status

()

Core
Layout: Text
P2
normal
VERIFIED FIXED
10 years ago
10 years ago

People

(Reporter: jag (Peter Annema), Assigned: roc)

Tracking

({regression, testcase})

Trunk
x86
Mac OS X
regression, testcase
Points:
---
Bug Flags:
blocking1.9 +
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

10 years ago
See the attached test case. Basically a tab character shouldn't expand to 0 spaces, it should become 8 spaces in that case. This is a regression.
What testcase?
(Reporter)

Comment 2

10 years ago
Created attachment 308965 [details]
test case with correct and incorrect rendering as ascii art

Curses! Bugzilla didn't get it the first time (as part of filing this report) and asked me to try again, and I don't recall seeing any warning the second time around. Alright, attached now :-)
Hmm, should be easy to fix
Assignee: nobody → roc
Flags: blocking1.9?
(Reporter)

Comment 4

10 years ago
That's what I was hoping to hear :-)
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
Created attachment 309853 [details] [diff] [review]
fix

The problem is that we were multiplying the space width by 8 before converting to appunits and rounding to get the tab width, which gives different (and sometimes smaller) results than converting the character width to appunits and then multiplying by 8, which is what we actually get when we put 8 characters together.
Attachment #309853 - Flags: review?(smontagu)
Whiteboard: [needs review]
(Reporter)

Comment 6

10 years ago
Comment on attachment 309853 [details] [diff] [review]
fix

Do you need the |spaceWidthAppUnits| intermediate? Also, maybe add spaces around |*|?
(In reply to comment #6)
> (From update of attachment 309853 [details] [diff] [review])
> Do you need the |spaceWidthAppUnits| intermediate?

Not really, but it's helpful documentation.

> Also, maybe add spaces around |*|?

I don't think we have style guidelines for that. I like * to bind tightly just like in real mathematics.

Updated

10 years ago
Attachment #309853 - Flags: review?(smontagu) → review+
(Reporter)

Comment 8

10 years ago
Fair enough.
Checked in
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs review]
verified fixed using the testcase and Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b5pre) Gecko/2008032615 Firefox/3.0b5pre ID:2008032615
Status: RESOLVED → VERIFIED
Keywords: testcase
You need to log in before you can comment on or make changes to this bug.