CSS.g: commas are optional in rgb() and rgba()
diff --git a/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSS.g b/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSS.g
index 60e96c3..2306e67 100644
--- a/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSS.g
+++ b/compiler/src/main/antlr3/org/apache/royale/compiler/internal/css/CSS.g
@@ -645,7 +645,13 @@
 				( WS* NUMBER ( PERCENT | ) WS* ) ',' 
 				( WS* NUMBER ( PERCENT | ) WS* ) ',' 
 				( WS* NUMBER ( PERCENT | ) WS* ) 
-		')' ; 
+		')'
+    |   'rgba(' 	( WS* NUMBER ( PERCENT | ) WS* ) 
+				( WS* NUMBER ( PERCENT | ) WS* ) 
+				( WS* NUMBER ( PERCENT | ) WS* )
+				( WS* NUMBER ( PERCENT | ) WS* ) 
+		')'
+    ; 
 
 /** 
  * Matches a rgb definition - rgb(100%,100%,100%)
@@ -653,7 +659,12 @@
 RGB : 	'rgb(' 	( WS* NUMBER ( PERCENT | ) WS* ) ',' 
 				( WS* NUMBER ( PERCENT | ) WS* ) ',' 
 				( WS* NUMBER ( PERCENT | ) WS* ) 
-		')' ; 
+		')'
+    | 	'rgb(' 	( WS* NUMBER ( PERCENT | ) WS* )
+				( WS* NUMBER ( PERCENT | ) WS* )
+				( WS* NUMBER ( PERCENT | ) WS* ) 
+		')'
+    ; 
 
 
 /** Arguments of a function call property value. */
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSRgbColorPropertyValue.java b/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSRgbColorPropertyValue.java
index 7cc335e..bdcf1b4 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSRgbColorPropertyValue.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSRgbColorPropertyValue.java
@@ -19,6 +19,8 @@
 
 package org.apache.royale.compiler.internal.css;
 
+import java.util.Arrays;
+import java.util.Iterator;
 import java.util.StringTokenizer;
 
 import org.antlr.runtime.Token;
@@ -58,13 +60,25 @@
     protected static int getIntValue(String rgb)
     {        
         rgb = rgb.substring(4, rgb.length() - 1);
-        
-        StringTokenizer st = new StringTokenizer(rgb, ",");
+
         StringBuffer sb = new StringBuffer();
-        while (st.hasMoreElements())
+        Iterator<Object> iterator = null;
+        if (rgb.indexOf(",") != -1)
+        { 
+            // separated by commas is considered a legacy mode
+            StringTokenizer st = new StringTokenizer(rgb, ",");
+            iterator = st.asIterator();
+        }
+        else
         {
-            int digit;    
-            String t = (String)st.nextElement();
+            // separated by whitespace is allowed instead of commas
+            String[] elements = rgb.split("\\s+");
+            iterator = Arrays.<Object>stream(elements).iterator();
+        }
+        while (iterator.hasNext())
+        {
+            int digit;
+            String t = (String) iterator.next();
             t = t.trim();
             if(t.contains("%")) {
                 t = t.replaceAll("%", "");
@@ -76,7 +90,7 @@
                 digit = Float.valueOf(t).intValue();
                 sb.append(Character.forDigit((digit >> 4) & 15, 16));
                 sb.append(Character.forDigit(digit & 15, 16));
-            }            
+            }
         }
         return Integer.parseInt( sb.toString(), 16 );
     }
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSRgbaColorPropertyValue.java b/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSRgbaColorPropertyValue.java
index af74e70..aa2034c 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSRgbaColorPropertyValue.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/css/CSSRgbaColorPropertyValue.java
@@ -19,6 +19,8 @@
 
 package org.apache.royale.compiler.internal.css;
 
+import java.util.Arrays;
+import java.util.Iterator;
 import java.util.StringTokenizer;
 
 import org.antlr.runtime.Token;
@@ -59,21 +61,35 @@
     {        
         rgb = rgb.substring(5, rgb.length() - 1);
         
-        StringTokenizer st = new StringTokenizer(rgb, ",");
         StringBuffer sb = new StringBuffer();
-        while (st.hasMoreElements())
+        Iterator<Object> iterator = null;
+        if (rgb.indexOf(",") != -1)
+        { 
+            // separated by commas is considered a legacy mode
+            StringTokenizer st = new StringTokenizer(rgb, ",");
+            iterator = st.asIterator();
+        }
+        else
         {
-            int digit;    
-            String t = (String)st.nextElement();
+            // separated by whitespace is allowed instead of commas
+            String[] elements = rgb.split("\\s+");
+            iterator = Arrays.<Object>stream(elements).iterator();
+        }
+        while (iterator.hasNext())
+        {
+            int digit;
+            String t = (String) iterator.next();
             t = t.trim();
-            if(t.contains("%")) {
+            if (t.contains("%"))
+            {
                 t = t.replaceAll("%", "");
                 digit = ( Float.valueOf(t).intValue() * 255) / 100;
                 sb.append(Character.forDigit((digit >> 4) & 15, 16));
                 sb.append(Character.forDigit(digit & 15, 16));
-                
-            } else {
-                if (st.hasMoreElements())
+            }
+            else
+            {
+                if (iterator.hasNext())
                 {
                     digit = Float.valueOf(t).intValue();
                     sb.append(Character.forDigit((digit >> 4) & 15, 16));