RFR: JDK-8292276 : Add named colors from CSS Color Module Level 4 [v29]

Alexey Ivanov aivanov at openjdk.org
Tue Feb 28 15:34:50 UTC 2023


On Tue, 28 Feb 2023 01:03:59 GMT, Phil Race <prr at openjdk.org> wrote:

>> ScientificWare has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java
>>   
>>   Remove space.
>>   
>>   Co-authored-by: Alexey Ivanov <alexey.ivanov at oracle.com>
>
> src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java line 1019:
> 
>> 1017:      * Converts a color string such as "RED",  "rgb(r g b)",
>> 1018:      * "rgba(r g b a)" or "#NNN", "#NNNN", "#NNNNNN",
>> 1019:      * "#NNNNNNNN" to a Color.
> 
> This specification change seems to be dependent on the change in implementation proposed in
> https://github.com/openjdk/jdk/pull/10317/
> JDK-8293776 : Adds CSS 4 and 8 digits hex coded Color
> And BTW if you implemented that change on its own, it would not be spec compliant.
> 
> I think it best to WITHDRAW that other PR and absorb it in this PR
> 
> Also you should in the doc include the spec link.
> spec limits what it will convert. I think

Initially, it looked as if handling these issues separately was a good idea. Now that we know that the specification of a public needs updating, which requires a CSR, it is better to have everything ready: named colors, hex-parsers, rgb() and rgba() parsers. The spec refers to all the cases. If one is missing, the method is not compliant to its specification.

Amending the implementation one by one would require updating the spec and reviewing the CSR. Thus, having everything ready in one larger PR makes more sense.

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

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



More information about the client-libs-dev mailing list