RESOLVED FIXED 136253
Subpixel layout: Remove float to LayoutUnit ceil/round function wrappers.
https://bugs.webkit.org/show_bug.cgi?id=136253
Summary Subpixel layout: Remove float to LayoutUnit ceil/round function wrappers.
alan
Reported 2014-08-26 08:25:28 PDT
ceiledLayoutUnit() roundedLayoutUnit() These functions ceil/round float to LayoutUnit. Their usage are limited and can easily be confused with the snapping functions (snap to css/device pixels).
Attachments
Patch (12.50 KB, patch)
2014-08-26 10:43 PDT, alan
no flags
Patch (12.32 KB, patch)
2014-08-26 11:16 PDT, alan
no flags
Patch (8.68 KB, patch)
2014-08-26 11:43 PDT, alan
no flags
alan
Comment 1 2014-08-26 10:43:51 PDT
Simon Fraser (smfr)
Comment 2 2014-08-26 10:59:28 PDT
Comment on attachment 237156 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=237156&action=review > Source/WebCore/platform/LayoutUnit.h:926 > +// When this occurs while accumulating converted LayoutUnit values, we can wind up with a result smaller than expected. That doesn't explain the ceil though. This comment is pretty confusing. The caller really needs to know whether ceiling or flooring is appropriate for them. > Source/WebCore/platform/LayoutUnit.h:927 > +inline LayoutUnit ceilFloatForSubPixelLayout(float value) I don't think the "ForSubPixelLayout" adds anything. I think the name "ceiledLayoutUnit" is as good.
alan
Comment 3 2014-08-26 11:16:27 PDT
alan
Comment 4 2014-08-26 11:43:37 PDT
Simon Fraser (smfr)
Comment 5 2014-08-26 11:48:50 PDT
Comment on attachment 237160 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=237160&action=review > Source/WebCore/rendering/RenderBlock.cpp:2902 > + preferredWidth = std::max(LayoutUnit::fromFloatCeil(result), preferredWidth); You lost some of the comment here, which I think is useful to explain why this code uses ceil.
WebKit Commit Bot
Comment 6 2014-08-26 12:29:22 PDT
Comment on attachment 237160 [details] Patch Clearing flags on attachment: 237160 Committed r172970: <http://trac.webkit.org/changeset/172970>
WebKit Commit Bot
Comment 7 2014-08-26 12:29:25 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.