[Webkit-unassigned] [Bug 204276] Implement the 'ic' unit from CSS Values 4

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 24 13:55:16 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=204276

--- Comment #26 from Myles C. Maxfield <mmaxfield at apple.com> ---
Comment on attachment 439128
  --> https://bugs.webkit.org/attachment.cgi?id=439128
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=439128&action=review

>>> Source/WebCore/platform/graphics/FontMetrics.h:173
>>> +    std::optional<float> m_ideogramWidth;
>> 
>> Why is this an optional? Why not have platformGlyphInit() implement the fallback behavior, rather than computeUnzoomedNonCalcLengthDouble() implement the fallback behavior?
> 
> I just feel like Font should truthfully indicate whether the ideogram width is available or not, so its users can make the correct decision. Right now computeUnzoomedNonCalcLengthDouble() falls back to 1em, but maybe in the future some other code might want to use m_ideogramWidth for something else?

That doesn't make any sense to me. The spec dictates a particular fallback behavior. There is one client, which implements the fallback behavior. Storing an optional stores an unnecessary extra 4 bytes per font.

If there were multiple clients who wanted different behavior here, that would make sense. But there isn't, so better to save those 4 bytes.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210924/2a512951/attachment-0001.htm>


More information about the webkit-unassigned mailing list