On Fri, 27 Aug 2021 17:01:00 GMT, Jose Pereda <jper...@openjdk.org> wrote:

>> Currently, `WebPage` has already a public `setBackgroundColor()` method, but 
>> the class is not public. Therefore, public API is needed in `WebView` to 
>> allow developers access to it.
>> 
>> In line with the `fontSmoothingType` property, this PR provides public 
>> support for setting the background color of a WebPage, by adding a 
>> `pageFill` property, and a CSR is required.
>> 
>> The color for the background, that can be opaque, transparent or with any 
>> level of opacity, can be set via code or via CSS using `-fx-page-fill`.
>> 
>> Unit tests and a system test are provided.
>
> Jose Pereda has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Use color to int32 converter instead of hash

> The other option, as you mention, is finding out if the 32-bit int has alpha 
> 0 or 1, which can be done storing only the int value, not the color, so this 
> looks cleaner, we don't really need to hold a reference to the Color after all

Yes, I like this better, too.

I also agree with the point about including `rgba` in the name. It is also 
meaningful to keep `int` in the name. We would typically call this format 
`IntRgba`.

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

PR: https://git.openjdk.java.net/jfx/pull/563

Reply via email to