WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
224266
Wasted vector capacity under CSSFontFace::setUnicodeRange()
https://bugs.webkit.org/show_bug.cgi?id=224266
Summary
Wasted vector capacity under CSSFontFace::setUnicodeRange()
Simon Fraser (smfr)
Reported
2021-04-06 21:10:35 PDT
Wasted vector capacity under CSSFontFace::setUnicodeRange()
Attachments
Patch
(1.56 KB, patch)
2021-04-06 21:11 PDT
,
Simon Fraser (smfr)
hi
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2021-04-06 21:11:06 PDT
Created
attachment 425352
[details]
Patch
Devin Rousso
Comment 2
2021-04-07 09:54:30 PDT
Comment on
attachment 425352
[details]
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() }; }); ```
Simon Fraser (smfr)
Comment 3
2021-04-07 15:33:58 PDT
(In reply to Devin Rousso from
comment #2
)
> Comment on
attachment 425352
[details]
> 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() }; > }); > ```
CSSValueList doesn't quite allow map() to work.
Simon Fraser (smfr)
Comment 4
2021-04-07 15:47:36 PDT
https://trac.webkit.org/changeset/275638/webkit
Radar WebKit Bug Importer
Comment 5
2021-04-07 15:48:33 PDT
<
rdar://problem/76369477
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug