RFR: JDK-8293776 : Adds CSS 4 and 8 digits hex coded Color [v9]

Alexey Ivanov aivanov at openjdk.org
Mon Sep 26 11:13:22 UTC 2022


On Sun, 25 Sep 2022 00:31:20 GMT, ScientificWare <duke at openjdk.org> wrote:

>> This is referenced in Java Bug Database as
>> - [JDK-8293776 : Adds CSS 4 and 8 digits hex coded Color](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8293776)
>> 
>> This is tracked in JBS as 
>> - [JDK-8293776 : Adds CSS 4 and 8 digits hex coded Color](https://bugs.openjdk.java.net/browse/JDK-8293776)
>> 
>> Adds the 4 and 8 digits color hex notations to CSS.java, as described in :
>> CSS Color Module Level 4
>> W3C Candidate Recommendation Snapshot, 5 July 2022
>> [6.2 The RGB Hexadecimal Notations: `#RRGGBB`](https://www.w3.org/TR/css-color-4/#hex-notation)
>> 
>> Designed from : [ScientificWare JDK-8293776 : Adds CSS 4 and 8 digits hex coded Color](https://github.com/scientificware/jdk/issues/13)
>
> ScientificWare has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Simplifications of the test.
>   
>   Removes individual color tests and only compares the RGB value.

test/jdk/javax/swing/text/html/CSS/Hex3468DigitsColor.java line 44:

> 42:         // Then expecting 0xaaff1122 from Color.
> 43:         Color color = styleSheet.stringToColor("#f12a");
> 44:         result.append("  Test for #f00a");

Previously, you added a message to `result` in case of failure only, now you always do it. The updated code does not output the actual value.

The tested color is `#f12a`  instead of `#f00a`.

-------------

PR: https://git.openjdk.org/jdk/pull/10317



More information about the client-libs-dev mailing list