Fix img with display: block. Fixes text/image overflow on wikipedia.

Ref: #2554
This commit is contained in:
Glenn Watson 2014-09-19 11:05:54 +10:00
parent a3b20d8179
commit 818f70e319
4 changed files with 51 additions and 0 deletions

View file

@ -133,3 +133,4 @@ flaky_gpu,flaky_linux == acid2_noscroll.html acid2_ref_broken.html
== percent_height.html percent_height_ref.html
== inline_block_with_margin_a.html inline_block_with_margin_ref.html
== table_padding_a.html table_padding_ref.html
== img_block_display_a.html img_block_display_ref.html

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
@font-face {
font-family: 'ahem';
src: url(fonts/ahem/ahem.ttf);
}
body {
margin: 0;
font-family: 'ahem';
font-size: 50px;
line-height: 1;
color: red;
}
img {
display: block;
}
</style>
</head>
<body>
<div><img src="100x100_green.png"></div>
<div>A</div>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body {
margin: 0;
}
.ahem {
background-color: red;
width: 50px;
height: 50px;
position: absolute;
top: 100px;
}
</style>
</head>
<body>
<div><img src="100x100_green.png"></div>
<div class="ahem"></div>
</body>
</html>