Closed
Bug 385123
Opened 18 years ago
Closed 18 years ago
Incorrect glyphrun assignment with gfxTextRunWordCache
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
People
(Reporter: roc, Assigned: roc)
References
Details
Attachments
(2 files)
15.62 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
10.86 KB,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
gfxTextRunWordCache creates a textrun by calling AddGlyphRun for each space and word in the cache, and then going back and calling AddGlyphRun for each word not in the cache. This is incorrect since AddGlyphRun should only be used to assign glyph runs sequentially. Much of the time this error is masked because AddGlyphRun is a no-op when the font isn't changing.
The fix is to ensure that, once we have at least one deferred word (i.e. a "hole" in the textrun we're building), nothing is added to the new textrun, including spaces. Instead spaces are added in FinishTextRun after the word preceding the spaces.
Attachment #269016 -
Flags: review?(vladimir)
Assignee | ||
Comment 1•18 years ago
|
||
Cleaned up vlad's word-cache test, and made it actually cause an assertion on my system. Also make gfxFontSelectionTests use gfxTextRunWordCache, which would have caught this bug.
Attachment #269017 -
Flags: review?(vladimir)
Attachment #269017 -
Flags: review?(vladimir) → review+
Assignee | ||
Comment 2•18 years ago
|
||
Comment on attachment 269016 [details] [diff] [review]
fix
This was r=vlad
Attachment #269016 -
Flags: review?(vladimir) → review+
Assignee | ||
Comment 3•18 years ago
|
||
This was checked in.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•