Bug 268488 - [LBSE] Fix pattern related assertion failure in debug builds
Summary: [LBSE] Fix pattern related assertion failure in debug builds
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nikolas Zimmermann
URL:
Keywords: InRadar
Depends on:
Blocks: 90738 265134
  Show dependency treegraph
 
Reported: 2024-01-31 11:25 PST by Nikolas Zimmermann
Modified: 2024-02-01 15:10 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolas Zimmermann 2024-01-31 11:25:08 PST
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&)
Comment 1 Nikolas Zimmermann 2024-01-31 11:27:56 PST
Pull request: https://github.com/WebKit/WebKit/pull/23605
Comment 2 EWS 2024-02-01 15:09:42 PST
Committed 273944@main (b0b381fbd4be): <https://commits.webkit.org/273944@main>

Reviewed commits have been landed. Closing PR #23605 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2024-02-01 15:10:31 PST
<rdar://problem/122135499>