changeset 1692:d74367c184b5

RT-23525 : iOS CSS Loading is parsing the CSS file, without the loop
author mickf
date Sun, 26 Aug 2012 23:03:28 +0100
parents eb6eff5d46d0
children 2a12faeae870 5f29560326e8
files javafx-ui-controls/build-common.xml
diffstat 1 files changed, 41 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/build-common.xml	Fri Aug 24 13:20:12 2012 -0700
+++ b/javafx-ui-controls/build-common.xml	Sun Aug 26 23:03:28 2012 +0100
@@ -1,38 +1,57 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="javafx-ui-controls-common" default="jar" basedir=".">
 
+    <path id="class-path-ref">
+      <pathelement location="${rt.dist.root.dir}/javafx-ui-common/dist/javafx-ui-common.jar"/>
+      <pathelement location="${runtime.dist.root.dir}/javafx-beans/dist/javafx-beans.jar"/>
+      <pathelement location="${runtime.dist.root.dir}/javafx-anim/dist/javafx-anim.jar"/>
+      <pathelement location="${runtime.dist.root.dir}/javafx-common/dist/javafx-common.jar"/>
+      <pathelement location="${runtime.dist.root.dir}/javafx-logging/dist/javafx-logging.jar"/>
+      <pathelement location="${JFXRT_HOME}/jfxrt.jar"/>
+    </path>
+
     <!-- .css -> .bss -->
     <target name="check-binary-css">
-        <uptodate property="binaryCssUpToDate" targetfile="${build.dir}/classes/com/sun/javafx/scene/control/skin/caspian/caspian.bss">
-            <srcfiles dir="${src.dir}/com/sun/javafx/scene/control/skin/caspian" includes="caspian.css"/>
-        </uptodate>
-    </target> 
+      <uptodate property="binaryCssUpToDate" targetfile="${basedir}/${build.dir}/classes/com/sun/javafx/scene/control/skin/caspian/caspian.bss">
+        <srcfiles dir="${basedir}/${src.dir}/com/sun/javafx/scene/control/skin/caspian" includes="*.css"/>
+      </uptodate>
+    </target>
 
-    <target name="-pre-init" depends="check-binary-css" unless="binaryCssUpToDate">
-        <mkdir dir="${build.dir}/classes/com/sun/javafx/scene/control/skin/caspian"/>
-        <java classname="com.sun.javafx.css.parser.Css2Bin" fork="true" failonerror="true">
-          <jvmarg value="-Djavafx.toolkit=com.sun.javafx.tk.DummyToolkit"/>
-          <classpath> 
-            <pathelement location="${rt.dist.root.dir}/javafx-ui-common/dist/javafx-ui-common.jar"/>
-            <pathelement location="${runtime.dist.root.dir}/javafx-beans/dist/javafx-beans.jar"/>
-            <pathelement location="${runtime.dist.root.dir}/javafx-anim/dist/javafx-anim.jar"/>
-            <pathelement location="${runtime.dist.root.dir}/javafx-common/dist/javafx-common.jar"/>
-            <pathelement location="${runtime.dist.root.dir}/javafx-logging/dist/javafx-logging.jar"/>
-            <pathelement location="${JFXRT_HOME}/jfxrt.jar"/>
-          </classpath> 
-          <arg value="${src.dir}/com/sun/javafx/scene/control/skin/caspian/caspian.css"/>
-          <arg value="${build.dir}/classes/com/sun/javafx/scene/control/skin/caspian/caspian.bss"/>
-        </java>
+
+    <target name="-pre-init" depends="check-binary-css, compile-java-css" unless="binaryCssUpToDate">
+      <mkdir dir="${basedir}/${build.dir}/classes/com/sun/javafx/scene/control/skin/caspian"/>
+
+      <!-- compile all .css files in the build dir to .bss files, for faster startup -->
+      <java classname="com.sun.javafx.css.parser.Css2Bin" fork="true" failonerror="true" classpathref="class-path-ref">
+        <jvmarg value="-Djavafx.toolkit=com.sun.javafx.tk.DummyToolkit"/>
+        <arg value="${basedir}/${src.dir}/com/sun/javafx/scene/control/skin/caspian/caspian.css"/>
+        <arg value="${basedir}/${build.dir}/classes/com/sun/javafx/scene/control/skin/caspian/caspian.bss"/>
+      </java>
+      <java classname="com.sun.javafx.css.parser.Css2Bin" fork="true" failonerror="true" classpathref="class-path-ref">
+        <jvmarg value="-Djavafx.toolkit=com.sun.javafx.tk.DummyToolkit"/>
+        <arg value="${basedir}/${src.dir}/com/sun/javafx/scene/control/skin/caspian/highcontrast.css"/>
+        <arg value="${basedir}/${build.dir}/classes/com/sun/javafx/scene/control/skin/caspian/highcontrast.bss"/>
+      </java>
+      <java classname="com.sun.javafx.css.parser.Css2Bin" fork="true" failonerror="true" classpathref="class-path-ref">
+        <jvmarg value="-Djavafx.toolkit=com.sun.javafx.tk.DummyToolkit"/>
+        <arg value="${basedir}/${src.dir}/com/sun/javafx/scene/control/skin/caspian/embedded.css"/>
+        <arg value="${basedir}/${build.dir}/classes/com/sun/javafx/scene/control/skin/caspian/embedded.bss"/>
+      </java>
+      <java classname="com.sun.javafx.css.parser.Css2Bin" fork="true" failonerror="true" classpathref="class-path-ref">
+        <jvmarg value="-Djavafx.toolkit=com.sun.javafx.tk.DummyToolkit"/>
+        <arg value="${basedir}/${src.dir}/com/sun/javafx/scene/control/skin/caspian/embedded-qvga.css"/>
+        <arg value="${basedir}/${build.dir}/classes/com/sun/javafx/scene/control/skin/caspian/embedded-qvga.bss"/>
+      </java>
     </target>
-    
+
     <!-- .css -> .java -->
     <target name="check-java-css">
         <uptodate property="javaCssUpToDate" targetfile="${build.dir}/classes/com/sun/javafx/scene/control/skin/caspian/caspian.java">
             <srcfiles dir="${src.dir}/com/sun/javafx/scene/control/skin/caspian" includes="caspian.css"/>
         </uptodate>
     </target> 
-    
-    <target name="-pre-init" depends="check-java-css" unless="javaCssUpToDate">
+
+    <target name="compile-java-css" depends="check-java-css" unless="javaCssUpToDate">
         <mkdir dir="${build.dir}/classes/com/sun/javafx/scene/control/skin/caspian"/>
         <java classname="com.sun.javafx.css.parser.Css2Java" fork="true" failonerror="true">
           <jvmarg value="-Djavafx.toolkit=com.sun.javafx.tk.DummyToolkit"/>