Allow text that fits exactly to be measured faster by changing < to <=. Patch from Daniel Bratell <bratell@lysator.liu.se>. r=shanjian sr=waterson b=90867

This commit is contained in:
dbaron%fas.harvard.edu 2001-12-08 22:37:12 +00:00
Родитель bfd986ab4e
Коммит 82cc6db0e2
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1644,7 +1644,7 @@ nsRenderingContextWin::GetTextDimensions(const char* aString,
// Find the nearest place to break that is less than or equal to // Find the nearest place to break that is less than or equal to
// the estimated break offset // the estimated break offset
if (aLength < estimatedBreakOffset) { if (aLength <= estimatedBreakOffset) {
// All the characters should fit // All the characters should fit
numChars = aLength - start; numChars = aLength - start;
breakIndex = aNumBreaks - 1; breakIndex = aNumBreaks - 1;