Bug 78835 - Fix use of long long in FractionalLayoutUnit::setRawValue
Summary: Fix use of long long in FractionalLayoutUnit::setRawValue
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Emil A Eklund
URL:
Keywords:
Depends on:
Blocks: 76571
  Show dependency treegraph
 
Reported: 2012-02-16 13:22 PST by Emil A Eklund
Modified: 2012-02-16 17:16 PST (History)
4 users (show)

See Also:


Attachments
Patch (3.00 KB, patch)
2012-02-16 13:31 PST, Emil A Eklund
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.