WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
273563
Avoid returning FontSizeAdjust as a copy
https://bugs.webkit.org/show_bug.cgi?id=273563
Summary
Avoid returning FontSizeAdjust as a copy
Brent Fulgham
Reported
2024-05-01 12:31:30 PDT
The changes in
https://commits.webkit.org/262309@main
changed the return value of FontDescription::fontSizeAdjust() from std::optional<float> to a new struct FontSizeAdjust, but continued to return it by copy. There is now a lot of code doing things like from.fontSizeAdjust().value that now generating temporary copies of objects that wrap the original std::optional plus include two additional enum types. This patch returns a const reference so that a copy can be avoided in cases where we just want to retrieve the `value` member of the FontSizeAdjust.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-05-01 12:31:54 PDT
<
rdar://problem/127378219
>
Brent Fulgham
Comment 2
2024-05-01 12:37:54 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/27996
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