RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v32]
Andrey Turbanov
aturbanov at openjdk.org
Wed Aug 16 07:01:24 UTC 2023
On Sun, 13 Aug 2023 04:20:29 GMT, ScientificWare <duke at openjdk.org> wrote:
>> This is referenced in Java Bug Database as
>> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](https://bugs.java.com/bugdatabase/view_bug?bug_id=8292276)
>>
>> This is tracked in JBS as
>> - [JDK-8292276 : Add named colors from CSS Color Module Level 4](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 : Add named colors from CSS Color Module Level 4](https://github.com/scientificware/jdk/issues/12)
>
> ScientificWare has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits:
>
> - Merge master
> - MissingColorNames.java test : Tests all named colors.
> - CSS.java :
> Misalignment of comments.
> lazily initialization of colorNames.
>
> StyleSheet.java :
> Update the specification of stringToColor.
> - configure : linux file permission moves from 644=rw-r--r-- to 755=rwxr-xr-x.
> - Merge master
> - Merge master
> - Merge master
>
> # Conflicts:
> # src/java.desktop/share/classes/javax/swing/text/html/CSS.java
> # src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java
> - CSS.java
> - Updates copyright date to 2023.
> - Adds the missing color names defined by :
> 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)
> - Adds relative imports.
> - Replaces, if ... then ... else statements with a Map called "colorNamed".
>
> StyleSheet.java ;
> - Updates copyright date to 2023.
> - Updates stringToColor specifications to integrate a reference to CSS Color Module 4 for color names and hexadecimal notation.
>
> MissingColorNames.java :
> - Création d'un test pour les nouveaux noms de couleurs ajoutés.
> - MissingColorNames.java :
> Moves jtreg tags to the class declaration. Comment with tags isn't collapsed when viewed in an IDE if it's placed before the class declaration.
> - JDK8292276MissingColorNamesInCSS.java -> MissingColorNames.java :
> - Changement de nom.
> - Déplacement vers un autre dossier.
> - Simplification d'une description.
> - Ajout d'espaces manquants.
> - Correction de l'alignement d'un délimiteur de commentaire.
>
> CSS.java :
> - Changement de nom pour la variable colorNamed.
> - Ajout du modificateur final à la variable ColorNames.
> - Uniformisation de l'utilisation de la variable strlc.
> - renvoi direct de la couleur trouvée si elle existe.
> - ... and 6 more: https://git.openjdk.org/jdk/compare/ec0cc630...be39a841
src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1415:
> 1413: return hexToColor(str);
> 1414: } else {
> 1415: if(colorNames == null) {
Suggestion:
if (colorNames == null) {
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/9825#discussion_r1295458399
More information about the client-libs-dev
mailing list