[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 16:24:30 PDT 2021


--- Comment #27 from Kiet Ho <tho22 at apple.com> ---
Comment on attachment 439128
  --> https://bugs.webkit.org/attachment.cgi?id=439128

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.

I agree, I'll fix it as you said.

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/21aa1f97/attachment.htm>

More information about the webkit-unassigned mailing list