Closed Bug 746279 Opened 9 years ago Closed 9 years ago

pack nsFont more carefully

Categories

(Core :: Graphics: Text, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
nsFont is currently laid out like so:

  nsString name;
  PRUint8 style;
  PRUint8 systemFont;
  PRUint8 variant;
  PRUint16 weight;
  PRInt16 stretch;
  PRUint8 decorations;
  nscoord size;
  // ...plus a bit more.

This layout introduces holes after 'decorations' and 'variant' or 'stretch', depending on the wordsize of the machine.  This can be fixed rather easily by moving 'decorations' after 'variant', which nicely plugs the hole(s) everywhere.
Attachment #615825 - Flags: review?(jdaggett)
Comment on attachment 615825 [details] [diff] [review]
patch

Sure, looks reasonable.
Attachment #615825 - Flags: review?(jdaggett) → review+
http://hg.mozilla.org/projects/birch/rev/7c9665fc65c8
Assignee: nobody → nfroyd
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/7c9665fc65c8
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in before you can comment on or make changes to this bug.