Refs #463. Implemented iframe shrinking.

That was a lot more difficult than the code reflects.
Stupid IE8 still doesn't work, but we're punting for now.
Also still need to test IE9.