On Wed, 14 Sep 2022 03:51:40 GMT, ScientificWare <[email protected]> wrote:
>> This is referenced in Java Bug Database as >> - [JDK-8292276 : Missing color names in >> CSS](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8292276) >> >> This is tracked in JBS as >> - [JDK-8292276 : Missing color names in >> CSS](https://bugs.openjdk.java.net/browse/JDK-8292276) >> >> Adds missing color names, defined by CSS Level 4, in CSS.java : >> CSS Color Module Level 4 >> W3C Candidate Recommendation Snapshot, 5 July 2022 >> [7.1 Named Colors](https://www.w3.org/TR/css-color-4/#named-color) >> >> Designed from : [ScientificWare JDK-8292276 : Missing color names in >> CSS](https://github.com/scientificware/jdk/issues/12) > > ScientificWare has updated the pull request incrementally with one additional > commit since the last revision: > > Author tag, Modifier, Returned value. > > Removes the last added author tag. > Returns the Color instance from the map if there's one. > Renames colorNamed Object to colorNames. > Adds final modifier to colorNames. src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1406: > 1404: } else if (strlc.startsWith("rgba(")) { > 1405: return parseRGBA(str); > 1406: } else if (str.charAt(0) == '#') { Suggestion: } else if (strlc.charAt(0) == '#') { For consistency? test/jdk/javax/swing/text/html/CSS/MissingColorNames.java line 26: > 24: */ > 25: > 26: /* This was right, it should start in the first column. test/jdk/javax/swing/text/html/CSS/MissingColorNames.java line 48: > 46: // Missing Color Names In CSS. > 47: // 'cyan' keyword, as 131 <name-color> keywords also defined in CSS > Color Module > 48: // Level 4, are not referenced in CSS.java. Maybe we should simplify the description? - 'cyan' is one of the missing <name-color> keywords which are defined in CSS Color Module Level 4. test/jdk/javax/swing/text/html/CSS/MissingColorNames.java line 77: > 75: result.append(" [stringToColor(null) must return null]"); > 76: } > 77: if (!color.toString().toLowerCase(Locale.ROOT).equals("cyan")) { I wonder if `toLowerCase` required here. ------------- PR: https://git.openjdk.org/jdk/pull/9825
