Fix incorrect cycle handling for pattern resources, not correctly taking chained resource (href/xlink:href reference) into account, leading to the following assertion in debug builds in svg/custom/recursive-pattern.svg and svg/custom/pattern-content-inheritance-cycle.svg. ASSERTION FAILED: result.isNewEntry /Users/nzimmermann/Software/GitRepositories/WebKit/Source/WebCore/rendering/svg/SVGRenderSupport.cpp(542) : WebCore::SVGHitTestCycleDetectionScope::SVGHitTestCycleDetectionScope(const WebCore::RenderElement &, bool) 1 0x13a00006c WTFCrash 2 0x2844d4f70 WebCore::NetworkResourcesData::ResourceData::hasContent() const 3 0x2859d0d34 WebCore::SVGHitTestCycleDetectionScope::SVGHitTestCycleDetectionScope(WebCore::RenderElement const&, bool) 4 0x2859d0de0 WebCore::SVGHitTestCycleDetectionScope::SVGHitTestCycleDetectionScope(WebCore::RenderElement const&, bool) 5 0x285731ffc WebCore::RenderLayer::paintSVGResourceLayer(WebCore::GraphicsContext&, WebCore::AffineTransform const&) 6 0x2859ace44 WebCore::RenderSVGResourcePattern::createTileImage(WebCore::PatternAttributes const&, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::AffineTransform const&) const 7 0x2859ac6d8 WebCore::RenderSVGResourcePattern::buildPattern(WebCore::GraphicsContext&, WebCore::RenderLayerModelObject const&) 8 0x2859aced8 WebCore::RenderSVGResourcePattern::prepareFillOperation(WebCore::GraphicsContext&, WebCore::RenderLayerModelObject const&, WebCore::RenderStyle const&) 9 0x2859b1e2c bool WebCore::SVGPaintServerHandling::preparePaintOperation<(WebCore::SVGPaintServerHandling::Operation)0>(WebCore::RenderLayerModelObject const&, WebCore::RenderStyle const&) const 10 0x2859b1d2c WebCore::RenderSVGShape::fillShape(WebCore::RenderStyle const&, WebCore::GraphicsContext&) 11 0x2859b2314 WebCore::RenderSVGShape::fillStrokeMarkers(WebCore::PaintInfo&) 12 0x2859b2688 WebCore::RenderSVGShape::paint(WebCore::PaintInfo&, WebCore::LayoutPoint const&) 13 0x28573ab50 WebCore::RenderLayer::paintForegroundForFragmentsWithPhase(WebCore::PaintPhase, WTF::Vector<WebCore::LayerFragment, 1ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc> const&, WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::PaintBehavior>, WebCore::RenderObject*) 14 0x285738758 WebCore::RenderLayer::paintForegroundForFragments(WTF::Vector<WebCore::LayerFragment, 1ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc> const&, WebCore::GraphicsContext&, WebCore::GraphicsContext&, WebCore::LayoutRect const&, bool, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::PaintBehavior>, WebCore::RenderObject*) 15 0x2857346a0 WebCore::RenderLayer::paintLayerContents(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>) 16 0x285733810 WebCore::RenderLayer::paintLayerContentsAndReflection(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>) 17 0x285732758 WebCore::RenderLayer::paintLayerWithEffects(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>) 18 0x2857317b4 WebCore::RenderLayer::paintLayer(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>) 19 0x2857382fc WebCore::RenderLayer::paintList(WebCore::RenderLayer::LayerList, WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>) 20 0x2857347e4 WebCore::RenderLayer::paintLayerContents(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>) 21 0x285733810 WebCore::RenderLayer::paintLayerContentsAndReflection(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>) 22 0x285732758 WebCore::RenderLayer::paintLayerWithEffects(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>) 23 0x2857317b4 WebCore::RenderLayer::paintLayer(WebCore::GraphicsContext&, WebCore::RenderLayer::LayerPaintingInfo const&, WTF::OptionSet<WebCore::RenderLayer::PaintLayerFlag>) 24 0x285732020 WebCore::RenderLayer::paintSVGResourceLayer(WebCore::GraphicsContext&, WebCore::AffineTransform const&) 25 0x2859ace44 WebCore::RenderSVGResourcePattern::createTileImage(WebCore::PatternAttributes const&, WebCore::FloatRect const&, WebCore::FloatRect const&, WebCore::AffineTransform const&) const 26 0x2859ac6d8 WebCore::RenderSVGResourcePattern::buildPattern(WebCore::GraphicsContext&, WebCore::RenderLayerModelObject const&) 27 0x2859aced8 WebCore::RenderSVGResourcePattern::prepareFillOperation(WebCore::GraphicsContext&, WebCore::RenderLayerModelObject const&, WebCore::RenderStyle const&) 28 0x2859b1e2c bool WebCore::SVGPaintServerHandling::preparePaintOperation<(WebCore::SVGPaintServerHandling::Operation)0>(WebCore::RenderLayerModelObject const&, WebCore::RenderStyle const&) const 29 0x2859b1d2c WebCore::RenderSVGShape::fillShape(WebCore::RenderStyle const&, WebCore::GraphicsContext&)
Pull request: https://github.com/WebKit/WebKit/pull/23605
Committed 273944@main (b0b381fbd4be): <https://commits.webkit.org/273944@main> Reviewed commits have been landed. Closing PR #23605 and removing active labels.
<rdar://problem/122135499>