On Fri, 20 Dec 2019 23:44:07 GMT, Scott Palmer <swpal...@openjdk.org> wrote:

>> Added tabSize property to Text and TextFlow and -fx-tab-size CSS attribute 
>> to both.  TextFlow's tab size overrides that of contained Text nodes.
> 
> The pull request has been updated with 1 additional commit.

The fix looks good now. There is one problem in the test (in `StubTextLayout`) 
that needs to be fixed.

modules/javafx.graphics/src/test/java/test/com/sun/javafx/pgstub/StubTextLayout.java
 line 50:

> 49:     private int tabSize = DEFAULT_TAB_SIZE;
> 50:     private int nullFontSize = 10;
> 51: 

Setting `nullFontSize` to 10 by default has broken one of the existing unit 
tests (a rather fragile test it seems). I now see the following failure:

test.javafx.scene.chart.StackedBarChartTest > testSeriesAdd FAILED
    org.junit.ComparisonFailure: expected:<10 4[78 234 37 254 432 234 83 499 
375 234 140] > but was:<10 4[60 218 35 238 415 218 80 465 360 218 135] >
        at org.junit.Assert.assertEquals(Assert.java:123)
        at org.junit.Assert.assertEquals(Assert.java:145)
        at 
test.javafx.scene.chart.StackedBarChartTest.testSeriesAdd(StackedBarChartTest.java:110)

If you change this to 0, which restores the previous default, leaving in place 
the setting to 10 in ` setContent(TextSpan[])`, then all tests pass.

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



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

Reply via email to