[Webkit-unassigned] [Bug 52699] Allow Fixed Length values to be floating point

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 9 00:10:07 PST 2011


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





--- Comment #4 from Rik Cabanier <cabanier at gmail.com>  2011-02-09 00:10:07 PST ---
> 
> In that case the patch needs to include new results for all the affected tests.
Will do so

> 
> This changelog entry needs to mention the changes in Length behavior.
> 
> > Source/WebCore/platform/Length.h:33
> > -const int percentScaleFactor = 128;
> > -const int intMaxForLength = 0x7ffffff; // max value for a 28-bit int
> > -const int intMinForLength = (-0x7ffffff - 1); // min value for a 28-bit int
> > +const int intMaxForLength = 0x7ffff; // max value for a 20-bit int
> > +const int intMinForLength = (-0x7ffff - 1); // min value for a 20-bit int
> 
> I don't think it's acceptable to change the max and min int values that Length can store. That might break websites (which do things like z-index: 999999999).

That doesn't work today either. Length can store at most 134217472 which is less than 999999999. The class also doesn't do bounds checking, so the larger value will overflow and become garbage.

It seems that making it a full int or float is the correct solution. Is it acceptable that the class takes up 4 more bytes?

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