Bug 106239 - LayoutUnit(unsigned long long value) compile failure
Summary: LayoutUnit(unsigned long long value) compile failure
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2013-01-07 11:45 PST by Eric Carlson
Modified: 2013-01-07 12:56 PST (History)
2 users (show)

See Also:

Proposed patch (1.33 KB, patch)
2013-01-07 12:00 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Updated patch (1.35 KB, patch)
2013-01-07 12:46 PST, Eric Carlson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2013-01-07 11:45:19 PST
The LayoutUnit constructor which takes an unsigned long long fails to compile on some platforms when SATURATED_LAYOUT_ARITHMETIC is not defined because storing the result of ('unsigned long long' * 'int') into an int loses precision:

Source/WebCore/platform/LayoutUnit.h:89:25: error: implicit conversion loses integer precision: 'unsigned long long' to 'int' [-Werror,-Wshorten-64-to-32]
        m_value = value * kEffectiveFixedPointDenominator;
                ~ ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 1 Radar WebKit Bug Importer 2013-01-07 11:45:51 PST
Comment 2 Eric Carlson 2013-01-07 12:00:45 PST
Created attachment 181541 [details]
Proposed patch
Comment 3 Eric Carlson 2013-01-07 12:15:10 PST
Comment on attachment 181541 [details]
Proposed patch

This is the wrong approach, new patch coming shortly.
Comment 4 Eric Carlson 2013-01-07 12:46:10 PST
Created attachment 181546 [details]
Updated patch
Comment 5 Eric Carlson 2013-01-07 12:55:44 PST
Committed r138978: <http://trac.webkit.org/changeset/138978>