Bug 89738 - Percentage widths less than 1% rounded to zero
Summary: Percentage widths less than 1% rounded to zero
Status: RESOLVED DUPLICATE of bug 113630
Alias: None
Product: konqueror
Classification: Applications
Component: khtml renderer (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-18 01:59 UTC by Phil Endecott
Modified: 2005-10-01 03:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Testcase mentioned in description (1.37 KB, text/html)
2004-09-18 02:00 UTC, Phil Endecott
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Endecott 2004-09-18 01:59:40 UTC
Version:            (using KDE KDE 3.2.2)
Installed from:    Debian testing/unstable Packages
OS:                Linux

Absolute widths specified using percentages of less than 1 seem to be
rounded down to 0 pixels.

The test case that I will attach contains a series of nested pairs of
divs.  In each case the outer div, whose width is specified as a
number of pixels, changes.  At the same time the inner div's width is
specied as a percentage and also changes reciprocally so that its width
in absolute terms should remain the same at 1 pixel wide.  So for
example in one case the outer div is 10 pixels wide and the inner div
is 10% wide, and in another case the outer div is 1000 pixels wide and
the inner div is 0.1% wide.

It seems that in the cases where the percentage is less than one,
nothing is displayed.  I'm guessing that there is some incorrect
rounding going on somewhere.

I see the behaviour that I expect in Mozilla and Internet Explorer.

I use code similar to this at http://treefic.com [click on one of the
demo images] and am keen to have it work on all browsers including
Konqueror and Safari.  An earlier version of treefic.com did work in
Konqueror, but I changed to percentages so that it scales correctly if
the user changes font sizes.


Regards,

--Phil Endecott.
Comment 1 Phil Endecott 2004-09-18 02:00:44 UTC
Created attachment 7566 [details]
Testcase mentioned in description
Comment 2 Thiago Macieira 2005-10-01 03:00:50 UTC
Larger problem: KHTML rounds percentages down to the integer part, so anything less than 1% is rounded down to 0.

*** This bug has been marked as a duplicate of 113630 ***