提交 9e52c52e 编写于 作者: R rupashka

7030623: closed/javax/accessibility/4864610/bug4864610.java test fails just against jdk7 b134

Reviewed-by: peterz
上级 6b3de0a7
...@@ -395,10 +395,10 @@ public class Utilities { ...@@ -395,10 +395,10 @@ public class Utilities {
// the length of the string measured as a whole may differ from // the length of the string measured as a whole may differ from
// the sum of individual character lengths, for example if // the sum of individual character lengths, for example if
// fractional metrics are enabled; and we must guard from this. // fractional metrics are enabled; and we must guard from this.
while (metrics.charsWidth(txt, txtOffset, offset + 1) > (x - x0)) { while (offset > 0 && metrics.charsWidth(txt, txtOffset, offset) > (x - x0)) {
offset--; offset--;
} }
return (offset < 0 ? 0 : offset); return offset;
} }
currX = nextX; currX = nextX;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册