Permalink
Browse files

Don't expand CSS rules. Fixes #257

  • Loading branch information...
1 parent 51771b6 commit 198faafa1d3fa90cf20e45421c2b2f0e8c91c016 @ankit committed Jul 11, 2013
Showing with 10 additions and 4 deletions.
  1. BIN artwork/webstore/marquee.pxm
  2. +10 −4 stylebot/libs/parser.js
Binary file not shown.
@@ -1,4 +1,10 @@
//http://www.glazman.org/JSCSSP/freshmeat.html
+//http://sources.disruptive-innovations.com/jscssp/trunk/cssParser.js
+
+//Changes:
+//#1 Change argument 4 of all calls to parseDeclaration to false.
+//this.parseDeclaration(token, declarations, true, true, aSheet); becomes
+//this.parseDeclaration(token, declarations, true, false, aSheet);
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
@@ -2223,7 +2229,7 @@ CSSParser.prototype = {
valid = true;
break;
} else {
- var d = this.parseDeclaration(token, declarations, true, true, aSheet);
+ var d = this.parseDeclaration(token, declarations, true, false, aSheet);
s += ((d && declarations.length) ? " " : "") + d;
}
token = this.getToken(true, false);
@@ -3654,7 +3660,7 @@ CSSParser.prototype = {
valid = true;
break;
} else {
- var d = this.parseDeclaration(token, declarations, true, true, aOwner);
+ var d = this.parseDeclaration(token, declarations, true, false, aOwner);
s += ((d && declarations.length) ? " " : "") + d;
}
token = this.getToken(true, false);
@@ -3784,7 +3790,7 @@ CSSParser.prototype = {
valid = true;
break;
} else {
- var d = this.parseDeclaration(token, declarations, true, true, aOwner);
+ var d = this.parseDeclaration(token, declarations, true, false, aOwner);
s += ((d && declarations.length) ? " " : "") + d;
}
token = this.getToken(true, false);
@@ -4734,7 +4740,7 @@ jscsspDeclaration.prototype = {
var declarations = [];
var parser = new CSSParser(val);
var token = parser.getToken(true, true);
- if (parser.parseDeclaration(token, declarations, true, true, null)
+ if (parser.parseDeclaration(token, declarations, true, false, null)
&& declarations.length
&& declarations[0].type == kJscsspSTYLE_DECLARATION) {
var newDecl = declarations.cssRules[0];

0 comments on commit 198faaf

Please sign in to comment.