Add check if referenced element is SVG for clip-path
Created attachment 458834 [details] Patch
Created attachment 458835 [details] Patch
Created attachment 458847 [details] Patch
Created attachment 458898 [details] Patch
Comment on attachment 458898 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=458898&action=review > Source/WebCore/rendering/PathOperation.cpp:51 > + if (!m_element) > + return nullptr; > return m_element.get(); This doesn't do anything. m_element.get() will already return null.
Created attachment 458901 [details] Patch
(In reply to Simon Fraser (smfr) from comment #5) > Comment on attachment 458898 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=458898&action=review > > > Source/WebCore/rendering/PathOperation.cpp:51 > > + if (!m_element) > > + return nullptr; > > return m_element.get(); > > This doesn't do anything. m_element.get() will already return null. Fixed.
Committed r293870 (250331@main): <https://commits.webkit.org/250331@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 458901 [details].
<rdar://problem/92828539>
Comment on attachment 458901 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=458901&action=review > Source/WebCore/style/StyleBuilderConverter.h:632 > + if (is<SVGElement>(target.element.get())) > + return ReferencePathOperation::create(cssURLValue, fragment, downcast<SVGElement>(target.element.get())); > + return ReferencePathOperation::create(cssURLValue, fragment, nullptr); This seems like a good usecase for dynamicDowncast: return ReferencePathOperation::create(cssURLValue, fragment, dynamicDowncast<SVGElement>(target.element.get())); It will be null if it's not a SVGElement.
Comment on attachment 458901 [details] Patch Sorry, accidentally obsoleted by putting the wrong bug number in commit message.