Bug 106239

Summary: LayoutUnit(unsigned long long value) compile failure
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch
none
Updated patch none

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
<rdar://problem/12967415>
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>