Permalink
Browse files

Add support for -pie-png-fix

  • Loading branch information...
Felix Gnass authored and lojjic committed Sep 17, 2010
1 parent 6da6153 commit d8e2f5a1a2d8101c9ae0e34b28a34d8b7c3a0e7d
Showing with 12 additions and 3 deletions.
  1. +12 −3 sources/BackgroundStyleInfo.js
@@ -271,14 +271,23 @@ PIE.BackgroundStyleInfo = PIE.StyleInfoBase.newStyleInfo( {
return el.style[ this.styleProperty ] || el.currentStyle.getAttribute( this.cssProperty );
} ),
+ /**
+ * Tests if style.PiePngFix or the -pie-png-fix property is set to true/on.
+ */
+ isPngFix: PIE.StyleInfoBase.cacheWhenLocked( function() {
+ var el = this.targetElement;
+ var val = (el.style.PiePngFix || el.currentStyle.getAttribute( 'pie-png-fix' ));
+ return /^(true|on)$/i.test(val);
+ } ),
+
/**
* The isActive logic is slightly different, because getProps() always returns an object
* even if it is just falling back to the native background properties. But we only want
- * to report is as being "active" if the -pie-background override property is present and
- * parses successfully.
+ * to report is as being "active" if either the -pie-background override property is present
+ * and parses successfully or '-pie-png-fix' is set to true/on.
*/
isActive: PIE.StyleInfoBase.cacheWhenLocked( function() {
- return this.getCss3() && !!this.getProps();
+ return (this.getCss3() || this.isPngFix()) && !!this.getProps();
} )
} );

0 comments on commit d8e2f5a

Please sign in to comment.