[Webkit-unassigned] [Bug 53586] Rounding errors in converting cm to px
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Feb 24 21:29:10 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=53586
Sanders Shen <weizhengshen at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |weizhengshen at gmail.com
--- Comment #1 from Sanders Shen <weizhengshen at gmail.com> 2012-02-24 21:29:10 PST ---
I think this issue is caused by the implementation of "roundForImpreciseConversion"(Source/WebCore/css/CSSPrimitiveValue.h).
It uses "static_cast" to convert a double number to other type,
then it would case the precision losing.
I modify the logic here as followings:
return ((value > max) || (value < min)) ? 0 : static_cast<T>(lround(value));
Then, the Qt porting could get same result with Firefox/MSIE.
But, I am not sure whether it has any other side effects.
Anyone could explain why we just use "static_cast" here?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list