From: Trevor Parscal Date: Tue, 11 May 2010 19:25:44 +0000 (+0000) Subject: Patched jquery-1.4.2 to not crash in IE7 when a style property is set with 'null... X-Git-Tag: 1.31.0-rc.0~36891 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=f02c88a21e0fdb76cfc4e41b7464b55726b38df8;p=lhc%2Fweb%2Fwiklou.git Patched jquery-1.4.2 to not crash in IE7 when a style property is set with 'null' or 'NaN' as a value. --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 73e819f3e1..1e3aa91e8f 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1677,7 +1677,7 @@ $wgCacheEpoch = '20030516000000'; * to ensure that client-side caches do not keep obsolete copies of global * styles. */ -$wgStyleVersion = '278'; +$wgStyleVersion = '279'; # Server-side caching: diff --git a/skins/common/jquery-1.4.2.js b/skins/common/jquery-1.4.2.js index c63f08d567..4f8a4db222 100644 --- a/skins/common/jquery-1.4.2.js +++ b/skins/common/jquery-1.4.2.js @@ -4614,7 +4614,7 @@ jQuery.extend({ name = name.replace(rdashAlpha, fcamelCase); - if ( set ) { + if ( set && value !== 'NaNpx' && value !== 'nullpx' ) { style[ name ] = value; } diff --git a/skins/common/jquery-1.4.2.min.js b/skins/common/jquery-1.4.2.min.js index 0a79bac294..af6f67e3f7 100644 --- a/skins/common/jquery-1.4.2.min.js +++ b/skins/common/jquery-1.4.2.min.js @@ -346,7 +346,7 @@ if((name==="width"||name==="height")&&parseFloat(value)<0){value=undefined;} var style=elem.style||elem,set=value!==undefined;if(!jQuery.support.opacity&&name==="opacity"){if(set){style.zoom=1;var opacity=parseInt(value,10)+""==="NaN"?"":"alpha(opacity="+value*100+")";var filter=style.filter||jQuery.curCSS(elem,"filter")||"";style.filter=ralpha.test(filter)?filter.replace(ralpha,opacity):opacity;} return style.filter&&style.filter.indexOf("opacity=")>=0?(parseFloat(ropacity.exec(style.filter)[1])/100)+"":"";} if(rfloat.test(name)){name=styleFloat;} -name=name.replace(rdashAlpha,fcamelCase);if(set){style[name]=value;} +name=name.replace(rdashAlpha,fcamelCase);if(set&&value!=='NaNpx'&&value!=='nullpx'){style[name]=value;} return style[name];},css:function(elem,name,force,extra){if(name==="width"||name==="height"){var val,props=cssShow,which=name==="width"?cssWidth:cssHeight;function getWH(){val=name==="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border"){return;} jQuery.each(which,function(){if(!extra){val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;} if(extra==="margin"){val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0;}else{val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;}});}