Closed Bug 385123 Opened 18 years ago Closed 18 years ago

Incorrect glyphrun assignment with gfxTextRunWordCache

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: roc, Assigned: roc)

References

Details

Attachments

(2 files)

Attached patch fix (deleted) — 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)
Attached patch tests (deleted) — Splinter Review
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)
Comment on attachment 269016 [details] [diff] [review]
fix

This was r=vlad
Attachment #269016 - Flags: review?(vladimir) → review+
This was checked in.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Depends on: 440594
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: