File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
src/java.desktop/share/classes/javax/swing/text/html
test/jdk/javax/swing/text/html/CSS Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -2965,6 +2965,17 @@ ImageIcon getImage(URL base) {
29652965 }
29662966 return image ;
29672967 }
2968+
2969+ @ Override
2970+ public int hashCode () {
2971+ return Objects .hashCode (svalue );
2972+ }
2973+
2974+ @ Override
2975+ public boolean equals (Object val ) {
2976+ return val instanceof CSS .BackgroundImage img
2977+ && Objects .equals (svalue , img .svalue );
2978+ }
29682979 }
29692980
29702981 /**
Original file line number Diff line number Diff line change 3131
3232/*
3333 * @test
34- * @bug 7083187
34+ * @bug 7083187 8318113
3535 * @summary Verifies if CSS.CSSValue attribute is same
3636 * @run main CSSAttributeEqualityBug
3737 */
@@ -72,6 +72,9 @@ public class CSSAttributeEqualityBug {
7272 "background-position: 1em 2em" ,
7373
7474 "border-width: medium" ,
75+
76+ "background-image: none" ,
77+ "background-image: url(image.png)" ,
7578 };
7679
7780 /**
@@ -86,6 +89,8 @@ public class CSSAttributeEqualityBug {
8689 {"margin-top: 42px" , "margin-top: 22px" },
8790 {"margin-top: 42px" , "margin-top: 42pt" },
8891 {"margin-top: 100%" , "margin-top: 50%" },
92+
93+ {"background-image: none" , "background-image: url(image.png)" },
8994 };
9095
9196 private static final String [][] EQUALS_WITH_SPACE = {
You can’t perform that action at this time.
0 commit comments