Auto-width and vertical overflow

The green div has a defined height, but width is set to auto.

As expected, there is a vertical scroll bar to handle the vertical overflow.
Unexpected result: There is also a horizontal scroll bar, which means a horizontal overflow.

Same thing: Auto-width, but no vertical overflow

As expected, there is no vertical scroll bar. Its absence also makes the horizontal one disappear.