jquery/jquery — pull request #783 by mikesherov (2012-05-19 18:51:03+00:00)
Title: fixes #10877, Make outerWidth/Height a setter

OK, so first thing you should know about this pull request is:

```
Running "compare_size:files" (compare_size) task
Sizes - compared to master
253303 (+1692) dist/jquery.js
93495 (+635) dist/jquery.min.js
33450 (+177) dist/jquery.min.js.gz
```

I KNOW! HUGE! However, there are several ways we can make this smaller if we're willing to accept some minor speed loss. As always, well-factored, DRY code are on the opposite ends of the spectrum from optimizations:

- make the code that subtracts the different box attributes from the supplied value in the setter into a function, as it's the opposite of the code in the here: https://github.com/jquery/jquery/blob/e93f2a89e277d3fffbc15b4ef82ebc3ac6a840f5/src/css.js#L312 The downside is another function call on the stack. I don't think it'll be a major hit as the function call is only a small piece of the work done when css is modfied and causing reflows. I can perf this separately if we're concerned.
- introduce another function call onto the stack for outerWidth(false) and outerWidth(true) so that all of the inner/outer(false)/(true) function can be defined in a loop.
- introduce new function signatures: contentWidth(),paddingWidth(),borderWidth(), and marginWidth() to make the intent of these functions clear, and make the signature the same for all of them. We can deprecate the old names, and keep them around until 1.9 or later, at which time, we gain the bytes back from the aliasing.

@dmethvin, @rwaldron please let me know what you think. I know we all fought hard for the bytes we shaved off, but people have been asking for this for a while. If we are willing to accept a small perf degradation here, we can save a lot of those bytes, and I don't think it'll become a bottleneck.