Closed Bug 264477 Opened 20 years ago Closed 20 years ago

Use proper minus character for XML document tree display

Categories

(Core :: XML, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED

People

(Reporter: ldeller, Assigned: Stefan.Borggraefe)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; WinNT5.0; en-GB; 1.7.2; DontTellStGeorgeInternetBankingSiteThatImRunningGentooLinux) Gecko/20040831
Build Identifier: Mozilla/5.0 (Windows; U; WinNT5.0; en-GB; 1.7.2; DontTellStGeorgeInternetBankingSiteThatImRunningGentooLinux) Gecko/20040831

An XML file without style information is displayed by showing the document tree.
 Next to most XML elements, there is a plus or a minus to control
expanding/collapsing the children of that element.  Unfortunately it uses an
ASCII hyphen character rather than a proper minus character (− a.k.a
−), so the minus looks much narrower than the plus.

Reproducible: Always
Steps to Reproduce:
1.Open an XML document in mozilla which doesn't have style information (see URL
for an example)
2.Collapse one of the elements by clicking on the "-" to its left


Actual Results:  
Note that the "+" is much wider than the "-"

Expected Results:  
The minus character should match the plus character in width.
I agree, this looks much better.
Assignee: nobody → Stefan.Borggraefe
Component: Layout → XML
OS: Linux → All
Hardware: PC → All
Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: core.layout → ashshbhatt
Attached patch PatchSplinter Review
Comment on attachment 162177 [details] [diff] [review]
Patch

bz: I saw you did some reviews for these files in the past. Can you do this
one, too? Thanks! :-)
Attachment #162177 - Flags: superreview?(bzbarsky)
Attachment #162177 - Flags: review?(bzbarsky)
Comment on attachment 162177 [details] [diff] [review]
Patch

This needs OK from sicking.  Also, how common is this character in fonts?  That
is, what's the chance that we'll actually get worse rendering?
Attachment #162177 - Flags: review?(bzbarsky) → review?(bugmail)
Comment on attachment 162177 [details] [diff] [review]
Patch

r=me if the issue bz brought up isn't a problem. This goes both for the default
font, and the font you get if you choose view->Use Style->monospace. In other
words, how common is this character in monospace fonts?
Attachment #162177 - Flags: review?(bugmail) → review+
If comment #4 is a real issue, a possible alternative solution would be to use a
monospaced font (where the ASCII minus has the same width as the plus) for the
pluses and minuses only, in the default style (still using a proportional font
for everything else).
Re comment #4, if the minus character is not available, then mozilla falls back
to using the ASCII hyphen (see bug 232931), so we'd be no worse off than before.
have you actually tested this? Or is this just how it should work?
Comment on attachment 162177 [details] [diff] [review]
Patch

Luke's right.  The minus char is one of the ones we do fallback for; I totally
forgot that.  sr=me.
Attachment #162177 - Flags: superreview?(bzbarsky) → superreview+
Fix checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: