<?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>188729</bug_id>
          
          <creation_ts>2018-08-18 17:12:06 -0700</creation_ts>
          <short_desc>svg/custom/glyph-selection-bidi-mirror.svg and other SVG tests abandon their document because of references via SVGFontFaceElement</short_desc>
          <delta_ts>2020-06-29 16:42:46 -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>SVG</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>Lawrence.j</cc>
    
    <cc>rackler</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bot-watchers-bugzilla</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1451434</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-08-18 17:12:06 -0700</bug_when>
    <thetext>svg/custom/glyph-selection-bidi-mirror.svg and other SVG tests abandon their document (bug 186214). Ref stacks on the C++ side seem reasonable, so this looks like an issue on the GC side.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1451962</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-08-20 21:30:55 -0700</bug_when>
    <thetext>svg/wicd/test-rightsizing-b.xhtml abandons 4 instances of svg/wicd/resources/test-svg-child-object-rightsizing.svg. They are retained through a referencing element, the &lt;font-face&gt; element:

&lt;font-face font-family=&quot;Sera Sans&quot;
    units-per-em=&quot;2048&quot;
    panose-1=&quot;2 11 6 3 3 8 4 2 2 4&quot;
    ascent=&quot;1901&quot;
    descent=&quot;-483&quot;
    alphabetic=&quot;0&quot; /&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1451964</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-08-20 21:31:05 -0700</bug_when>
    <thetext>*** Bug 188776 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1455150</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-08-29 21:15:41 -0700</bug_when>
    <thetext>I think these tests all suffer in the same way:

svg/W3C-SVG-1.1-SE/color-prop-05-t.svg
svg/W3C-SVG-1.1-SE/painting-control-04-f.svg
svg/W3C-SVG-1.1/animate-elem-03-t.svg
svg/W3C-SVG-1.1/animate-elem-24-t.svg
svg/W3C-SVG-1.1/animate-elem-36-t.svg
svg/W3C-SVG-1.1/animate-elem-40-t.svg
svg/W3C-SVG-1.1/fonts-desc-02-t.svg
svg/W3C-SVG-1.1/fonts-elem-01-t.svg
svg/W3C-SVG-1.1/fonts-elem-02-t.svg
svg/W3C-SVG-1.1/fonts-elem-04-b.svg
svg/W3C-SVG-1.1/fonts-elem-05-t.svg
svg/W3C-SVG-1.1/fonts-elem-06-t.svg
svg/W3C-SVG-1.1/fonts-glyph-02-t.svg
svg/W3C-SVG-1.1/fonts-glyph-03-t.svg
svg/W3C-SVG-1.1/fonts-kern-01-t.svg
svg/W3C-SVG-1.1/masking-mask-01-b.svg
svg/W3C-SVG-1.1/pservers-grad-08-b.svg
svg/W3C-SVG-1.1/render-elems-06-t.svg
svg/W3C-SVG-1.1/render-elems-07-t.svg
svg/W3C-SVG-1.1/render-elems-08-t.svg
svg/W3C-SVG-1.1/render-groups-01-b.svg
svg/W3C-SVG-1.1/render-groups-03-t.svg
svg/W3C-SVG-1.1/text-align-08-b.svg
svg/W3C-SVG-1.1/text-altglyph-01-b.svg
svg/W3C-SVG-1.1/text-fonts-03-t.svg
svg/W3C-SVG-1.1/text-intro-01-t.svg
svg/W3C-SVG-1.1/text-intro-02-b.svg
svg/W3C-SVG-1.1/text-intro-03-b.svg
svg/W3C-SVG-1.1/text-intro-04-t.svg
svg/W3C-SVG-1.1/text-text-04-t.svg
svg/W3C-SVG-1.1/text-text-05-t.svg
svg/W3C-SVG-1.1/text-text-06-t.svg</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1455152</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-08-29 21:22:16 -0700</bug_when>
    <thetext>In MiniBrowser WK2, we correctly destroy the two SVGFontFaceElements and one CachedSVGFont that are created for svg/W3C-SVG-1.1-SE/color-prop-05-t.svg.

However, in WTR, we only destroy one of those SVGFontFaceElements and never the CachedSVGFont, which keeps a Document alive.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1455157</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-08-29 22:16:12 -0700</bug_when>
    <thetext>To fix this we need to clear font caches, something like:

diff --git a/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp b/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp
index 1a32c605f5f2b713b6430309e1dee833318311ee..4d22a40e70a19ed493fb8c9d7a2760d33af3f21d 100644
--- a/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp
+++ b/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp
@@ -45,6 +45,7 @@
 #include &quot;WebPageGroupProxy.h&quot;
 #include &lt;WebCore/DatabaseTracker.h&gt;
 #include &lt;WebCore/MemoryCache.h&gt;
+#include &lt;WebCore/MemoryRelease.h&gt;
 #include &lt;WebCore/PageCache.h&gt;
 #include &lt;WebCore/ResourceLoadObserver.h&gt;
 #include &lt;WebCore/ServiceWorkerThreadProxy.h&gt;
@@ -268,6 +269,7 @@ void WKBundleClearPageCache(WKBundleRef bundle)
 void WKBundleClearMemoryCache(WKBundleRef bundle)
 {
     MemoryCache::singleton().evictResources();
+    WebCore::releaseMemory(WTF::Critical::Yes, WTF::Synchronous::Yes); // Some redundant work here.
 }
 
 WKDataRef WKBundleCreateWKDataFromUInt8Array(WKBundleRef bundle, JSContextRef context, JSValueRef data)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1667321</commentid>
    <comment_count>8</comment_count>
    <who name="Karl Rackler">rackler</who>
    <bug_when>2020-06-29 15:42:03 -0700</bug_when>
    <thetext>svg/W3C-SVG-1.1/fonts-elem-01-t.svg and svg/W3C-SVG-1.1/fonts-elem-02-t.svg and svg/W3C-SVG-1.1/fonts-elem-03-b.svg and svg/W3C-SVG-1.1/fonts-elem-07-b.svg is no longer failing - remove expectations

Current history is green: https://results.webkit.org/?suite=layout-tests&amp;suite=layout-tests&amp;suite=layout-tests&amp;suite=layout-tests&amp;test=svg%2FW3C-SVG-1.1%2Ffonts-elem-01-t.svg&amp;test=svg%2FW3C-SVG-1.1%2Ffonts-elem-02-t.svg&amp;test=svg%2FW3C-SVG-1.1%2Ffonts-elem-03-b.svg&amp;test=svg%2FW3C-SVG-1.1%2Ffonts-elem-07-b.svg

These tests were isolated from the others in the group as ones that are unexpectedly passing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1667323</commentid>
    <comment_count>9</comment_count>
      <attachid>403126</attachid>
    <who name="Karl Rackler">rackler</who>
    <bug_when>2020-06-29 15:45:53 -0700</bug_when>
    <thetext>Created attachment 403126
Update TestExpectations</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1667324</commentid>
    <comment_count>10</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-06-29 15:47:14 -0700</bug_when>
    <thetext>&lt;rdar://problem/64911473&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1667341</commentid>
    <comment_count>11</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2020-06-29 16:31:51 -0700</bug_when>
    <thetext>Committed r263706: &lt;https://trac.webkit.org/changeset/263706&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 403126.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1667352</commentid>
    <comment_count>12</comment_count>
    <who name="Ryan Haddad">ryanhaddad</who>
    <bug_when>2020-06-29 16:42:07 -0700</bug_when>
    <thetext>Reopening since some of the tests are still failing.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>403126</attachid>
            <date>2020-06-29 15:45:53 -0700</date>
            <delta_ts>2020-06-29 16:42:46 -0700</delta_ts>
            <desc>Update TestExpectations</desc>
            <filename>bug-188729-20200629174551.patch</filename>
            <type>text/plain</type>
            <size>1826</size>
            <attacher name="Karl Rackler">rackler</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjYzNjk4CmRpZmYgLS1naXQgYS9MYXlvdXRUZXN0cy9DaGFu
Z2VMb2cgYi9MYXlvdXRUZXN0cy9DaGFuZ2VMb2cKaW5kZXggYmM1ZjU3ZTc4ODllYWJhNzhlMDNi
YmFmYTgxMTFhMjhlNzZkZmIyNS4uNmQ1YjU3N2MwMjQzYTM1YzQwNzI2YTEzMDUzMDFhYmNmZDFl
YmExNCAxMDA2NDQKLS0tIGEvTGF5b3V0VGVzdHMvQ2hhbmdlTG9nCisrKyBiL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