diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2012-05-14 21:02:42 -0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2012-05-15 23:29:20 -0400 |
commit | c4e22ad8b5edd52ac78ec44bf7df8a7f37403623 (patch) | |
tree | 1208041730a0095ecc85062ceeb20dcbe9d1e9c7 /src/offset.js | |
parent | f76518e3931f7f2522a38bf37a7df24a620858fc (diff) | |
download | jquery-c4e22ad8b5edd52ac78ec44bf7df8a7f37403623.tar.gz jquery-c4e22ad8b5edd52ac78ec44bf7df8a7f37403623.zip |
Fix #11721. Remove jQuery.boxModel, deprecate jQuery.support.boxModel.
This removes all internal uses of `jQuery.support.boxModel`. jQuery has never run unit tests with Quirks Mode and has not even feigned support for several years, so these remnants weren't doing much except giving false hope.
For now, `jQuery.support.boxModel` continues to have a value indicating whether the W3C box model is *generally* in use, but be aware that this is easily overridden on an element-by-element basis by the `box-model` CSS property. So don't trust this value.
Diffstat (limited to 'src/offset.js')
-rw-r--r-- | src/offset.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/offset.js b/src/offset.js index 69c4d72ad..1288b79ff 100644 --- a/src/offset.js +++ b/src/offset.js @@ -20,8 +20,8 @@ if ( "getBoundingClientRect" in document.documentElement ) { win = getWindow( doc ), clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, - scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop, - scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft, + scrollTop = win.pageYOffset || docElem.scrollTop, + scrollLeft = win.pageXOffset || docElem.scrollLeft, top = box.top + scrollTop - clientTop, left = box.left + scrollLeft - clientLeft; @@ -176,8 +176,7 @@ jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( me if ( val === undefined ) { return win ? (prop in win) ? win[ prop ] : - jQuery.support.boxModel && win.document.documentElement[ method ] || - win.document.body[ method ] : + win.document.documentElement[ method ] : elem[ method ]; } |