From 1977ab64c8f91bc03110eba417c265ba6ee6e173 Mon Sep 17 00:00:00 2001 From: Andreas Lind Petersen Date: Fri, 23 Sep 2011 17:45:13 +0200 Subject: [PATCH] Added a hack to the CSSOM parser that starts a new CSSStyleRule if a property gets redefined within the same rule. Also, do the inverse when serializing a CSSStyleSheet. This is a temporary workaround until https://github.com/NV/CSSOM/issues/16 gets resolved. Cherry-picked from 65e0b93. Conflicts: package.json --- lib/CSSStyleSheet.js | 16 +++++++++++++++- lib/parse.js | 18 ++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/lib/CSSStyleSheet.js b/lib/CSSStyleSheet.js index f0e0dfc..2264e50 100644 --- a/lib/CSSStyleSheet.js +++ b/lib/CSSStyleSheet.js @@ -76,7 +76,21 @@ CSSOM.CSSStyleSheet.prototype.toString = function() { var result = ""; var rules = this.cssRules; for (var i=0; i