Disables new property optimizer if body is not optimizable.
authorJakub Pawlowicz <jakub@goalsmashers.com>
Sun, 8 Jun 2014 20:31:17 +0000 (21:31 +0100)
committerJakub Pawlowicz <jakub@goalsmashers.com>
Sun, 8 Jun 2014 20:34:35 +0000 (21:34 +0100)
lib/properties/optimizer.js
lib/properties/processable.js

index fe7903e..c4533e9 100644 (file)
@@ -266,7 +266,7 @@ module.exports = function Optimizer(compatibility, aggressiveMerging) {
         result = rebuild(optimized);
       }
 
-      if (!skipCompacting) {
+      if (!skipCompacting && processableInfo.implementedFor.test(result)) {
         result = compact(result);
       }
 
index c39016c..c98b9ea 100644 (file)
@@ -751,6 +751,7 @@ module.exports = (function () {
   var Token = tokenModule.createTokenPrototype(processable);
 
   return {
+    implementedFor: /background|border|color|list|margin|outline|padding|transform/,
     processable: processable,
     Token: Token
   };