Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added support for alpha(opacity=10) style filters

  • Loading branch information...
commit afb4f10e1e4716aa8b5d7357057e68614d08545e 1 parent a31e4f6
@nzakas nzakas authored
View
14 build/node-parserlib.js
@@ -2819,7 +2819,16 @@ Parser.prototype = function(){
//has to be a function
if (value === null){
- value = this._function();
+
+ /*
+ * This checks for alpha(opacity=0) style of IE
+ * functions. IE_FUNCTION only presents progid: style.
+ */
+ if (tokenStream.LA(3) == Tokens.EQUALS && this.options.ieFilters){
+ value = this._ie_function();
+ } else {
+ value = this._function();
+ }
}
/*if (value === null){
@@ -2880,7 +2889,8 @@ Parser.prototype = function(){
expr = null,
lt;
- if (tokenStream.match(Tokens.IE_FUNCTION)){
+ //IE function can begin like a regular function, too
+ if (tokenStream.match([Tokens.IE_FUNCTION, Tokens.FUNCTION])){
functionText = tokenStream.token().value;
do {
View
14 build/parserlib-css.js
@@ -1920,7 +1920,16 @@ Parser.prototype = function(){
//has to be a function
if (value === null){
- value = this._function();
+
+ /*
+ * This checks for alpha(opacity=0) style of IE
+ * functions. IE_FUNCTION only presents progid: style.
+ */
+ if (tokenStream.LA(3) == Tokens.EQUALS && this.options.ieFilters){
+ value = this._ie_function();
+ } else {
+ value = this._function();
+ }
}
/*if (value === null){
@@ -1981,7 +1990,8 @@ Parser.prototype = function(){
expr = null,
lt;
- if (tokenStream.match(Tokens.IE_FUNCTION)){
+ //IE function can begin like a regular function, too
+ if (tokenStream.match([Tokens.IE_FUNCTION, Tokens.FUNCTION])){
functionText = tokenStream.token().value;
do {
View
14 build/parserlib.js
@@ -2819,7 +2819,16 @@ Parser.prototype = function(){
//has to be a function
if (value === null){
- value = this._function();
+
+ /*
+ * This checks for alpha(opacity=0) style of IE
+ * functions. IE_FUNCTION only presents progid: style.
+ */
+ if (tokenStream.LA(3) == Tokens.EQUALS && this.options.ieFilters){
+ value = this._ie_function();
+ } else {
+ value = this._function();
+ }
}
/*if (value === null){
@@ -2880,7 +2889,8 @@ Parser.prototype = function(){
expr = null,
lt;
- if (tokenStream.match(Tokens.IE_FUNCTION)){
+ //IE function can begin like a regular function, too
+ if (tokenStream.match([Tokens.IE_FUNCTION, Tokens.FUNCTION])){
functionText = tokenStream.token().value;
do {
View
14 src/css/Parser.js
@@ -1459,7 +1459,16 @@ Parser.prototype = function(){
//has to be a function
if (value === null){
- value = this._function();
+
+ /*
+ * This checks for alpha(opacity=0) style of IE
+ * functions. IE_FUNCTION only presents progid: style.
+ */
+ if (tokenStream.LA(3) == Tokens.EQUALS && this.options.ieFilters){
+ value = this._ie_function();
+ } else {
+ value = this._function();
+ }
}
/*if (value === null){
@@ -1520,7 +1529,8 @@ Parser.prototype = function(){
expr = null,
lt;
- if (tokenStream.match(Tokens.IE_FUNCTION)){
+ //IE function can begin like a regular function, too
+ if (tokenStream.match([Tokens.IE_FUNCTION, Tokens.FUNCTION])){
functionText = tokenStream.token().value;
do {
Please sign in to comment.
Something went wrong with that request. Please try again.