From 44c9c4f7519adb0b8c676251e67f4de0dc2a5276 Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Mon, 1 Sep 2014 23:13:46 +0200 Subject: [PATCH] CSS: Remove use of getDefaultComputedStyle Remove optimization to make jQuery compatible with Google's Polymer project Ref 274feb53cc9a99633dfac785d8b3b837d192c43c --- src/css/defaultDisplay.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/css/defaultDisplay.js b/src/css/defaultDisplay.js index adf3f3748..191fe1689 100644 --- a/src/css/defaultDisplay.js +++ b/src/css/defaultDisplay.js @@ -13,17 +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 optmization) - // 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 -- 2.39.5