<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>268488</bug_id>
          
          <creation_ts>2024-01-31 11:25:08 -0800</creation_ts>
          <short_desc>[LBSE] Fix pattern related assertion failure in debug builds</short_desc>
          <delta_ts>2024-02-01 15:10:31 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>SVG</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>90738</blocked>
    
    <blocked>265134</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Nikolas Zimmermann">zimmermann</reporter>
          <assigned_to name="Nikolas Zimmermann">zimmermann</assigned_to>
          <cc>rbuis</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2009426</commentid>
    <comment_count>0</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2024-01-31 11:25:08 -0800</bug_when>
    <thetext>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 &amp;, bool)
1   0x13a00006c WTFCrash
2   0x2844d4f70 WebCore::NetworkResourcesData::ResourceData::hasContent() const
3   0x2859d0d34 WebCore::SVGHitTestCycleDetectionScope::SVGHitTestCycleDetectionScope(WebCore::RenderElement const&amp;, bool)
4   0x2859d0de0 WebCore::SVGHitTestCycleDetectionScope::SVGHitTestCycleDetectionScope(WebCore::RenderElement const&amp;, bool)
5   0x285731ffc WebCore::RenderLayer::paintSVGResourceLayer(WebCore::GraphicsContext&amp;, WebCore::AffineTransform const&amp;)
6   0x2859ace44 WebCore::RenderSVGResourcePattern::createTileImage(WebCore::PatternAttributes const&amp;, WebCore::FloatRect const&amp;, WebCore::FloatRect const&amp;, WebCore::AffineTransform const&amp;) const
7   0x2859ac6d8 WebCore::RenderSVGResourcePattern::buildPattern(WebCore::GraphicsContext&amp;, WebCore::RenderLayerModelObject const&amp;)
8   0x2859aced8 WebCore::RenderSVGResourcePattern::prepareFillOperation(WebCore::GraphicsContext&amp;, WebCore::RenderLayerModelObject const&amp;, WebCore::RenderStyle const&amp;)
9   0x2859b1e2c bool WebCore::SVGPaintServerHandling::preparePaintOperation&lt;(WebCore::SVGPaintServerHandling::Operation)0&gt;(WebCore::RenderLayerModelObject const&amp;, WebCore::RenderStyle const&amp;) const
10  0x2859b1d2c WebCore::RenderSVGShape::fillShape(WebCore::RenderStyle const&amp;, WebCore::GraphicsContext&amp;)
11  0x2859b2314 WebCore::RenderSVGShape::fillStrokeMarkers(WebCore::PaintInfo&amp;)
12  0x2859b2688 WebCore::RenderSVGShape::paint(WebCore::PaintInfo&amp;, WebCore::LayoutPoint const&amp;)
13  0x28573ab50 WebCore::RenderLayer::paintForegroundForFragmentsWithPhase(WebCore::PaintPhase, WTF::Vector&lt;WebCore::LayerFragment, 1ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt; const&amp;, WebCore::GraphicsContext&amp;, WebCore::RenderLayer::LayerPaintingInfo const&amp;, WTF::OptionSet&lt;WebCore::PaintBehavior&gt;, WebCore::RenderObject*)
14  0x285738758 WebCore::RenderLayer::paintForegroundForFragments(WTF::Vector&lt;WebCore::LayerFragment, 1ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt; const&amp;, WebCore::GraphicsContext&amp;, WebCore::GraphicsContext&amp;, WebCore::LayoutRect const&amp;, bool, WebCore::RenderLayer::LayerPaintingInfo const&amp;, WTF::OptionSet&lt;WebCore::PaintBehavior&gt;, WebCore::RenderObject*)
15  0x2857346a0 WebCore::RenderLayer::paintLayerContents(WebCore::GraphicsContext&amp;, WebCore::RenderLayer::LayerPaintingInfo const&amp;, WTF::OptionSet&lt;WebCore::RenderLayer::PaintLayerFlag&gt;)
16  0x285733810 WebCore::RenderLayer::paintLayerContentsAndReflection(WebCore::GraphicsContext&amp;, WebCore::RenderLayer::LayerPaintingInfo const&amp;, WTF::OptionSet&lt;WebCore::RenderLayer::PaintLayerFlag&gt;)
17  0x285732758 WebCore::RenderLayer::paintLayerWithEffects(WebCore::GraphicsContext&amp;, WebCore::RenderLayer::LayerPaintingInfo const&amp;, WTF::OptionSet&lt;WebCore::RenderLayer::PaintLayerFlag&gt;)
18  0x2857317b4 WebCore::RenderLayer::paintLayer(WebCore::GraphicsContext&amp;, WebCore::RenderLayer::LayerPaintingInfo const&amp;, WTF::OptionSet&lt;WebCore::RenderLayer::PaintLayerFlag&gt;)
19  0x2857382fc WebCore::RenderLayer::paintList(WebCore::RenderLayer::LayerList, WebCore::GraphicsContext&amp;, WebCore::RenderLayer::LayerPaintingInfo const&amp;, WTF::OptionSet&lt;WebCore::RenderLayer::PaintLayerFlag&gt;)
20  0x2857347e4 WebCore::RenderLayer::paintLayerContents(WebCore::GraphicsContext&amp;, WebCore::RenderLayer::LayerPaintingInfo const&amp;, WTF::OptionSet&lt;WebCore::RenderLayer::PaintLayerFlag&gt;)
21  0x285733810 WebCore::RenderLayer::paintLayerContentsAndReflection(WebCore::GraphicsContext&amp;, WebCore::RenderLayer::LayerPaintingInfo const&amp;, WTF::OptionSet&lt;WebCore::RenderLayer::PaintLayerFlag&gt;)
22  0x285732758 WebCore::RenderLayer::paintLayerWithEffects(WebCore::GraphicsContext&amp;, WebCore::RenderLayer::LayerPaintingInfo const&amp;, WTF::OptionSet&lt;WebCore::RenderLayer::PaintLayerFlag&gt;)
23  0x2857317b4 WebCore::RenderLayer::paintLayer(WebCore::GraphicsContext&amp;, WebCore::RenderLayer::LayerPaintingInfo const&amp;, WTF::OptionSet&lt;WebCore::RenderLayer::PaintLayerFlag&gt;)
24  0x285732020 WebCore::RenderLayer::paintSVGResourceLayer(WebCore::GraphicsContext&amp;, WebCore::AffineTransform const&amp;)
25  0x2859ace44 WebCore::RenderSVGResourcePattern::createTileImage(WebCore::PatternAttributes const&amp;, WebCore::FloatRect const&amp;, WebCore::FloatRect const&amp;, WebCore::AffineTransform const&amp;) const
26  0x2859ac6d8 WebCore::RenderSVGResourcePattern::buildPattern(WebCore::GraphicsContext&amp;, WebCore::RenderLayerModelObject const&amp;)
27  0x2859aced8 WebCore::RenderSVGResourcePattern::prepareFillOperation(WebCore::GraphicsContext&amp;, WebCore::RenderLayerModelObject const&amp;, WebCore::RenderStyle const&amp;)
28  0x2859b1e2c bool WebCore::SVGPaintServerHandling::preparePaintOperation&lt;(WebCore::SVGPaintServerHandling::Operation)0&gt;(WebCore::RenderLayerModelObject const&amp;, WebCore::RenderStyle const&amp;) const
29  0x2859b1d2c WebCore::RenderSVGShape::fillShape(WebCore::RenderStyle const&amp;, WebCore::GraphicsContext&amp;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2009428</commentid>
    <comment_count>1</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2024-01-31 11:27:56 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/23605</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2009903</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-02-01 15:09:42 -0800</bug_when>
    <thetext>Committed 273944@main (b0b381fbd4be): &lt;https://commits.webkit.org/273944@main&gt;

Reviewed commits have been landed. Closing PR #23605 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2009905</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-02-01 15:10:31 -0800</bug_when>
    <thetext>&lt;rdar://problem/122135499&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>