# HG changeset patch # User kcr # Date 1489018153 28800 # Wed Mar 08 16:09:13 2017 -0800 # Node ID 2c4c3feaee2e53136447e2cb115d292428f3e486 # Parent 1ada4df30f82624e214e654911a4a1d6489cd6ac 8176404: Remove public test-only convenience method from CssParser Reviewed-by: diff --git a/modules/javafx.controls/src/test/java/test/javafx/scene/chart/XYChartTest.java b/modules/javafx.controls/src/test/java/test/javafx/scene/chart/XYChartTest.java --- a/modules/javafx.controls/src/test/java/test/javafx/scene/chart/XYChartTest.java +++ b/modules/javafx.controls/src/test/java/test/javafx/scene/chart/XYChartTest.java @@ -34,7 +34,7 @@ import javafx.css.ParsedValue; import javafx.css.CssMetaData; import javafx.css.StyleableProperty; -import javafx.css.CssParser; +import javafx.css.CssParserShim; import javafx.scene.Node; import javafx.scene.ParentShim; import javafx.scene.Scene; @@ -86,7 +86,7 @@ assertEquals(10, new Double(AxisShim.get_measure(yaxis).getFont().getSize()).intValue()); // set tick label font via css and test if ticklabelfont, measure and tick textnode follow. - ParsedValue pv = new CssParser().parseExpr("-fx-tick-label-font","0.916667em System"); + ParsedValue pv = new CssParserShim().parseExpr("-fx-tick-label-font","0.916667em System"); Object val = pv.convert(null); CssMetaData prop = ((StyleableProperty)yaxis.tickLabelFontProperty()).getCssMetaData(); prop.set(yaxis, val, null); diff --git a/modules/javafx.controls/src/test/java/test/javafx/scene/control/SliderTest.java b/modules/javafx.controls/src/test/java/test/javafx/scene/control/SliderTest.java --- a/modules/javafx.controls/src/test/java/test/javafx/scene/control/SliderTest.java +++ b/modules/javafx.controls/src/test/java/test/javafx/scene/control/SliderTest.java @@ -28,7 +28,7 @@ import javafx.css.ParsedValue; import javafx.css.CssMetaData; -import javafx.css.CssParser; +import javafx.css.CssParserShim; import test.com.sun.javafx.pgstub.StubToolkit; import com.sun.javafx.tk.Toolkit; import javafx.css.StyleableProperty; @@ -69,7 +69,7 @@ @Test public void testSettingMinorTickCountViaCSS() { startApp(); - ParsedValue pv = new CssParser().parseExpr("-fx-minor-tick-count","2"); + ParsedValue pv = new CssParserShim().parseExpr("-fx-minor-tick-count","2"); Object val = pv.convert(null); try { ((StyleableProperty)slider.minorTickCountProperty()).applyStyle(null, val); diff --git a/modules/javafx.graphics/src/main/java/javafx/css/CssParser.java b/modules/javafx.graphics/src/main/java/javafx/css/CssParser.java --- a/modules/javafx.graphics/src/main/java/javafx/css/CssParser.java +++ b/modules/javafx.graphics/src/main/java/javafx/css/CssParser.java @@ -303,7 +303,7 @@ * @param expr the expression * @return the parsed value */ - public ParsedValue parseExpr(String property, String expr) { + ParsedValue parseExpr(String property, String expr) { if (property == null || expr == null) return null; ParsedValueImpl value = null; diff --git a/modules/javafx.graphics/src/shims/java/javafx/css/CssParserShim.java b/modules/javafx.graphics/src/shims/java/javafx/css/CssParserShim.java new file mode 100644 --- /dev/null +++ b/modules/javafx.graphics/src/shims/java/javafx/css/CssParserShim.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package javafx.css; + +public class CssParserShim { + + CssParser parser; + + public CssParserShim(CssParser parser) { + this.parser = parser; + } + + public CssParserShim() { + this.parser = new CssParser(); + } + + public ParsedValue parseExpr(String property, String expr) { + return parser.parseExpr(property, expr); + } + +} diff --git a/modules/javafx.graphics/src/test/java/test/javafx/css/CssMetaDataTest.java b/modules/javafx.graphics/src/test/java/test/javafx/css/CssMetaDataTest.java --- a/modules/javafx.graphics/src/test/java/test/javafx/css/CssMetaDataTest.java +++ b/modules/javafx.graphics/src/test/java/test/javafx/css/CssMetaDataTest.java @@ -61,6 +61,7 @@ import javafx.css.CompoundSelector; import javafx.css.CssMetaData; import javafx.css.CssParser; +import javafx.css.CssParserShim; import javafx.css.Declaration; import javafx.css.DeclarationShim; import javafx.css.FontCssMetaData; @@ -272,7 +273,7 @@ Selector root = SimpleSelectorShim.getSimpleSelector("*", rootStyleClass, null, null); - ParsedValue fxBaseValue = new CssParser().parseExpr("-fx-base", "red"); + ParsedValue fxBaseValue = new CssParserShim().parseExpr("-fx-base", "red"); Declaration fxBase = DeclarationShim.getDeclaration("-fx-base", fxBaseValue, false); ParsedValueImpl fxColorValue = new ParsedValueImpl(fxBase.getProperty(), null, true); @@ -295,7 +296,7 @@ Selector rect = SimpleSelectorShim.getSimpleSelector("*", rectStyleClass, null, null); - ParsedValue fxFillValue = new CssParser().parseExpr("-fx-fill", "-fx-color"); + ParsedValue fxFillValue = new CssParserShim().parseExpr("-fx-fill", "-fx-color"); Declaration fxFill = DeclarationShim.getDeclaration("-fx-fill", fxFillValue, false); selectors = new ArrayList(); @@ -377,7 +378,7 @@ Selector root = SimpleSelectorShim.getSimpleSelector("*", rootStyleClass, null, null); - ParsedValue fxBaseValue = new CssParser().parseExpr("-fx-base", "red"); + ParsedValue fxBaseValue = new CssParserShim().parseExpr("-fx-base", "red"); Declaration fxBase = DeclarationShim.getDeclaration("-fx-base", fxBaseValue, false); ParsedValueImpl fxColorValue = new ParsedValueImpl(fxBase.getProperty(), null, true); @@ -400,7 +401,7 @@ Selector rect = SimpleSelectorShim.getSimpleSelector("*", rectStyleClass, null, null); - ParsedValue fxFillValue = new CssParser().parseExpr("-fx-fill", "-fx-color"); + ParsedValue fxFillValue = new CssParserShim().parseExpr("-fx-fill", "-fx-color"); Declaration fxFill = DeclarationShim.getDeclaration("-fx-fill", fxFillValue, false); selectors = new ArrayList(); @@ -500,7 +501,7 @@ Selector root = SimpleSelectorShim.getSimpleSelector("*", rootStyleClass, null, null); - ParsedValue fxBaseValue = new CssParser().parseExpr("-fx-base", "red"); + ParsedValue fxBaseValue = new CssParserShim().parseExpr("-fx-base", "red"); Declaration fxBase = DeclarationShim.getDeclaration("-fx-base", fxBaseValue, false); ParsedValueImpl fxColorValue = new ParsedValueImpl(fxBase.getProperty(), null, true); @@ -523,7 +524,7 @@ Selector rect = SimpleSelectorShim.getSimpleSelector("*", rectStyleClass, null, null); - ParsedValue fxFillValue = new CssParser().parseExpr("-fx-fill", "-fx-color"); + ParsedValue fxFillValue = new CssParserShim().parseExpr("-fx-fill", "-fx-color"); Declaration fxFill = DeclarationShim.getDeclaration("-fx-fill", fxFillValue, false); selectors = new ArrayList(); @@ -623,7 +624,7 @@ Selector root = SimpleSelectorShim.getSimpleSelector("*", rootStyleClass, null, null); - ParsedValue fxBaseValue = new CssParser().parseExpr("-fx-base", "red"); + ParsedValue fxBaseValue = new CssParserShim().parseExpr("-fx-base", "red"); Declaration fxBase = DeclarationShim.getDeclaration("-fx-base", fxBaseValue, false); ParsedValueImpl fxColorValue = new ParsedValueImpl(fxBase.getProperty(), null, true); @@ -646,7 +647,7 @@ Selector rect = SimpleSelectorShim.getSimpleSelector("*", rectStyleClass, null, null); - ParsedValue fxFillValue = new CssParser().parseExpr("-fx-fill", "-fx-color"); + ParsedValue fxFillValue = new CssParserShim().parseExpr("-fx-fill", "-fx-color"); Declaration fxFill = DeclarationShim.getDeclaration("-fx-fill", fxFillValue, false); selectors = new ArrayList(); @@ -750,7 +751,7 @@ Selector root = SimpleSelectorShim.getSimpleSelector("*", rootStyleClass, null, null); - ParsedValue fxBaseValue = new CssParser().parseExpr("-fx-base", "red"); + ParsedValue fxBaseValue = new CssParserShim().parseExpr("-fx-base", "red"); Declaration fxBase = DeclarationShim.getDeclaration("-fx-base", fxBaseValue, false); ParsedValueImpl fxColorValue = new ParsedValueImpl(fxBase.getProperty(), null, true); @@ -776,7 +777,7 @@ Selector rect = SimpleSelectorShim.getSimpleSelector("*", rectStyleClass, null, null); - ParsedValue fxFillValue = new CssParser().parseExpr("-fx-fill", "-fx-color"); + ParsedValue fxFillValue = new CssParserShim().parseExpr("-fx-fill", "-fx-color"); Declaration fxFill = DeclarationShim.getDeclaration("-fx-fill", fxFillValue, false); selectors = new ArrayList(); @@ -861,7 +862,7 @@ // Selector root = SimpleSelectorShim.getSimpleSelector("*", rootStyleClass, null, null); - ParsedValue fxBaseValue = new CssParser().parseExpr("-fx-base", "red"); + ParsedValue fxBaseValue = new CssParserShim().parseExpr("-fx-base", "red"); Declaration fxBase = DeclarationShim.getDeclaration("-fx-base", fxBaseValue, false); ParsedValueImpl fxColorValue = new ParsedValueImpl(fxBase.getProperty(), null, true); @@ -884,7 +885,7 @@ // Selector rect = SimpleSelectorShim.getSimpleSelector("*", rectStyleClass, null, null); - ParsedValue fxFillValue = new CssParser().parseExpr("-fx-fill", "-fx-color"); + ParsedValue fxFillValue = new CssParserShim().parseExpr("-fx-fill", "-fx-color"); Declaration fxFill = DeclarationShim.getDeclaration("-fx-fill", fxFillValue, false); selectors = new ArrayList(); @@ -964,7 +965,7 @@ Selector root = SimpleSelectorShim.getSimpleSelector("*", rootStyleClass, null, null); - ParsedValue fxFontShouldInheritValue = new CssParser().parseExpr("-fx-font", "12px system"); + ParsedValue fxFontShouldInheritValue = new CssParserShim().parseExpr("-fx-font", "12px system"); Declaration fxFontShouldInherit = DeclarationShim.getDeclaration("-fx-font", fxFontShouldInheritValue, false); List selectors = new ArrayList(); @@ -984,7 +985,7 @@ Selector textSelector = SimpleSelectorShim.getSimpleSelector("*", textStyleClass, null, null); - ParsedValue fxFillValue = new CssParser().parseExpr("-fx-fill", "red"); + ParsedValue fxFillValue = new CssParserShim().parseExpr("-fx-fill", "red"); Declaration fxFill = DeclarationShim.getDeclaration("-fx-fill", fxFillValue, false); selectors = new ArrayList(); @@ -1044,7 +1045,7 @@ Selector root = SimpleSelectorShim.getSimpleSelector("*", rootStyleClass, null, null); - ParsedValue fxFontShouldInheritValue = new CssParser().parseExpr("-fx-font", "12px system"); + ParsedValue fxFontShouldInheritValue = new CssParserShim().parseExpr("-fx-font", "12px system"); Declaration fxFontShouldInherit = DeclarationShim.getDeclaration("-fx-font", fxFontShouldInheritValue, false); List selectors = new ArrayList(); @@ -1064,10 +1065,10 @@ Selector textSelector = SimpleSelectorShim.getSimpleSelector("*", rectStyleClass, null, null); - ParsedValue fxFillValue = new CssParser().parseExpr("-fx-fill", "red"); + ParsedValue fxFillValue = new CssParserShim().parseExpr("-fx-fill", "red"); Declaration fxFill = DeclarationShim.getDeclaration("-fx-fill", fxFillValue, false); - ParsedValue fxFontFamilyValue = new CssParser().parseExpr("-fx-font-family", "arial"); + ParsedValue fxFontFamilyValue = new CssParserShim().parseExpr("-fx-font-family", "arial"); Declaration fxFontFamily = DeclarationShim.getDeclaration("-fx-font-family", fxFontFamilyValue, false); selectors = new ArrayList(); diff --git a/modules/javafx.graphics/src/test/java/test/javafx/css/CssParserTest.java b/modules/javafx.graphics/src/test/java/test/javafx/css/CssParserTest.java --- a/modules/javafx.graphics/src/test/java/test/javafx/css/CssParserTest.java +++ b/modules/javafx.graphics/src/test/java/test/javafx/css/CssParserTest.java @@ -36,6 +36,7 @@ import java.util.List; import java.util.Map; import javafx.css.CssParser; +import javafx.css.CssParserShim; import javafx.css.Declaration; import javafx.css.FontFace; @@ -62,7 +63,8 @@ CssParser instance = new CssParser(); // RT-16959 is an infinite loop on incomplete linear gradient - ParsedValue result = instance.parseExpr("-fx-background-color", "linear-gradient(from 0% 0% to 0% 100%, )"); + ParsedValue result = new CssParserShim(instance) + .parseExpr("-fx-background-color", "linear-gradient(from 0% 0% to 0% 100%, )"); assertNull("parseExpr", result); // The bad syntax should be skipped. The stylesheet should have one @@ -146,7 +148,7 @@ CssParser instance = new CssParser(); // RT-16959 is an infinite loop on incomplete linear gradient - ParsedValue result = instance.parseExpr("-fx-font-size", "10ptx"); + ParsedValue result = new CssParserShim(instance).parseExpr("-fx-font-size", "10ptx"); assertNull("parseExpr", result); // The bad syntax should be skipped. @@ -290,12 +292,12 @@ @Test public void testRT_32522() { - ParsedValue value = new CssParser().parseExpr("foo", "1 2em 3 4;"); + ParsedValue value = new CssParserShim().parseExpr("foo", "1 2em 3 4;"); Object obj = value.convert(Font.font(13)); assert obj instanceof Number[]; assertArrayEquals(new Number[] {1d, 26d, 3d, 4d}, (Number[])obj); - value = new CssParser().parseExpr("foo", "1;"); + value = new CssParserShim().parseExpr("foo", "1;"); obj = value.convert(null); assert obj instanceof Number; assertEquals(1d, (Number)obj); @@ -305,11 +307,11 @@ @Test public void testRT_38483() { Duration expected = Duration.millis(42); - ParsedValue value = new CssParser().parseExpr("foo", "42ms;"); + ParsedValue value = new CssParserShim().parseExpr("foo", "42ms;"); Object observed = value.convert(null); assertEquals(expected, observed); - value = new CssParser().parseExpr("foo", "indefinite;"); + value = new CssParserShim().parseExpr("foo", "indefinite;"); observed = value.convert(null); assertEquals(Duration.INDEFINITE, observed); } diff --git a/modules/javafx.graphics/src/test/java/test/javafx/css/FontTypeTest.java b/modules/javafx.graphics/src/test/java/test/javafx/css/FontTypeTest.java --- a/modules/javafx.graphics/src/test/java/test/javafx/css/FontTypeTest.java +++ b/modules/javafx.graphics/src/test/java/test/javafx/css/FontTypeTest.java @@ -26,7 +26,7 @@ package test.javafx.css; import com.sun.javafx.css.ParsedValueImpl; -import javafx.css.CssParser; +import javafx.css.CssParserShim; import javafx.css.ParsedValue; import javafx.css.Size; import javafx.css.SizeUnits; @@ -118,7 +118,7 @@ @Test public void test_RT_21960_Bold_Italic() { - ParsedValue pv = new CssParser().parseExpr("-fx-font", "italic bold 24 Amble"); + ParsedValue pv = new CssParserShim().parseExpr("-fx-font", "italic bold 24 Amble"); Font f = (Font)pv.convert(null); assertEquals("Bold Italic", f.getStyle()); assertEquals("Amble", f.getFamily()); @@ -127,7 +127,7 @@ @Test public void test_RT_21960_Bold() { - ParsedValue pv = new CssParser().parseExpr("-fx-font", "bold 24 Amble"); + ParsedValue pv = new CssParserShim().parseExpr("-fx-font", "bold 24 Amble"); Font f = (Font)pv.convert(null); assertEquals("Bold", f.getStyle()); assertEquals("Amble", f.getFamily()); @@ -136,7 +136,7 @@ @Test public void test_RT_21960_Italic() { - ParsedValue pv = new CssParser().parseExpr("-fx-font", "italic 24 Amble"); + ParsedValue pv = new CssParserShim().parseExpr("-fx-font", "italic 24 Amble"); Font f = (Font)pv.convert(null); assertEquals("Italic", f.getStyle()); assertEquals("Amble", f.getFamily()); @@ -145,7 +145,7 @@ @Test public void test_RT_21960_Neither_Bold_Nor_Italic() { - ParsedValue pv = new CssParser().parseExpr("-fx-font", "24 Amble"); + ParsedValue pv = new CssParserShim().parseExpr("-fx-font", "24 Amble"); Font f = (Font)pv.convert(null); assertEquals("Regular", f.getStyle()); assertEquals("Amble", f.getFamily()); diff --git a/modules/javafx.graphics/src/test/java/test/javafx/css/PaintTypeTest.java b/modules/javafx.graphics/src/test/java/test/javafx/css/PaintTypeTest.java --- a/modules/javafx.graphics/src/test/java/test/javafx/css/PaintTypeTest.java +++ b/modules/javafx.graphics/src/test/java/test/javafx/css/PaintTypeTest.java @@ -35,6 +35,7 @@ import javafx.scene.text.Font; import com.sun.javafx.css.ParsedValueImpl; import javafx.css.CssParser; +import javafx.css.CssParserShim; import javafx.css.ParsedValue; import javafx.css.Size; import javafx.css.SizeUnits; @@ -196,7 +197,7 @@ // radius , // [ [ repeat | reflect ] ,]? // [, ]+ ) - ParsedValue value = new CssParser().parseExpr("-fx-background-color", + ParsedValue value = new CssParserShim().parseExpr("-fx-background-color", "radial-gradient(focus-angle 90deg, focus-distance 50%, radius 50, red, green, blue)"); RadialGradient result = (RadialGradient)((Paint[])value.convert(null))[0]; RadialGradient expected = new RadialGradient(90, .5, 0, 0, 50, @@ -206,12 +207,12 @@ new Stop(1.0,Color.BLUE)); assertEquals(expected,result); - value = new CssParser().parseExpr("-fx-background-color", + value = new CssParserShim().parseExpr("-fx-background-color", "radial-gradient(focus-angle 1.5708rad, focus-distance 50%, radius 50, red, green, blue)"); result = (RadialGradient)((Paint[])value.convert(null))[0]; assertEquals(expected,result); - value = new CssParser().parseExpr("-fx-background-color", + value = new CssParserShim().parseExpr("-fx-background-color", "radial-gradient(center 0% 10%, radius 50%, reflect, red, green, blue)"); result = (RadialGradient)((Paint[])value.convert(null))[0]; expected = new RadialGradient(0, 0, 0, .1, .5, @@ -230,7 +231,7 @@ // [, ]+ // ) // - ParsedValue value = new CssParser().parseExpr("-fx-background-color", + ParsedValue value = new CssParserShim().parseExpr("-fx-background-color", "linear-gradient(to top, red, green, blue)"); LinearGradient result = (LinearGradient)((Paint[])value.convert(null))[0]; LinearGradient expected = new LinearGradient(0, 1, 0, 0, @@ -240,7 +241,7 @@ new Stop(1.0, Color.BLUE)); assertEquals(expected,result); - value = new CssParser().parseExpr("-fx-background-color", + value = new CssParserShim().parseExpr("-fx-background-color", "linear-gradient(to bottom, red, green, blue)"); result = (LinearGradient)((Paint[])value.convert(null))[0]; expected = new LinearGradient(0, 0, 0, 1, @@ -250,7 +251,7 @@ new Stop(1.0, Color.BLUE)); assertEquals(expected,result); - value = new CssParser().parseExpr("-fx-background-color", + value = new CssParserShim().parseExpr("-fx-background-color", "linear-gradient(to left, red, green, blue)"); result = (LinearGradient)((Paint[])value.convert(null))[0]; expected = new LinearGradient(1, 0, 0, 0, @@ -260,7 +261,7 @@ new Stop(1.0, Color.BLUE)); assertEquals(expected,result); - value = new CssParser().parseExpr("-fx-background-color", + value = new CssParserShim().parseExpr("-fx-background-color", "linear-gradient(to right, red, green, blue)"); result = (LinearGradient)((Paint[])value.convert(null))[0]; expected = new LinearGradient(0, 0, 1, 0, @@ -270,7 +271,7 @@ new Stop(1.0, Color.BLUE)); assertEquals(expected,result); - value = new CssParser().parseExpr("-fx-background-color", + value = new CssParserShim().parseExpr("-fx-background-color", "linear-gradient(to bottom left, red, green, blue)"); result = (LinearGradient)((Paint[])value.convert(null))[0]; expected = new LinearGradient(1, 0, 0, 1, @@ -280,7 +281,7 @@ new Stop(1.0, Color.BLUE)); assertEquals(expected,result); - value = new CssParser().parseExpr("-fx-background-color", + value = new CssParserShim().parseExpr("-fx-background-color", "linear-gradient(to bottom right, red, green, blue)"); result = (LinearGradient)((Paint[])value.convert(null))[0]; expected = new LinearGradient(0, 0, 1, 1, @@ -290,7 +291,7 @@ new Stop(1.0, Color.BLUE)); assertEquals(expected,result); - value = new CssParser().parseExpr("-fx-background-color", + value = new CssParserShim().parseExpr("-fx-background-color", "linear-gradient(to top left, red, green, blue)"); result = (LinearGradient)((Paint[])value.convert(null))[0]; expected = new LinearGradient(1, 1, 0, 0, @@ -300,7 +301,7 @@ new Stop(1.0, Color.BLUE)); assertEquals(expected,result); - value = new CssParser().parseExpr("-fx-background-color", + value = new CssParserShim().parseExpr("-fx-background-color", "linear-gradient(to top right, red, green, blue)"); result = (LinearGradient)((Paint[])value.convert(null))[0]; expected = new LinearGradient(0, 1, 1, 0, @@ -310,7 +311,7 @@ new Stop(1.0, Color.BLUE)); assertEquals(expected,result); - value = new CssParser().parseExpr("-fx-background-color", + value = new CssParserShim().parseExpr("-fx-background-color", "linear-gradient(from 10% 10% to 90% 90%, reflect, red, green, blue)"); result = (LinearGradient)((Paint[])value.convert(null))[0]; expected = new LinearGradient(.1, .1, .9, .9, diff --git a/modules/javafx.graphics/src/test/java/test/javafx/scene/layout/TilePaneTest.java b/modules/javafx.graphics/src/test/java/test/javafx/scene/layout/TilePaneTest.java --- a/modules/javafx.graphics/src/test/java/test/javafx/scene/layout/TilePaneTest.java +++ b/modules/javafx.graphics/src/test/java/test/javafx/scene/layout/TilePaneTest.java @@ -28,7 +28,7 @@ import test.javafx.scene.layout.MockBiased; import javafx.css.ParsedValue; import javafx.css.CssMetaData; -import javafx.css.CssParser; +import javafx.css.CssParserShim; import javafx.css.StyleableProperty; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; @@ -1030,7 +1030,7 @@ stage.setScene(scene); stage.show(); - ParsedValue pv = new CssParser().parseExpr("-fx-perf-tile-width","67.0"); + ParsedValue pv = new CssParserShim().parseExpr("-fx-perf-tile-width","67.0"); Object val = pv.convert(null); try { ((StyleableProperty)tilepane.prefTileWidthProperty()).applyStyle(null, val); @@ -1046,7 +1046,7 @@ stage.setScene(scene); stage.show(); - ParsedValue pv = new CssParser().parseExpr("-fx-perf-rows","2"); + ParsedValue pv = new CssParserShim().parseExpr("-fx-perf-rows","2"); Object val = pv.convert(null); try { ((StyleableProperty)tilepane.prefRowsProperty()).applyStyle(null, val); @@ -1063,7 +1063,7 @@ stage.setScene(scene); stage.show(); - ParsedValue pv = new CssParser().parseExpr("-fx-pref-columns","2"); + ParsedValue pv = new CssParserShim().parseExpr("-fx-pref-columns","2"); Object val = pv.convert(null); CssMetaData prop = ((StyleableProperty)tilepane.prefColumnsProperty()).getCssMetaData(); try {