RESOLVED FIXED91061
Incorrect rounding in ceiledLayoutUnit and roundedLayoutUnit
https://bugs.webkit.org/show_bug.cgi?id=91061
Summary Incorrect rounding in ceiledLayoutUnit and roundedLayoutUnit
Allan Sandfeld Jensen
Reported 2012-07-12 02:17:02 PDT
When subpixel layout is enabled, the two functions ceiledLayoutUnit and roundedLayoutUnit both returns the flooredLayoutUnit instead of ceiled or rounded values. The function FractionalUnit::fromFloatCeil was recently added to solve the same problem in updatePreferredWidth in RenderBlock.cpp, and can be reused to fix ceiledLayoutUnit.
Attachments
Patch (3.62 KB, patch)
2012-07-12 02:26 PDT, Allan Sandfeld Jensen
no flags
Allan Sandfeld Jensen
Comment 1 2012-07-12 02:26:25 PDT
Emil A Eklund
Comment 2 2012-07-12 11:10:19 PDT
Comment on attachment 151892 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=151892&action=review Good catch, thank you! > Source/WebCore/platform/FractionalLayoutUnit.h:97 > + static FractionalLayoutUnit fromFloatRound(float value) We probably want to assert that the value is in bounds here too.
Allan Sandfeld Jensen
Comment 3 2012-07-12 11:37:51 PDT
(In reply to comment #2) > (From update of attachment 151892 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=151892&action=review > > Good catch, thank you! > > > Source/WebCore/platform/FractionalLayoutUnit.h:97 > > + static FractionalLayoutUnit fromFloatRound(float value) > > We probably want to assert that the value is in bounds here too. I believe in this case the values are asserted to be in bounds in the constructor, so I don't think we need to assert it in the fromFloatRound function.
Emil A Eklund
Comment 4 2012-07-16 13:21:47 PDT
(In reply to comment #3) > I believe in this case the values are asserted to be in bounds in the constructor, so I don't think we need to assert it in the fromFloatRound function. You are right, that should be enough. Thanks.
Adam Barth
Comment 5 2012-07-25 08:46:41 PDT
Comment on attachment 151892 [details] Patch rs=me based on eae's unofficial review.
WebKit Review Bot
Comment 6 2012-07-25 09:45:39 PDT
Comment on attachment 151892 [details] Patch Clearing flags on attachment: 151892 Committed r123626: <http://trac.webkit.org/changeset/123626>
WebKit Review Bot
Comment 7 2012-07-25 09:45:43 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.