Fix rendering of HTML list dots + better vertical align for them (fix constant).
diff --git a/src/share/classes/javax/swing/text/html/StyleSheet.java b/src/share/classes/javax/swing/text/html/StyleSheet.java
index 78a98d2..383cfc1 100644
--- a/src/share/classes/javax/swing/text/html/StyleSheet.java
+++ b/src/share/classes/javax/swing/text/html/StyleSheet.java
@@ -2279,16 +2279,16 @@
void drawShape(Graphics g, CSS.Value type, int ax, int ay, int aw,
int ah, float align) {
// Center vertically in shape.
- int size = 6;
- int gap = isLeftToRight ? - (bulletgap + size) : (aw + bulletgap);
+ final int SIZE = 6;
+ int gap = isLeftToRight ? - (bulletgap + SIZE) : (aw + bulletgap);
int x = ax + gap;
- int y = Math.max(ay, ay + (ah - size) / 2);
+ int y = Math.max(ay, ay + (ah - SIZE) / 2);
if (type == CSS.Value.SQUARE) {
- g.drawRect(x, y, size, size);
+ g.drawRect(x, y, SIZE, SIZE);
} else if (type == CSS.Value.CIRCLE) {
- g.drawOval(x, y, size, size);
+ g.drawOval(x, y, SIZE, SIZE);
} else {
- g.fillOval(x, y, size, size);
+ g.fillOval(x, y, SIZE, SIZE);
}
}