<!-- webkit-test-runner [ LayoutFormattingContextEnabled=true InlineFormattingContextIntegrationEnabled=false ] -->
<style>
div {
	float: left;
	width: auto;
	height: auto;
	background-color: green;
}
img {
    display: block;
}
</style>
<div><img src="../../block/resources/50x50.gif"></div>