Merge "Respect style boundaries when measuring text" into mnc-dev

This commit is contained in:
Raph Levien
2015-07-21 16:55:37 +00:00
committed by Android (Google) Code Review

View File

@@ -741,11 +741,11 @@ class TextLine {
if (needWidth || (c != null && (wp.bgColor != 0 || wp.underlineColor != 0 || runIsRtl))) { if (needWidth || (c != null && (wp.bgColor != 0 || wp.underlineColor != 0 || runIsRtl))) {
if (mCharsValid) { if (mCharsValid) {
ret = wp.getRunAdvance(mChars, start, contextEnd, contextStart, contextEnd, ret = wp.getRunAdvance(mChars, start, end, contextStart, contextEnd,
runIsRtl, end); runIsRtl, end);
} else { } else {
int delta = mStart; int delta = mStart;
ret = wp.getRunAdvance(mText, delta + start, delta + contextEnd, ret = wp.getRunAdvance(mText, delta + start, delta + end,
delta + contextStart, delta + contextEnd, runIsRtl, delta + end); delta + contextStart, delta + contextEnd, runIsRtl, delta + end);
} }
} }