WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
107322
Update LayoutUnit rounding unit test
https://bugs.webkit.org/show_bug.cgi?id=107322
Summary
Update LayoutUnit rounding unit test
Emil A Eklund
Reported
2013-01-18 13:51:16 PST
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).
Attachments
Patch
(2.72 KB, patch)
2013-01-18 13:52 PST
,
Emil A Eklund
no flags
Details
Formatted Diff
Diff
Patch
(2.84 KB, patch)
2013-01-18 13:55 PST
,
Emil A Eklund
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Emil A Eklund
Comment 1
2013-01-18 13:52:38 PST
Created
attachment 183539
[details]
Patch
Levi Weintraub
Comment 2
2013-01-18 13:53:50 PST
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
Emil A Eklund
Comment 3
2013-01-18 13:55:07 PST
Created
attachment 183541
[details]
Patch
Levi Weintraub
Comment 4
2013-01-18 13:55:50 PST
Comment on
attachment 183541
[details]
Patch Who has two thumbs and is equal to r? Me.
Emil A Eklund
Comment 5
2013-01-18 13:57:15 PST
(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?
Levi Weintraub
Comment 6
2013-01-18 13:58:44 PST
(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!
Emil A Eklund
Comment 7
2013-01-18 14:02:31 PST
Committed
r140205
: <
http://trac.webkit.org/changeset/140205
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug