Image with height defined in % resizes properly

This commit is contained in:
Darin Minamoto 2016-06-15 16:39:22 -07:00
parent 033786cd0d
commit 4a4be1d7e5
8 changed files with 83 additions and 11 deletions

View file

@ -2040,6 +2040,18 @@
"url": "/_mozilla/css/image_percentage_dimen.html"
}
],
"css/image_percentage_height.html": [
{
"path": "css/image_percentage_height.html",
"references": [
[
"/_mozilla/css/image_percentage_height_ref.html",
"=="
]
],
"url": "/_mozilla/css/image_percentage_height.html"
}
],
"css/image_rendering_auto_a.html": [
{
"path": "css/image_rendering_auto_a.html",
@ -9080,6 +9092,18 @@
"url": "/_mozilla/css/image_percentage_dimen.html"
}
],
"css/image_percentage_height.html": [
{
"path": "css/image_percentage_height.html",
"references": [
[
"/_mozilla/css/image_percentage_height_ref.html",
"=="
]
],
"url": "/_mozilla/css/image_percentage_height.html"
}
],
"css/image_rendering_auto_a.html": [
{
"path": "css/image_rendering_auto_a.html",

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -0,0 +1,23 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<!-- Tests that image resizes properly with height specified as a percentage. -->
<link rel="match" href="image_percentage_height_ref.html">
<style>
div {
height: 100px;
}
img {
height: 100%;
}
</style>
</head>
<body>
<div>
<img src="car.jpg" alt="Car">
</div>
</body>
</html>

View file

@ -0,0 +1,14 @@
<!doctype html>
<html>
<head>
<!-- Tests that image resizes properly with height specified as a percentage. -->
<style>
img {
height: 100px;
}
</style>
</head>
<body>
<img src="car.jpg" alt="Car">
</body>
</html>