shoes/shoes4 — pull request #977 by jasonrclark (2014-12-14 22:41:29+00:00)
Title: Run background and border through positioning

Further pursuit of #874. Along with #976, I think this might have us in a
good place for background margins.

I noted after merging #973 that my fix only "worked" when the background
had a position set. Turns out, the parent slot was only getting a shot to give
a margin to backgrounds when the background was positioned, so a
standard `background white` would end up not getting margins.

I'd toyed before with always positioning backgrounds and borders, but hit
a hang where we got into an infinite re-layout. Well, I solved that problem when
I realized we already have the `takes_up_space?` method which computing
the slot height should have been consulting. Once I did that, I could let the
background and borders get positioned, they get their margins done naturally
then, and we drop some unneeded code. Hurray!

Also proceeded to add some specs around the protected method
`compute_content_height` on the slot since it was gathering a huge cluster
of conditionals that we don't really exercise. Chose to just send to the
protected because actually driving this through `contents_alignment` (the
nearest public method), introduces a TON of other dependencies that were
cluttering up the test. So, slight smell of the send vs much simpler tests... I
thought the simplicity here won out. Let me know if you feel strongly otherwise!

Will be doing another sample run-through (potentially on a merge of this with
#976 to make sure those don't have any conflicts when all put together) before
heading for a merge.