Changeset 5609
- Timestamp:
- 05/15/08 14:45:29 (5 months ago)
- Files:
-
- 1 modified
-
trunk/jquery/src/core.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jquery/src/core.js
r5603 r5609 597 597 598 598 var expando = "jQuery" + now(), uuid = 0, windowData = {}, 599 600 // exclude the following css properties to add px 599 // exclude the following css properties to add px 601 600 exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, 602 // cache getComputedStyle 603 getComputedStyle = document.defaultView && document.defaultView.getComputedStyle;601 // cache defaultView 602 defaultView = document.defaultView || {}; 604 603 605 604 jQuery.extend({ … … 831 830 return false; 832 831 833 // getComputedStyleis cached834 var ret = getComputedStyle( elem, null );832 // defaultView is cached 833 var ret = defaultView.getComputedStyle( elem, null ); 835 834 return !ret || ret.getPropertyValue("color") == ""; 836 835 } … … 858 857 ret = style[ name ]; 859 858 860 else if ( getComputedStyle ) {859 else if ( defaultView.getComputedStyle ) { 861 860 862 861 // Only "float" is needed here … … 866 865 name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); 867 866 868 var computedStyle = getComputedStyle( elem, null );867 var computedStyle = defaultView.getComputedStyle( elem, null ); 869 868 870 869 if ( computedStyle && !color( elem ) )
