]> source.dussan.org Git - jquery.git/commitdiff
CSS: remove dead code in getWidthOrHeight
authorTimmy Willison <4timmywil@gmail.com>
Mon, 13 Mar 2017 14:53:03 +0000 (10:53 -0400)
committerTimmy Willison <4timmywil@gmail.com>
Mon, 13 Mar 2017 17:33:05 +0000 (13:33 -0400)
- getCSS already falls back to inline styles

Ref gh-3561

src/css.js

index 3c5784aa29bbb213f3cb961bd00443c9446ca161..2ce343300f2364d6755352af2e7e06f2c1a124cb 100644 (file)
@@ -134,11 +134,6 @@ function getWidthOrHeight( elem, name, extra ) {
                val = curCSS( elem, name, styles ),
                isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
 
-       // Fall back to uncomputed css if necessary
-       if ( val < 0 || val == null ) {
-               val = elem.style[ name ];
-       }
-
        // Computed unit is not pixels. Stop here and return.
        if ( rnumnonpx.test( val ) ) {
                return val;