Summary: | Subpixel layout: Remove float to LayoutUnit ceil/round function wrappers. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | zalan <zalan> | ||||||||
Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, simon.fraser | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 136275 | ||||||||||
Attachments: |
|
Description
zalan
2014-08-26 08:25:28 PDT
Created attachment 237156 [details]
Patch
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. Created attachment 237158 [details]
Patch
Created attachment 237160 [details]
Patch
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. Comment on attachment 237160 [details] Patch Clearing flags on attachment: 237160 Committed r172970: <http://trac.webkit.org/changeset/172970> All reviewed patches have been landed. Closing bug. |