[webkit-reviews] review granted: [Bug 224266] Wasted vector capacity under CSSFontFace::setUnicodeRange() : [Attachment 425352] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 7 09:54:30 PDT 2021


Devin Rousso <drousso at apple.com> has granted Simon Fraser (smfr)
<simon.fraser at apple.com>'s request for review:
Bug 224266: Wasted vector capacity under CSSFontFace::setUnicodeRange()
https://bugs.webkit.org/show_bug.cgi?id=224266

Attachment 425352: Patch

https://bugs.webkit.org/attachment.cgi?id=425352&action=review




--- Comment #2 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 425352
  --> https://bugs.webkit.org/attachment.cgi?id=425352
Patch

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

r=me

> Source/WebCore/css/CSSFontFace.cpp:274
>      auto& list = downcast<CSSValueList>(unicodeRange);

What about using `map` instead?
```
auto ranges = WTF::map(downcast<CSSValueList>(unicodeRange), [] (auto&
rangeValue) -> UnicodeRange {
    return { range.from(), range.to() };
});
```


More information about the webkit-reviews mailing list