Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 68aaf59bb3f550847e079a16cedf94564babf80a
      
https://github.com/WebKit/WebKit/commit/68aaf59bb3f550847e079a16cedf94564babf80a
  Author: Chris Dumez <[email protected]>
  Date:   2026-01-27 (Tue, 27 Jan 2026)

  Changed paths:
    M Source/WebCore/SaferCPPExpectations/MemoryUnsafeCastCheckerExpectations
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/svg/SVGCircleElement.cpp
    M Source/WebCore/svg/SVGCircleElement.h
    M Source/WebCore/svg/SVGElement.cpp
    M Source/WebCore/svg/SVGElement.h
    M Source/WebCore/svg/SVGRectElement.cpp
    M Source/WebCore/svg/SVGRectElement.h
    M Source/WebCore/svg/properties/SVGAnimatedDecoratedProperty.h
    M Source/WebCore/svg/properties/SVGAnimatedPrimitiveProperty.h
    R Source/WebCore/svg/properties/SVGAnimatedProperty.cpp
    M Source/WebCore/svg/properties/SVGAnimatedProperty.h
    M Source/WebCore/svg/properties/SVGAnimatedPropertyAccessor.h
    A Source/WebCore/svg/properties/SVGAnimatedPropertyBase.cpp
    A Source/WebCore/svg/properties/SVGAnimatedPropertyBase.h
    M Source/WebCore/svg/properties/SVGAnimatedPropertyList.h
    M Source/WebCore/svg/properties/SVGAnimatedPropertyPairAccessor.h
    M Source/WebCore/svg/properties/SVGAnimatedPropertyPairAccessorImpl.h
    M Source/WebCore/svg/properties/SVGAnimatedValueProperty.h
    M Source/WebCore/svg/properties/SVGMemberAccessor.h
    M Source/WebCore/svg/properties/SVGPropertyOwnerRegistry.h
    M Source/WebCore/svg/properties/SVGPropertyRegistry.h

  Log Message:
  -----------
  Address unsafe cast warnings under WebCore/svg/properties
https://bugs.webkit.org/show_bug.cgi?id=306240

Reviewed by Darin Adler.

Address unsafe cast warnings under WebCore/svg/properties by making
SVGAnimatedProperty templated to keep track of concrete types being
used. With this approach, no casting is needed at all.

* Source/WebCore/SaferCPPExpectations/MemoryUnsafeCastCheckerExpectations:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::propertyForAttribute const):
* Source/WebCore/svg/SVGCircleElement.h:
* Source/WebCore/svg/SVGElement.cpp:
(WebCore::SVGElement::commitPropertyChange):
* Source/WebCore/svg/SVGElement.h:
* Source/WebCore/svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::propertyForAttribute const):
* Source/WebCore/svg/SVGRectElement.h:
* Source/WebCore/svg/properties/SVGAnimatedDecoratedProperty.h:
(WebCore::SVGAnimatedDecoratedProperty::SVGAnimatedDecoratedProperty):
(WebCore::SVGAnimatedDecoratedProperty::setBaseVal):
(WebCore::SVGAnimatedDecoratedProperty::setAnimVal):
(WebCore::SVGAnimatedDecoratedProperty::animVal const):
(WebCore::SVGAnimatedDecoratedProperty::currentValue const):
* Source/WebCore/svg/properties/SVGAnimatedPrimitiveProperty.h:
(WebCore::SVGAnimatedPrimitiveProperty::setBaseVal):
(WebCore::SVGAnimatedPrimitiveProperty::setAnimVal):
(WebCore::SVGAnimatedPrimitiveProperty::animVal const):
(WebCore::SVGAnimatedPrimitiveProperty::animVal):
(WebCore::SVGAnimatedPrimitiveProperty::currentValue const):
(WebCore::SVGAnimatedPrimitiveProperty::SVGAnimatedPrimitiveProperty):
* Source/WebCore/svg/properties/SVGAnimatedProperty.h:
(WebCore::SVGAnimatedProperty::instanceStartAnimation):
(WebCore::SVGAnimatedProperty::instanceStopAnimation):
(WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
(WebCore::SVGAnimatedProperty::isAttached const): Deleted.
(WebCore::SVGAnimatedProperty::detach): Deleted.
(WebCore::SVGAnimatedProperty::baseValAsString const): Deleted.
(WebCore::SVGAnimatedProperty::animValAsString const): Deleted.
(WebCore::SVGAnimatedProperty::isDirty const): Deleted.
(WebCore::SVGAnimatedProperty::setDirty): Deleted.
(WebCore::SVGAnimatedProperty::synchronize): Deleted.
(WebCore::SVGAnimatedProperty::isAnimating const): Deleted.
(WebCore::SVGAnimatedProperty::startAnimation): Deleted.
(WebCore::SVGAnimatedProperty::stopAnimation): Deleted.
* Source/WebCore/svg/properties/SVGAnimatedPropertyAccessor.h:
* Source/WebCore/svg/properties/SVGAnimatedPropertyBase.cpp: Renamed from 
Source/WebCore/svg/properties/SVGAnimatedProperty.cpp.
(WebCore::SVGAnimatedPropertyBase::SVGAnimatedPropertyBase):
(WebCore::SVGAnimatedPropertyBase::contextElement const):
(WebCore::SVGAnimatedPropertyBase::owner const):
(WebCore::SVGAnimatedPropertyBase::commitPropertyChange):
* Source/WebCore/svg/properties/SVGAnimatedPropertyBase.h: Copied from 
Source/WebCore/svg/properties/SVGAnimatedProperty.h.
(WebCore::SVGAnimatedPropertyBase::isAttached const):
(WebCore::SVGAnimatedPropertyBase::detach):
(WebCore::SVGAnimatedPropertyBase::baseValAsString const):
(WebCore::SVGAnimatedPropertyBase::animValAsString const):
(WebCore::SVGAnimatedPropertyBase::isDirty const):
(WebCore::SVGAnimatedPropertyBase::setDirty):
(WebCore::SVGAnimatedPropertyBase::synchronize):
(WebCore::SVGAnimatedPropertyBase::isAnimating const):
(WebCore::SVGAnimatedPropertyBase::startAnimation):
(WebCore::SVGAnimatedPropertyBase::stopAnimation):
* Source/WebCore/svg/properties/SVGAnimatedPropertyList.h:
(WebCore::SVGAnimatedPropertyList::currentValue const):
(WebCore::SVGAnimatedPropertyList::SVGAnimatedPropertyList):
* Source/WebCore/svg/properties/SVGAnimatedPropertyPairAccessor.h:
* Source/WebCore/svg/properties/SVGAnimatedPropertyPairAccessorImpl.h:
* Source/WebCore/svg/properties/SVGAnimatedValueProperty.h:
(WebCore::SVGAnimatedValueProperty::setAnimVal):
(WebCore::SVGAnimatedValueProperty::currentValue const):
(WebCore::SVGAnimatedValueProperty::SVGAnimatedValueProperty):
* Source/WebCore/svg/properties/SVGMemberAccessor.h:
(WebCore::SVGMemberAccessor::matches const):
(WebCore::SVGMemberAccessor::setDirty const):
* Source/WebCore/svg/properties/SVGPropertyOwnerRegistry.h:
(WebCore::requires):
(WebCore::SVGPropertyOwnerRegistry::fastAnimatedPropertyLookup):
* Source/WebCore/svg/properties/SVGPropertyRegistry.h:

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



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

Reply via email to