CSS: Remove use of getDefaultComputedStyle

Remove optimization to make jQuery compatible with Google's Polymer project

Closes gh-1647
Fixes #15227
This commit is contained in:
Nazar Mokrynskyi 2014-09-01 23:13:46 +02:00 committed by Oleg Gaidarenko
parent 075da3091c
commit 274feb53cc

View File

@ -13,19 +13,9 @@ var iframe,
*/
// Called only from within defaultDisplay
function actualDisplay( name, doc ) {
var style,
elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
// getDefaultComputedStyle might be reliably used only on attached element
display = window.getDefaultComputedStyle &&
( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
// Use of this method is a temporary fix (more like optimization)
// until something better comes along,
// since it was removed from specification and supported only in FF
style.display :
jQuery.css( elem[ 0 ], "display" );
display = jQuery.css( elem[ 0 ], "display" );
// We don't have any data stored on the element,
// so use "detach" method as fast way to get rid of the element