Bug 49866 - Assert hit in WebCore::invalidateResourcesOfChildren in SVGRenderSupport.cpp
Summary: Assert hit in WebCore::invalidateResourcesOfChildren in SVGRenderSupport.cpp
Status: RESOLVED DUPLICATE of bug 47682
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-20 09:33 PST by Rob Buis
Modified: 2010-11-20 09:53 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Buis 2010-11-20 09:33:28 PST
The following testcase triggers this assert:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<rect id="rect" x="0" y="100" width="50" height="50" fill="white" mask="url(#mask4)"/> 
<defs>
     <mask id="mask4">
    </mask>
</defs>
</svg>

Though this unusual SVG, I am pretty sure it is valid.
Cheers,

Rob.
Comment 1 Rob Buis 2010-11-20 09:39:16 PST

*** This bug has been marked as a duplicate of bug 47682 ***
Comment 2 Dirk Schulze 2010-11-20 09:42:57 PST
(In reply to comment #0)
> The following testcase triggers this assert:
> 
> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
> <rect id="rect" x="0" y="100" width="50" height="50" fill="white" mask="url(#mask4)"/> 
> <defs>
>      <mask id="mask4">
>     </mask>
> </defs>
> </svg>
> 
> Though this unusual SVG, I am pretty sure it is valid.
> Cheers,
> 
> Rob.

If I reference the rect after the <defs> section by a <use> element, the test works, but if it is before this section, it asserts as well. So it might be a problem that the parsing of the document did not finished and the resources are unknown. Note, this only happens for mask and filter, but not for clipper, gradient or pattern.
Comment 3 Nikolas Zimmermann 2010-11-20 09:46:04 PST
(In reply to comment #2)
> (In reply to comment #0)
> > The following testcase triggers this assert:
> > 
> > <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
> > <rect id="rect" x="0" y="100" width="50" height="50" fill="white" mask="url(#mask4)"/> 
> > <defs>
> >      <mask id="mask4">
> >     </mask>
> > </defs>
> > </svg>
> > 
> > Though this unusual SVG, I am pretty sure it is valid.
> > Cheers,
> > 
> > Rob.
> 
> If I reference the rect after the <defs> section by a <use> element, the test works, but if it is before this section, it asserts as well. So it might be a problem that the parsing of the document did not finished and the resources are unknown. Note, this only happens for mask and filter, but not for clipper, gradient or pattern.

<use> elements are way trickier to understand. The attach time is different, the <use> rendering subtree is built delayed, so the layout flow is completly different than using no <use> element.
Comment 4 Dirk Schulze 2010-11-20 09:48:23 PST
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #0)
> > > The following testcase triggers this assert:
> > > 
> > > <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
> > > <rect id="rect" x="0" y="100" width="50" height="50" fill="white" mask="url(#mask4)"/> 
> > > <defs>
> > >      <mask id="mask4">
> > >     </mask>
> > > </defs>
> > > </svg>
> > > 
> > > Though this unusual SVG, I am pretty sure it is valid.
> > > Cheers,
> > > 
> > > Rob.
> > 
> > If I reference the rect after the <defs> section by a <use> element, the test works, but if it is before this section, it asserts as well. So it might be a problem that the parsing of the document did not finished and the resources are unknown. Note, this only happens for mask and filter, but not for clipper, gradient or pattern.
> 
> <use> elements are way trickier to understand. The attach time is different, the <use> rendering subtree is built delayed, so the layout flow is completly different than using no <use> element.

Nevertheless, if you move the rect after the resource, it works.
Comment 5 Nikolas Zimmermann 2010-11-20 09:53:35 PST
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > (In reply to comment #0)
> > > > The following testcase triggers this assert:
> > > > 
> > > > <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
> > > > <rect id="rect" x="0" y="100" width="50" height="50" fill="white" mask="url(#mask4)"/> 
> > > > <defs>
> > > >      <mask id="mask4">
> > > >     </mask>
> > > > </defs>
> > > > </svg>
> > > > 
> > > > Though this unusual SVG, I am pretty sure it is valid.
> > > > Cheers,
> > > > 
> > > > Rob.
> > > 
> > > If I reference the rect after the <defs> section by a <use> element, the test works, but if it is before this section, it asserts as well. So it might be a problem that the parsing of the document did not finished and the resources are unknown. Note, this only happens for mask and filter, but not for clipper, gradient or pattern.
> > 
> > <use> elements are way trickier to understand. The attach time is different, the <use> rendering subtree is built delayed, so the layout flow is completly different than using no <use> element.
> 
> Nevertheless, if you move the rect after the resource, it works.
Sure, the order matters. I suspect we have a problem with the calls to RenderSVGResource:* in RenderSVGPath and other renderers.