<?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>82815</bug_id>
          
          <creation_ts>2012-03-30 19:14:04 -0700</creation_ts>
          <short_desc>Several SVG tests asserting in FontCache::getCachedFontData()</short_desc>
          <delta_ts>2012-04-01 22:37:58 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>81002</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>krit</cc>
    
    <cc>mitz</cc>
    
    <cc>msaboff</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>thorton</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>592738</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2012-03-30 19:14:04 -0700</bug_when>
    <thetext>svg/custom/animate-disallowed-use-element.svg asserted here:

0   com.apple.WebCore             	0x0000000101d0fcf0 WebCore::FontCache::getCachedFontData(WebCore::FontPlatformData const*, WebCore::FontCache::ShouldRetain) + 160 (FontCache.cpp:280)
1   com.apple.WebCore             	0x0000000101d1fc71 WebCore::FontCache::getFontDataForCharacters(WebCore::Font const&amp;, unsigned short const*, int) + 1761 (FontCacheMac.mm:166)
2   com.apple.WebCore             	0x0000000101d2629d WebCore::Font::glyphDataAndPageForCharacter(int, bool, WebCore::FontDataVariant) const + 4445 (FontFastPath.cpp:201)
3   com.apple.WebCore             	0x0000000102a43939 WebCore::SVGTextRunRenderingContext::glyphDataForCharacter(WebCore::Font const&amp;, WebCore::TextRun const&amp;, WebCore::WidthIterator&amp;, int, bool, int, unsigned int&amp;) + 185 (SVGTextRunRenderingContext.cpp:181)
4   com.apple.WebCore             	0x0000000102ef19d6 WebCore::WidthIterator::glyphDataForCharacter(int, bool, int, unsigned int&amp;) + 246 (WidthIterator.cpp:77)
5   com.apple.WebCore             	0x0000000102ef1cf9 WebCore::WidthIterator::advance(int, WebCore::GlyphBuffer*) + 729 (WidthIterator.cpp:112)
6   com.apple.WebCore             	0x0000000102a44a81 WebCore::SVGTextMetricsBuilder::advanceSimpleText() + 81 (SVGTextMetricsBuilder.cpp:68)
7   com.apple.WebCore             	0x0000000102a4480c WebCore::SVGTextMetricsBuilder::advance() + 124 (SVGTextMetricsBuilder.cpp:60)
8   com.apple.WebCore             	0x0000000102a45047 WebCore::SVGTextMetricsBuilder::measureTextRenderer(WebCore::RenderSVGInlineText*, WebCore::MeasureTextData*) + 263 (SVGTextMetricsBuilder.cpp:159)
9   com.apple.WebCore             	0x0000000102a45478 WebCore::SVGTextMetricsBuilder::walkTree(WebCore::RenderObject*, WebCore::RenderSVGInlineText*, WebCore::MeasureTextData*) + 184 (SVGTextMetricsBuilder.cpp:204)
10  com.apple.WebCore             	0x0000000102a454c2 WebCore::SVGTextMetricsBuilder::walkTree(WebCore::RenderObject*, WebCore::RenderSVGInlineText*, WebCore::MeasureTextData*) + 258 (SVGTextMetricsBuilder.cpp:193)
11  com.apple.WebCore             	0x0000000102a3e2de WebCore::SVGTextMetricsBuilder::measureTextRenderer(WebCore::RenderSVGInlineText*) + 190 (SVGTextMetricsBuilder.cpp:227)
12  com.apple.WebCore             	0x0000000102a2b0af WebCore::SVGTextLayoutAttributesBuilder::rebuildMetricsForTextRenderer(WebCore::RenderSVGInlineText*) + 127 (SVGTextLayoutAttributesBuilder.cpp:67)
13  com.apple.WebCore             	0x0000000102a1444b WebCore::RenderSVGText::rebuildLayoutAttributes(WTF::Vector&lt;WebCore::SVGTextLayoutAttributes*, 0ul&gt;&amp;) + 347 (RenderSVGText.cpp:432)
14  com.apple.WebCore             	0x0000000102a141be WebCore::RenderSVGInlineText::willBeDestroyed() + 158 (RenderSVGInlineText.cpp:91)
15  com.apple.WebCore             	0x00000001029da62d WebCore::RenderObject::destroy() + 29 (RenderObject.cpp:2375)
16  com.apple.WebCore             	0x00000001029da51d WebCore::RenderObject::destroyAndCleanupAnonymousWrappers() + 93 (RenderObject.cpp:2352)

svg/dom/animated-tearoff-equality.xhtml asserted here:


0   com.apple.WebCore             	0x0000000101d0fcf0 WebCore::FontCache::getCachedFontData(WebCore::FontPlatformData const*, WebCore::FontCache::ShouldRetain) + 160 (FontCache.cpp:280)
1   com.apple.WebCore             	0x0000000101d1fc71 WebCore::FontCache::getFontDataForCharacters(WebCore::Font const&amp;, unsigned short const*, int) + 1761 (FontCacheMac.mm:166)
2   com.apple.WebCore             	0x0000000101d2629d WebCore::Font::glyphDataAndPageForCharacter(int, bool, WebCore::FontDataVariant) const + 4445 (FontFastPath.cpp:201)
3   com.apple.WebCore             	0x0000000102a43939 WebCore::SVGTextRunRenderingContext::glyphDataForCharacter(WebCore::Font const&amp;, WebCore::TextRun const&amp;, WebCore::WidthIterator&amp;, int, bool, int, unsigned int&amp;) + 185 (SVGTextRunRenderingContext.cpp:181)
4   com.apple.WebCore             	0x0000000102ef19d6 WebCore::WidthIterator::glyphDataForCharacter(int, bool, int, unsigned int&amp;) + 246 (WidthIterator.cpp:77)
5   com.apple.WebCore             	0x0000000102ef1cf9 WebCore::WidthIterator::advance(int, WebCore::GlyphBuffer*) + 729 (WidthIterator.cpp:112)
6   com.apple.WebCore             	0x0000000102a44a81 WebCore::SVGTextMetricsBuilder::advanceSimpleText() + 81 (SVGTextMetricsBuilder.cpp:68)
7   com.apple.WebCore             	0x0000000102a4480c WebCore::SVGTextMetricsBuilder::advance() + 124 (SVGTextMetricsBuilder.cpp:60)
8   com.apple.WebCore             	0x0000000102a45047 WebCore::SVGTextMetricsBuilder::measureTextRenderer(WebCore::RenderSVGInlineText*, WebCore::MeasureTextData*) + 263 (SVGTextMetricsBuilder.cpp:159)
9   com.apple.WebCore             	0x0000000102a45478 WebCore::SVGTextMetricsBuilder::walkTree(WebCore::RenderObject*, WebCore::RenderSVGInlineText*, WebCore::MeasureTextData*) + 184 (SVGTextMetricsBuilder.cpp:204)
10  com.apple.WebCore             	0x0000000102a454c2 WebCore::SVGTextMetricsBuilder::walkTree(WebCore::RenderObject*, WebCore::RenderSVGInlineText*, WebCore::MeasureTextData*) + 258 (SVGTextMetricsBuilder.cpp:193)
11  com.apple.WebCore             	0x0000000102a3e2de WebCore::SVGTextMetricsBuilder::measureTextRenderer(WebCore::RenderSVGInlineText*) + 190 (SVGTextMetricsBuilder.cpp:227)
12  com.apple.WebCore             	0x0000000102a2b0af WebCore::SVGTextLayoutAttributesBuilder::rebuildMetricsForTextRenderer(WebCore::RenderSVGInlineText*) + 127 (SVGTextLayoutAttributesBuilder.cpp:67)
13  com.apple.WebCore             	0x0000000102a1444b WebCore::RenderSVGText::rebuildLayoutAttributes(WTF::Vector&lt;WebCore::SVGTextLayoutAttributes*, 0ul&gt;&amp;) + 347 (RenderSVGText.cpp:432)
14  com.apple.WebCore             	0x0000000102a141be WebCore::RenderSVGInlineText::willBeDestroyed() + 158 (RenderSVGInlineText.cpp:91)
15  com.apple.WebCore             	0x00000001029da62d WebCore::RenderObject::destroy() + 29 (RenderObject.cpp:2375)
16  com.apple.WebCore             	0x00000001029da51d WebCore::RenderObject::destroyAndCleanupAnonymousWrappers() + 93 (RenderObject.cpp:2352)
17  com.apple.WebCore             	0x0000000102797a34 WebCore::Node::detach() + 68 (Node.cpp:1350)
18  com.apple.WebCore             	0x00000001018401c7 WebCore::ContainerNode::detachChildren() + 55 (ContainerNode.h:198)
19  com.apple.WebCore             	0x000000010183d5e9 WebCore::ContainerNode::detach() + 25 (ContainerNode.cpp:695)
20  com.apple.WebCore             	0x0000000101c86da2 WebCore::Element::detach() + 130 (Element.cpp:991)
21  com.apple.WebCore             	0x00000001018401c7 WebCore::ContainerNode::detachChildren() + 55 (ContainerNode.h:198)
22  com.apple.WebCore             	0x000000010183d5e9 WebCore::ContainerNode::detach() + 25 (ContainerNode.cpp:695)
23  com.apple.WebCore             	0x0000000101c86da2 WebCore::Element::detach() + 130 (Element.cpp:991)
24  com.apple.WebCore             	0x00000001018401c7 WebCore::ContainerNode::detachChildren() + 55 (ContainerNode.h:198)
25  com.apple.WebCore             	0x000000010183d5e9 WebCore::ContainerNode::detach() + 25 (ContainerNode.cpp:695)
26  com.apple.WebCore             	0x0000000101c86da2 WebCore::Element::detach() + 130 (Element.cpp:991)
27  com.apple.WebCore             	0x00000001018401c7 WebCore::ContainerNode::detachChildren() + 55 (ContainerNode.h:198)
28  com.apple.WebCore             	0x000000010183d5e9 WebCore::ContainerNode::detach() + 25 (ContainerNode.cpp:695)
29  com.apple.WebCore             	0x0000000101c86da2 WebCore::Element::detach() + 130 (Element.cpp:991)
30  com.apple.WebCore             	0x00000001018401c7 WebCore::ContainerNode::detachChildren() + 55 (ContainerNode.h:198)
31  com.apple.WebCore             	0x000000010183d5e9 WebCore::ContainerNode::detach() + 25 (ContainerNode.cpp:695)
32  com.apple.WebCore             	0x0000000101c86da2 WebCore::Element::detach() + 130 (Element.cpp:991)
33  com.apple.WebCore             	0x00000001018401c7 WebCore::ContainerNode::detachChildren() + 55 (ContainerNode.h:198)
34  com.apple.WebCore             	0x000000010183d5e9 WebCore::ContainerNode::detach() + 25 (ContainerNode.cpp:695)
35  com.apple.WebCore             	0x0000000101a8c66c WebCore::Document::detach() + 652 (Document.cpp:1971)
36  com.apple.WebCore             	0x0000000101d49352 WebCore::Frame::setView(WTF::PassRefPtr&lt;WebCore::FrameView&gt;) + 242 (Frame.cpp:273)
...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>592739</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2012-03-30 19:18:25 -0700</bug_when>
    <thetext>We need a FontCachePurgePreventer somewhere in the SVG code I guess.

But why are we doing work in RenderSVGInlineText::willBeDestroyed() ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>593024</commentid>
    <comment_count>2</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2012-04-01 05:47:03 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; We need a FontCachePurgePreventer somewhere in the SVG code I guess.
&gt; 
&gt; But why are we doing work in RenderSVGInlineText::willBeDestroyed() ?

When eg. a &lt;tspan&gt;foo&lt;/tspan&gt; gets dynamically removed from a &lt;text&gt; tree, we have to rebuild all layout attributes of the remaining text. In general this shouldn&apos;t happen if the whole document tears down. That&apos;s probably buggy.
(Maybe we can find an approach, which only marks the remaining tree for &apos;need to remeasure&apos; instead of doing it from willBeDestroyed).

Marking as duplicate of bug 81002, which covers this already.

*** This bug has been marked as a duplicate of bug 81002 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>593180</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2012-04-01 22:37:58 -0700</bug_when>
    <thetext>I think there&apos;s a documentBeingDestroyed that you could consult.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>