RESOLVED FIXED298817
Fix static_assert() in WebCore::SVGPropertyOwnerRegistry::fastAnimatedPropertyLookup() with upstream clang
https://bugs.webkit.org/show_bug.cgi?id=298817
Summary Fix static_assert() in WebCore::SVGPropertyOwnerRegistry::fastAnimatedPropert...
David Kilzer (:ddkilzer)
Reported 2025-09-13 09:21:42 PDT
Fix static_assert() in WebCore::SVGPropertyOwnerRegistry::fastAnimatedPropertyLookup() with upstream clang. Upstream clang fails to build WebCore with the following error: ``` Source/WebCore/svg/properties/SVGPropertyOwnerRegistry.h:267:27: error: static assertion failed due to requirement '!std::is_same_v<WebCore::SVGRectElement, WebCore::SVGRectElement>': Element should use fast property path 267 | static_assert(!std::is_same_v<OwnerType, SVGRectElement> && !std::is_same_v<OwnerType, SVGCircleElement>, "Element should use fast property path"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Source/WebCore/svg/properties/SVGPropertyOwnerRegistry.h:243:30: note: in instantiation of member function 'WebCore::SVGPropertyOwnerRegistry<WebCore::SVGRectElement, WebCore::SVGGeometryElement>::fastAnimatedPropertyLookup' requested here 243 | if (auto* property = fastAnimatedPropertyLookup(m_owner, attributeName)) { | ^ ``` <rdar://157029024>
Attachments
David Kilzer (:ddkilzer)
Comment 1 2025-09-13 09:25:46 PDT
As I understand it, the issue is that the `propertyForAttribute()` method on `SVGRectElement` is declared `private`, but concept evaluation occurs during template instantiation, before `friend` relationships are considered. ``` template<typename T> concept HasFastPropertyForAttribute = requires(const T& element, const QualifiedName& name) { { element.propertyForAttribute(name) } -> std::same_as<SVGAnimatedProperty*>; }; ``` Note that the `SVGCircleElement` class has the same issue.
David Kilzer (:ddkilzer)
Comment 2 2025-09-13 09:29:18 PDT
EWS
Comment 3 2025-09-15 10:49:16 PDT
Committed 299969@main (4397d9f07bfd): <https://commits.webkit.org/299969@main> Reviewed commits have been landed. Closing PR #50705 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.