W3C home > Mailing lists > Public > public-css-testsuite@w3.org > January 2012

Re: [RC6] c5510-padn-000 has a fractional pixel issue

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 25 Jan 2012 17:47:31 +0100
Message-ID: <4F203223.5070108@mit.edu>
To: public-css-testsuite@w3.org
On 1/25/12 5:13 PM, Chris Lilley wrote:
> On Tuesday, January 24, 2012, 5:28:54 AM, Gérard wrote:
>
> GT>  138px mult by 0.17391 == 23.99958px
> GT>  but both Chrome 16.0.912.77, Konqueror 4.7.4 and Opera 11.60 will
> GT>  unexpectedly truncate that value to 23px!
>
> Why on earth do they truncate rather than round?

Probably because that's what C++ does when you assign a float to an 
integer.  So if you don't think about the conversion too hard, that's 
the behavior you get.

> Is there some spec-conformance issue that makes them do this (apparently dumb) behaviour?

No.

-Boris
Received on Wednesday, 25 January 2012 16:48:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 January 2012 16:48:10 GMT