Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 59258d66c145b84b4feaf4c0c533b333dbefaf8a
      
https://github.com/WebKit/WebKit/commit/59258d66c145b84b4feaf4c0c533b333dbefaf8a
  Author: Karl Dubost <[email protected]>
  Date:   2026-03-25 (Wed, 25 Mar 2026)

  Changed paths:
    M Source/WebCore/rendering/RenderLayerModelObject.cpp
    M Source/WebCore/svg/SVGGraphicsElement.cpp
    M Source/WebCore/svg/SVGGraphicsElement.h
    M Source/WebCore/svg/SVGLinearGradientElement.cpp
    M Source/WebCore/svg/SVGPatternElement.cpp
    M Source/WebCore/svg/SVGRadialGradientElement.cpp
    M Source/WebCore/svg/SVGSVGElement.cpp
    M Source/WebCore/svg/SVGTransformList.cpp
    M Source/WebCore/svg/SVGTransformList.h

  Log Message:
  -----------
  SVGTransformList::concatenate() should returns std::optional<AffineTransform> 
if m_items.isEmpty()
https://bugs.webkit.org/show_bug.cgi?id=309642
rdar://172252666

Reviewed by Said Abou-Hallawa.

Change SVGTransformList::concatenate() to return
std::optional<AffineTransform>, returning std::nullopt when the list
is empty. This makes the empty case explicit and distinguishes "no
transform" from an "identity transform".

Call sites are updated with .value_or(AffineTransform()) to preserve
existing behaviour. The follow-up in https://github.com/WebKit/WebKit/pull/58833
will use the optional to simplify each call site properly.

* Source/WebCore/rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::applySVGTransform const):
* Source/WebCore/svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::animatedLocalTransform const):
* Source/WebCore/svg/SVGGraphicsElement.h:
(WebCore::SVGGraphicsElement::hasTransformRelatedAttributes const):
* Source/WebCore/svg/SVGLinearGradientElement.cpp:
(WebCore::setGradientAttributes):
* Source/WebCore/svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::collectPatternAttributes const):
(WebCore::SVGPatternElement::localCoordinateSpaceTransform const):
* Source/WebCore/svg/SVGRadialGradientElement.cpp:
(WebCore::setGradientAttributes):
* Source/WebCore/svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::viewBoxToViewTransform const):

Canonical link: https://commits.webkit.org/309953@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to