RFR: JDK-8269921 Text in Textflow and listeners on bounds can cause endless loop/crash and other performance issues [v2]

Florian Kirmaier fkirmaier at openjdk.java.net
Tue Jul 6 15:12:30 UTC 2021


On Tue, 6 Jul 2021 14:58:49 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Florian Kirmaier has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   JDK-8269921
>>   Added a copyright header
>
> modules/javafx.graphics/src/main/java/javafx/scene/text/Text.java line 386:
> 
>> 384:     private GlyphList[] getRuns() {
>> 385:         if (textRuns != null) return textRuns;
>> 386:         if (!isSpan()) {
> 
> Removing the call to `getParent().layout()` here seems very likely to cause a regression in behavior. This will need some further analysis and lots of testing.

I agree the change is quite dangerous. 
But the current behavior is in my opinion "broken by design". 
updating bounds should never trigger layout. Group also has similar behavior, which causes issues from time to time.

> tests/system/src/test/java/test/javafx/scene/text/TextFlowCrashTest.java line 1:
> 
>> 1: package test.javafx.scene.text;
> 
> This needs a standard copyright header block.

Done! I've just added the copyright header.

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

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


More information about the openjfx-dev mailing list