[svn r41] outline shorthand trunk
authordglazman
Mon, 15 Mar 2010 09:47:37 -0500
branchtrunk
changeset 37 2172639e885d
parent 36 e8fb702c461c
child 38 afcddd921c9c
[svn r41] outline shorthand
cssParser.js
--- a/cssParser.js	Mon Mar 15 09:42:09 2010 -0500
+++ b/cssParser.js	Mon Mar 15 09:47:37 2010 -0500
@@ -1346,7 +1346,7 @@
     return top + " " + right + " " + bottom + " " + left;
   },
 
-  parseBorderEdgeShorthand: function(token, aDecl, aAcceptPriority, aProperty)
+  parseBorderEdgeOrOutlineShorthand: function(token, aDecl, aAcceptPriority, aProperty)
   {
     var bWidth = null;
     var bStyle = null;
@@ -1377,7 +1377,8 @@
       }
 
       else {
-        var color = this.parseColor(token);
+        var color = (aProperty == "outline" && token.isIdent("invert"))
+                    ? "invert" : this.parseColor(token);
         if (!bColor && color)
           bColor = color;
         else
@@ -1546,9 +1547,9 @@
       }
 
       else if (!lImage && token.isFunction("url")) {
-	      token = this.getToken(true, true);
-	      var urlContent = this.parseURL(token);
-	      if (urlContent) {
+        token = this.getToken(true, true);
+        var urlContent = this.parseURL(token);
+        if (urlContent) {
           lImage = "url(" + urlContent;
         }
         else
@@ -1907,7 +1908,8 @@
           case "border-bottom":
           case "border-left":
           case "border":
-            value = this.parseBorderEdgeShorthand(token, declarations, aAcceptPriority, descriptor);
+          case "outline":
+            value = this.parseBorderEdgeOrOutlineShorthand(token, declarations, aAcceptPriority, descriptor);
             break;
           case "cue":
             value = this.parseCueShorthand(token, declarations, aAcceptPriority);