On Sun, Jul 5, 2009 at 6:50 AM, tvk<[email protected]> wrote:
> What happens inside code during parsing the HTML file is that floating
> pointing number gets converted to integer without rounding off. So
> 6.72 becomes 6, 7.84 becomes 7 and 16.8 becomes 16 resulting in total
> for "RLITotal" as 29.

First, I'd like to note that on Linux we've had a very
hard-to-track-down bug related to rounding and that it's really great
that you're looking into this...

(http://code.google.com/p/chromium/issues/detail?id=8475 , but we also
see some line heights get computed wrong in for example the acid2
test.)

> So adding 0.5 to result before casting it to integer in the following
> function fixes the issue. This function is a generic function used
> during HTML/CSS file parsing.
>
> int CSSPrimitiveValue::computeLengthIntForLength(RenderStyle* style,
> double multiplier)

...but this looks like it's code in WebKit so you might find more of a
response asking about it on the webkit mailing list:
http://lists.webkit.org/mailman/listinfo/webkit-dev

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to