Bug 243499

Summary: [LBSE] Add support for 'image' elements
Product: WebKit Reporter: Nikolas Zimmermann <zimmermann>
Component: SVGAssignee: Nikolas Zimmermann <zimmermann>
Status: RESOLVED FIXED    
Severity: Normal CC: mcatanzaro, rbuis, sabouhallawa, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 243493, 243497, 243498    
Bug Blocks: 90738    

Description Nikolas Zimmermann 2022-08-03 10:08:26 PDT
Add support for the last missing SVG element, that is not a resource (pattern / gradient / clipPath / masker / marker): <image>.
Comment 1 Radar WebKit Bug Importer 2022-08-10 10:09:16 PDT
<rdar://problem/98457550>
Comment 2 Nikolas Zimmermann 2022-08-22 04:51:58 PDT
Pull request: https://github.com/WebKit/WebKit/pull/3532
Comment 3 EWS 2022-08-25 14:13:22 PDT
Committed 253793@main (4b8776daaa57): <https://commits.webkit.org/253793@main>

Reviewed commits have been landed. Closing PR #3532 and removing active labels.
Comment 4 Michael Catanzaro 2022-08-31 11:47:35 PDT
Hi Nikolas, can you fix this warning please?

[1118/2033] Building CXX object Source/WebCore/CMakeFiles/...ivedSources/unified-sources/UnifiedSource-8feba646-9.cpp.o
In file included from /home/mcatanzaro/Projects/WebKit/WebKitBuild/gtk3/WebCore/DerivedSources/unified-sources/UnifiedSource-8feba646-9.cpp:2:
/home/mcatanzaro/Projects/WebKit/Source/WebCore/svg/SVGImageElement.cpp: In member function ‘virtual void WebCore::SVGImageElement::svgAttributeChanged(const WebCore::QualifiedName&)’:
/home/mcatanzaro/Projects/WebKit/Source/WebCore/svg/SVGImageElement.cpp:113:23: warning: unused variable ‘image’ [-Wunused-variable]
  113 |             if (auto* image = dynamicDowncast<RenderSVGImage>(renderer()))
      |                       ^~~~~

I'm not certain whether you want to do:

#if ENABLE(LAYER_BASED_SVG_ENGINE)
            if (dynamicDowncast<RenderSVGImage>(renderer()))
                updateSVGRendererForElementChange();
#endif

Or whether you want to do:

#if ENABLE(LAYER_BASED_SVG_ENGINE)
            updateSVGRendererForElementChange();
#endif

So I'll just leave it to you, OK?