[Webkit-unassigned] [Bug 92471] ASSERTION FAILED: allocatedMaxLogicalWidth <= cellMaxLogicalWidth : int WebCore::AutoTableLayout::calcEffectiveLogicalWidth()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jul 28 05:16:02 PDT 2012


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


Arpita Bahuguna <arpitabahuguna at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arpitabahuguna at gmail.com,
                   |                            |vijayan.bits at gmail.com




--- Comment #3 from Arpita Bahuguna <arpitabahuguna at gmail.com>  2012-07-28 05:16:05 PST ---
Hi Julien. The problem here is due to a decimal error in the float value (allocatedMaxLogicalWidth).

When we split the cellMaxLogicalWidth (which is 512.00000 in this case) between different columns (based on the percentage) and add it up (in allocatedMaxLogicalWidth) we finally get 512.00006, thereby introducing an error of .00006 due to floating point rounding off in the last decimal, which in turn triggers the assert.

I guess type casting to int and then checking should help in most cases.
eg: 
ASSERT(static_cast<int>(allocatedMaxLogicalWidth) <= static_cast<int>(cellMaxLogicalWidth));

Please let me know your opinion.

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