Bug 78835

Summary: Fix use of long long in FractionalLayoutUnit::setRawValue
Product: WebKit Reporter: Emil A Eklund <eae>
Component: PlatformAssignee: Emil A Eklund <eae>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben, eric, leviw, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 76571    
Attachments:
Description Flags
Patch none

Description Emil A Eklund 2012-02-16 13:22:32 PST
setRawValue(long long) which is called by the multiple operator has an assertion to verify that the resulting value is within the range of an int. This currently uses abs(long long) which isn't implemented on all platforms we support.
Comment 1 Emil A Eklund 2012-02-16 13:31:46 PST
Created attachment 127434 [details]
Patch
Comment 2 Eric Seidel (no email) 2012-02-16 13:44:24 PST
Comment on attachment 127434 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=127434&action=review

The rest looks fine.

> Source/WebCore/platform/FractionalLayoutUnit.h:122
> +        return value < static_cast<unsigned>(std::numeric_limits<int>::max()) / kFixedPointDenominator;

Why is this necessary?
Comment 3 Levi Weintraub 2012-02-16 13:46:15 PST
Comment on attachment 127434 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=127434&action=review

>> Source/WebCore/platform/FractionalLayoutUnit.h:122
>> +        return value < static_cast<unsigned>(std::numeric_limits<int>::max()) / kFixedPointDenominator;
> 
> Why is this necessary?

Since value here is unsigned, you'll get a type warning when comparing them if you don't cast the int.
Comment 4 Eric Seidel (no email) 2012-02-16 13:46:57 PST
Comment on attachment 127434 [details]
Patch

OK.
Comment 5 WebKit Review Bot 2012-02-16 17:16:32 PST
Comment on attachment 127434 [details]
Patch

Clearing flags on attachment: 127434

Committed r108006: <http://trac.webkit.org/changeset/108006>
Comment 6 WebKit Review Bot 2012-02-16 17:16:36 PST
All reviewed patches have been landed.  Closing bug.