CSS: Make `offsetHeight( true )`, etc. include negative margins
commitbce13b72c1753e16cc0db53ebf0f0456bdcf6b48
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Tue, 4 Apr 2023 14:00:55 +0000 (4 16:00 +0200)
committerGitHub <noreply@github.com>
Tue, 4 Apr 2023 14:00:55 +0000 (4 16:00 +0200)
tree6465829ebdbd209547355057980f56beb8e0779d
parentbcaeb000b777c018ad5d18e01be5060caa8cb158
CSS: Make `offsetHeight( true )`, etc. include negative margins

This regressed in gh-3656 as the added logic to include scroll gutters
in `.innerWidth()` / `.innerHeight()` didn't take negative margins into
account. This broke handling of negative margins in
`.offsetHeight( true )` and `.offsetWidth( true )`. To fix it, calculate
margin delta separately and only add it after the scroll gutter
adjustment logic.

Fixes gh-3982
Closes gh-5234
Ref gh-3656
src/css.js
test/unit/dimensions.js