You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by jw...@apache.org on 2010/01/21 03:37:26 UTC

svn commit: r901502 - /myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java

Author: jwaldman
Date: Thu Jan 21 02:37:16 2010
New Revision: 901502

URL: http://svn.apache.org/viewvc?rev=901502&view=rev
Log:
TRINIDAD-1692 remove newlines in css file if in compressed mode
This is in CSSGenerationUtils

Modified:
    myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java

Modified: myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java?rev=901502&r1=901501&r2=901502&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java (original)
+++ myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/CSSGenerationUtils.java Thu Jan 21 02:37:16 2010
@@ -165,7 +165,8 @@
     // We'll start writing the CSS file now.  First
     // write out the header with a time stamp
     Date date = new Date();
-    out.println("/* This CSS file generated on " + date + " */");
+    if (!compressStyles)
+      out.println("/* This CSS file generated on " + date + " */");
 
     // Keep track of the number of selectors written out. The reason? IE has a 4095 limit,
     // and we want to warn when we get to that limit.
@@ -333,7 +334,10 @@
           }
         }
 
-        out.println("}");
+        if (compressStyles)
+          out.print("}"); // take out the newlines for performance
+        else
+          out.println("}");
       }
     }
     out.println("/* The number of CSS selectors in this file is " + numberSelectorsWritten + " */");