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
309642
SVGTransformList::concatenate() should returns std::optional<AffineTransform> if m_items.isEmpty()
https://bugs.webkit.org/show_bug.cgi?id=309642
Summary
SVGTransformList::concatenate() should returns std::optional<AffineTransform>...
Karl Dubost
Reported
2026-03-10 20:44:18 PDT
See the discussion in
https://github.com/WebKit/WebKit/pull/58833#discussion_r2915281112
> Also I think concatenate() should not return an identity if m_items.isEmpty(). See SVGTransformList::consolidate(). It returns nullptr if m_items.isEmpty(). So I think concatenate() and consolidate() should behave consistently when the list is empty. > > I think SVGTransformList::concatenate() should returns std::optional<AffineTransform> if m_items.isEmpty(). The callers can opt either to drop the value like in this function. Or to use concatenate().value_or(identity) > If you decide to return std::optional<AffineTransform>, I think this should be in a separate PR and should be merged before this one.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2026-03-10 23:10:25 PDT
<
rdar://problem/172252666
>
Karl Dubost
Comment 2
2026-03-11 16:15:06 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/60405
EWS
Comment 3
2026-03-25 17:56:18 PDT
Committed
309953@main
(59258d66c145): <
https://commits.webkit.org/309953@main
> Reviewed commits have been landed. Closing PR #60405 and removing active labels.
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