add comment & add ref test

This commit is contained in:
patrick kim 2014-01-21 11:13:26 +09:00
parent 8912df8a5b
commit ef122f8fbf
5 changed files with 40 additions and 0 deletions

View file

@ -1120,6 +1120,9 @@ impl Box {
};
// FIXME(ksh8281): we shouldn't assign height this way
// we need box.assign_height
// now, we can't know about size of parent's height
let height = match (MaybeAuto::from_style(self.style().Box.height,container_width),
image_box_info.dom_height) {
(Specified(height),_) => {

View file

@ -22,3 +22,4 @@
== font_size_em.html font_size_em_ref.html
== font_size_percentage.html font_size_em_ref.html
== position_fixed_a.html position_fixed_b.html
== img_size_a.html img_size_b.html

BIN
src/test/ref/img_size.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View file

@ -0,0 +1,18 @@
<html>
<head>
<title>
The winter is too cold for me...
</title>
</head>
<body>
<div>
<img src="img_size.png" width="206" />
</div>
<div>
<img src="img_size.png" width="206" />
</div>
<div style="width:1000px">
<img src="img_size.png" style="width:100px" />
</div>
</body>
</html>

View file

@ -0,0 +1,18 @@
<html>
<head>
<title>
The winter is too cold for me...
</title>
</head>
<body>
<div>
<img src="img_size.png" height="206" />
</div>
<div>
<img src="img_size.png" style="height:206px"/>
</div>
<div style="width:1000px">
<img src="img_size.png" style="width:10%" />
</div>
</body>
</html>