Last Comment Bug 746279 - pack nsFont more carefully
: pack nsFont more carefully
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics: Text (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla15
Assigned To: Nathan Froyd [:froydnj]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-17 12:34 PDT by Nathan Froyd [:froydnj]
Modified: 2012-04-24 18:04 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (1.33 KB, patch)
2012-04-17 12:34 PDT, Nathan Froyd [:froydnj]
jd.bugzilla: review+
Details | Diff | Review

Description Nathan Froyd [:froydnj] 2012-04-17 12:34:02 PDT
Created attachment 615825 [details] [diff] [review]
patch

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.
Comment 1 John Daggett (:jtd) 2012-04-17 17:52:56 PDT
Comment on attachment 615825 [details] [diff] [review]
patch

Sure, looks reasonable.
Comment 2 Nathan Froyd [:froydnj] 2012-04-20 13:20:39 PDT
http://hg.mozilla.org/projects/birch/rev/7c9665fc65c8
Comment 3 :Ehsan Akhgari (out sick) 2012-04-24 18:04:58 PDT
https://hg.mozilla.org/mozilla-central/rev/7c9665fc65c8

Note You need to log in before you can comment on or make changes to this bug.