...
<rdar://problem/74415329>
Created attachment 420569 [details] Patch
Created attachment 420645 [details] Patch
Comment on attachment 420645 [details] Patch Thanks for the review!
Committed r273014: <https://commits.webkit.org/r273014> All reviewed patches have been landed. Closing bug and clearing flags on attachment 420645 [details].
Comment on attachment 420645 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=420645&action=review > Source/WebCore/rendering/RenderThemeIOS.mm:688 > + width = static_cast<int>(std::ceil(maximumWidth)); Seems a little bit messy (not newly so). Not sure I understand the strategy behind using int here. Why would we would want to floor or ceil to an integer instead of letting rendering code snap to device pixel boundaries? And floor in the old code and ceil in the new? Length can hold LayoutUnit values, not just integers, so the int isn’t necessary, so it’s a choice.
(In reply to Darin Adler from comment #6) > Comment on attachment 420645 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=420645&action=review > > > Source/WebCore/rendering/RenderThemeIOS.mm:688 > > + width = static_cast<int>(std::ceil(maximumWidth)); > > Seems a little bit messy (not newly so). Not sure I understand the strategy > behind using int here. Why would we would want to floor or ceil to an > integer instead of letting rendering code snap to device pixel boundaries? > And floor in the old code and ceil in the new? Length can hold LayoutUnit > values, not just integers, so the int isn’t necessary, so it’s a choice. I suppose we could just use the float value rather than an int. The only reason I used an int in the new code is to match the original logic. The important thing here is that the width of the date control is just large enough to fit the date on one line. The ceil is necessary in the new code to avoid rounding down and making the width too small. The floor only works in the old code because of the additional padding added (ensuring the width is large enough). I can make the change to use the float value in a follow-up.