Update the LayoutUnitRounding test to use fromFloatRound for values that cannot accurately be represented as a LayoutUnit (the default behavior is to floor the value to the nearest LayoutUnit).
Created attachment 183539 [details] Patch
Comment on attachment 183539 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=183539&action=review > Tools/TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp:99 > + ASSERT_EQ(LayoutUnit::fromFloatRound(0.49f).round(), 0); > + ASSERT_EQ(LayoutUnit::fromFloatRound(0.50f).round(), 1); > ASSERT_EQ(LayoutUnit(0.99f).round(), 1); For consistency with above, should you check 0.51f here as well? > Tools/TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp:102 > + ASSERT_EQ(LayoutUnit::fromFloatRound(1.49f).round(), 1); > + ASSERT_EQ(LayoutUnit::fromFloatRound(1.5f).round(), 2); Ditto
Created attachment 183541 [details] Patch
Comment on attachment 183541 [details] Patch Who has two thumbs and is equal to r? Me.
(In reply to comment #4) > (From update of attachment 183541 [details]) > Who has two thumbs and is equal to r? > Me. Thanks Isn't it closer to 1.98 thumbs at the moment though?
(In reply to comment #5) > (In reply to comment #4) > > (From update of attachment 183541 [details] [details]) > > Who has two thumbs and is equal to r? > > Me. > > Thanks > Isn't it closer to 1.98 thumbs at the moment though? 1.98 rounds to 2. Be careful I don't r- and demand that be included!
Committed r140205: <http://trac.webkit.org/changeset/140205>