mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-12 16:09:15 +00:00
7030623: closed/javax/accessibility/4864610/bug4864610.java test fails just against jdk7 b134
Reviewed-by: peterz
This commit is contained in:
parent
f5b47c645e
commit
0fce7a7e9d
@ -395,10 +395,10 @@ public class Utilities {
|
||||
// the length of the string measured as a whole may differ from
|
||||
// the sum of individual character lengths, for example if
|
||||
// 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--;
|
||||
}
|
||||
return (offset < 0 ? 0 : offset);
|
||||
return offset;
|
||||
}
|
||||
currX = nextX;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user