RFR: 8090547: Allow for transparent backgrounds in WebView [v4]

Jose Pereda jpereda at openjdk.java.net
Fri Aug 27 11:50:27 UTC 2021


On Wed, 25 Aug 2021 23:24:35 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Jose Pereda has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update cssref.html
>
> modules/javafx.web/src/main/java/com/sun/webkit/WebPage.java line 615:
> 
>> 613:             twkSetTransparent(frameID, isBackgroundTransparent());
>> 614:             twkSetBackgroundColor(frameID, backgroundColor);
>> 615:             repaintAll();
> 
> Is this needed unconditionally? Or only when the background is not opaque?

This is required for any background color opacity level, but it is only needed when the background value changes (so it will be called a very limited number of times).
The issue happens when changing the background color, if the current scroll position is not 0. The comment at this similar [call](https://github.com/openjdk/jfx/blob/master/modules/javafx.web/src/main/java/com/sun/webkit/WebPage.java#L565) still holds.

> modules/javafx.web/src/main/java/com/sun/webkit/WebPage.java line 637:
> 
>> 635:                 twkSetBackgroundColor(frameID, backgroundColor);
>> 636:             }
>> 637:             repaintAll();
> 
> Same question as above.

Same answer as above.

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

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


More information about the openjfx-dev mailing list