<!-- webkit-test-runner [ LayoutFormattingContextEnabled=true InlineFormattingContextIntegrationEnabled=false ] -->
<style>
img {
    display: block;
    height: 0px;
    min-height: 0px;
    width: 100px;
    margin-top: 100px;
    margin-bottom: 10px;
    outline: 5px solid blue;
}

div {
    width: 100px;
    height: 100px;
    margin-top: 20px;
    outline: 5px solid blue;
}
</style>
<img src="foobar.jpg"><div></div>