Bug 309642
| Summary: | SVGTransformList::concatenate() should returns std::optional<AffineTransform> if m_items.isEmpty() | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Karl Dubost <karlcow> |
| Component: | SVG | Assignee: | Karl Dubost <karlcow> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | sabouhallawa, webkit-bug-importer, zimmermann |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 308017 | ||
Karl Dubost
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
<rdar://problem/172252666>
Karl Dubost
Pull request: https://github.com/WebKit/WebKit/pull/60405
EWS
Committed 309953@main (59258d66c145): <https://commits.webkit.org/309953@main>
Reviewed commits have been landed. Closing PR #60405 and removing active labels.