When computing the presence or absence of a space,
it's usually the case that the absense of a space case
has no error. The presence of a space may have more
error, since the size of the space may be adjusted by
the page.
When the two computed errors are equal, bias towards
the space case. This fixes text selection on Google News.
bug:
3470564
Change-Id: I1feadd945e9faaf970bca0702a7cf79429592784
SkFixedToScalar(posNoSpace), SkFixedToScalar(diffNoSpace),
SkFixedToScalar(posWithSpace), SkFixedToScalar(diffWithSpace),
mLastPaint.getTextSize());
- return diffWithSpace < diffNoSpace;
+ return diffWithSpace <= diffNoSpace;
}
SkFixed minSpaceWidth(SkPaint& paint)