Closed Bug 391621 Opened 17 years ago Closed 17 years ago

Remove unused trimmed-space counting

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: roc, Assigned: roc)

Details

Attachments

(1 file)

Attached patch fixSplinter Review
In bug 385719 I removed Metrics::mClusterCount, without noticing that it was still used by nsTextFrameThebes::Reflow to compute the "number of letters" justification weight. To fix the bustage I just replaced usage of mClusterCount with charsFit:
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=mozilla/layout/generic&command=DIFF_FRAMESET&file=nsTextFrameThebes.cpp&rev1=3.59&rev2=3.60&root=/cvsroot
It's OK to count UTF16 codepoints instead of clusters because these are just weights and don't have to be exact.

This obviates the need for the loop above those lines that updates mClusterCount to include spaces trimmed off the end of the line. So, this patch removes that loop. (Including trimmed characters in the "letter count" was probably always a mistake, really.)
Attachment #276065 - Flags: review?(smontagu)
Attachment #276065 - Flags: review?(smontagu) → review+
Comment on attachment 276065 [details] [diff] [review]
fix

a1.9=dbaron
Attachment #276065 - Flags: approval1.9? → approval1.9+
checked in
Status: NEW → RESOLVED
Closed: 17 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: