[Webkit-unassigned] [Bug 5531] 1px gap appears between percent-sized floats adding to 100%

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 26 08:53:06 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=5531


Konstantin Shcheglov <scheglov at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |scheglov at google.com




--- Comment #7 from Konstantin Shcheglov <scheglov at google.com>  2011-09-26 08:53:06 PST ---
Just for records.
Problem is that integer type is used to store width and location.
So, when Length::calcMinValue  calculates:
return static_cast<int>(static_cast<float>(maxValue * percent() / 100.0f));

For maxValue=201px we get 100 for one float 50% and for another float 50%.
So, we get 1px gap at the right.

I'm not sure how to solve this without using floating point.
It seems that Firefox uses floating point here, because it shows 100.5px in calculated style.

-- 
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