On Wed, 16 Dec 2020 17:13:57 GMT, Frederic Thevenet <ftheve...@openjdk.org> 
wrote:

>> Good catch. Yes, `TextFlow` has the same problem, and ought to be fixed as 
>> part of this, probably by deleting that method and using the public methods 
>> in Region. It seems wholly unnecessary to use the copied method, since the 
>> value of `snap` is always set to `isSnapPixel()`, which is what the public 
>> methods do.
>
>> 
>> 
>> Good catch. Yes, `TextFlow` has the same problem, and ought to be fixed as 
>> part of this, probably by deleting that method and using the public methods 
>> in Region. It seems wholly unnecessary to use the copied method, since the 
>> value of `snap` is always set to `isSnapPixel()`, which is what the public 
>> methods do.
> 
> Actually I think the copy was necessary for the other methods in this 
> delimited block: `computeChildXXXAreaWidth/Height` because members from 
> Region are indeed inaccessible.
> These copies are outdated and should be updated as they use the deprecated 
> `snapSpace()` (instead of `snapSpaceX/Y()`) which does not take into account 
> non square screen ratio.
> 
> I assume we have no other choice than copy the new versions of these from 
> Region into TextFlow? Unless you think we have reasons to reassess why these 
> where made package-private in the first place ?

Region is part of the public API, so any change to increase the visibility of 
fields or methods would require a new enhancement with a CSR and justification 
as to why it is needed as public API. We wouldn't do that just to fix this bug.

Does TextFlow really need the package-scope snap methods from Region? I was 
thinking you would modify the copied `computeChildXXXAreaWidth/Height` methods 
to call the public `snapSpaceX/Y` methods (the ones that don't take `snap` as a 
parameter).

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

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

Reply via email to