[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    image scaling problem in khtml
From:       Jelmer Feenstra <email () jelmer ! cc>
Date:       2002-03-30 21:57:29
[Download RAW message or body]

Hi,

The following image isn't rendered correctly with khtml :
(test.png being 256x256 pixels for example)

<TABLE>
<TD WIDTH=512 HEIGHT=512 VALIGN=TOP >
<IMG SRC="test.png" HEIGHT="100%" WIDTH="100%"></IMG>
</TABLE>

The problem is the height attribute of the image. Somehow, khtml won't scale 
the height of the image when it's given as a percentage relative to the 
available height (which is the height of the table cell, 512 in this case). 
I've been going through the code (render_box.cpp & render_image.cpp) for a 
few hours, but couldn't find where the image scaling takes place, and where 
the height of the encapsulating element is asked. I'd like to point out that 
horizontal image scaling works ok, with the exception that it's possible to 
scale an image horizontally larger than is allowed by the encapsulating table 
cell (it's possible to scale the image out of the cell).

Dirk ? Lars ? If you could five me a hint where to look for the related code, 
I can try and fix this one myself. If not - maybe you can have a look at it ?

Thanks in advance,

Jelmer Feenstra

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic