<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[201561] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/201561">201561</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-06-01 11:50:09 -0700 (Wed, 01 Jun 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>SVGImage should report its memory cost to JS garbage collector
https://bugs.webkit.org/show_bug.cgi?id=158139

Patch by Said Abou-Hallawa &lt;sabouhallawa@apple.com&gt; on 2016-06-01
Reviewed by Geoffrey Garen.

Like what we do in HTMLImageLoader::notifyFinished() by reporting the memory
cost of the BitmapImage, we need to do something similar for the SVGImage. In
SVGImage::dataChange() and when allDataReceived is true, we can calculate
the size of all DOM nodes and their renderers. The size of the encoded data
has to be added as well to the total memory cost. An approximation for the
memory cost has to be used since it is costly to get an accurate number.

* bindings/js/JSDocumentCustom.cpp:
(WebCore::reportMemoryForDocumentIfFrameless): Use Node::approximateMemoryCost()
instead of sizeof(Node). A Node's descendant can override this function and
return a more accurate memory cost.

* dom/Node.h:
(WebCore::Node::approximateMemoryCost): Define this new virtual function in the
Node class. Its default value is sizeof(Node) but any descendant can return a
more accurate number.

* platform/graphics/Image.h:
(WebCore::Image::data): Define a const version of data() so it can be called
the const function SVGImage::reportApproximateMemoryCost().

* svg/SVGGraphicsElement.h: Override approximateMemoryCost() to return
sizeof(SVGGraphicsElement).

* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::approximateMemoryCost): Override this function to return
the memory cost of the points and the m_path of the renderer.
* svg/SVGPathElement.h:

* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::approximateMemoryCost): Override this function to return
the memory cost of the points and the m_path of the renderer.
* svg/SVGPolyElement.h:

* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::reportApproximateMemoryCost): Calculate the memory cost of the
nodes in the SVGDocument of an SVGImage. Then report this number to the JS garbage
collector.

(WebCore::SVGImage::dataChanged): After loading all the SVG encoded data and building
its DOM tree and the render tree, report the total memory cost to the JS garbage collector.
* svg/graphics/SVGImage.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDocumentCustomcpp">trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodeh">trunk/Source/WebCore/dom/Node.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsImageh">trunk/Source/WebCore/platform/graphics/Image.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGGraphicsElementh">trunk/Source/WebCore/svg/SVGGraphicsElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGPathElementcpp">trunk/Source/WebCore/svg/SVGPathElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGPathElementh">trunk/Source/WebCore/svg/SVGPathElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGPolyElementcpp">trunk/Source/WebCore/svg/SVGPolyElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGPolyElementh">trunk/Source/WebCore/svg/SVGPolyElement.h</a></li>
<li><a href="#trunkSourceWebCoresvggraphicsSVGImagecpp">trunk/Source/WebCore/svg/graphics/SVGImage.cpp</a></li>
<li><a href="#trunkSourceWebCoresvggraphicsSVGImageh">trunk/Source/WebCore/svg/graphics/SVGImage.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (201560 => 201561)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-06-01 18:17:06 UTC (rev 201560)
+++ trunk/Source/WebCore/ChangeLog        2016-06-01 18:50:09 UTC (rev 201561)
</span><span class="lines">@@ -1,3 +1,53 @@
</span><ins>+2016-06-01  Said Abou-Hallawa  &lt;sabouhallawa@apple.com&gt;
+
+        SVGImage should report its memory cost to JS garbage collector
+        https://bugs.webkit.org/show_bug.cgi?id=158139
+
+        Reviewed by Geoffrey Garen.
+
+        Like what we do in HTMLImageLoader::notifyFinished() by reporting the memory
+        cost of the BitmapImage, we need to do something similar for the SVGImage. In
+        SVGImage::dataChange() and when allDataReceived is true, we can calculate
+        the size of all DOM nodes and their renderers. The size of the encoded data
+        has to be added as well to the total memory cost. An approximation for the
+        memory cost has to be used since it is costly to get an accurate number.
+
+        * bindings/js/JSDocumentCustom.cpp: 
+        (WebCore::reportMemoryForDocumentIfFrameless): Use Node::approximateMemoryCost()
+        instead of sizeof(Node). A Node's descendant can override this function and
+        return a more accurate memory cost.
+        
+        * dom/Node.h:
+        (WebCore::Node::approximateMemoryCost): Define this new virtual function in the
+        Node class. Its default value is sizeof(Node) but any descendant can return a
+        more accurate number.
+        
+        * platform/graphics/Image.h:
+        (WebCore::Image::data): Define a const version of data() so it can be called
+        the const function SVGImage::reportApproximateMemoryCost().
+        
+        * svg/SVGGraphicsElement.h: Override approximateMemoryCost() to return 
+        sizeof(SVGGraphicsElement).
+        
+        * svg/SVGPathElement.cpp:
+        (WebCore::SVGPathElement::approximateMemoryCost): Override this function to return
+        the memory cost of the points and the m_path of the renderer.
+        * svg/SVGPathElement.h:
+        
+        * svg/SVGPolyElement.cpp:
+        (WebCore::SVGPolyElement::approximateMemoryCost): Override this function to return
+        the memory cost of the points and the m_path of the renderer.
+        * svg/SVGPolyElement.h:
+        
+        * svg/graphics/SVGImage.cpp:
+        (WebCore::SVGImage::reportApproximateMemoryCost): Calculate the memory cost of the 
+        nodes in the SVGDocument of an SVGImage. Then report this number to the JS garbage 
+        collector.
+        
+        (WebCore::SVGImage::dataChanged): After loading all the SVG encoded data and building
+        its DOM tree and the render tree, report the total memory cost to the JS garbage collector.
+        * svg/graphics/SVGImage.h:
+
</ins><span class="cx"> 2016-06-01  Andreas Kling  &lt;akling@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Use inline capacity for StylePropertyShorthand Vectors.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDocumentCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp (201560 => 201561)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp        2016-06-01 18:17:06 UTC (rev 201560)
+++ trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp        2016-06-01 18:50:09 UTC (rev 201561)
</span><span class="lines">@@ -89,13 +89,13 @@
</span><span class="cx">     if (document.frame())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    size_t nodeCount = 0;
</del><ins>+    size_t memoryCost = 0;
</ins><span class="cx">     for (Node* node = &amp;document; node; node = NodeTraversal::next(*node))
</span><del>-        ++nodeCount;
</del><ins>+        memoryCost += node-&gt;approximateMemoryCost();
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: Adopt reportExtraMemoryVisited, and switch to reportExtraMemoryAllocated.
</span><span class="cx">     // https://bugs.webkit.org/show_bug.cgi?id=142595
</span><del>-    state.heap()-&gt;deprecatedReportExtraMemory(nodeCount * sizeof(Node));
</del><ins>+    state.heap()-&gt;deprecatedReportExtraMemory(memoryCost);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSValue toJSNewlyCreated(ExecState* state, JSDOMGlobalObject* globalObject, Ref&lt;Document&gt;&amp;&amp; document)
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.h (201560 => 201561)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.h        2016-06-01 18:17:06 UTC (rev 201560)
+++ trunk/Source/WebCore/dom/Node.h        2016-06-01 18:50:09 UTC (rev 201561)
</span><span class="lines">@@ -143,6 +143,7 @@
</span><span class="cx">     virtual String nodeValue() const;
</span><span class="cx">     virtual void setNodeValue(const String&amp;, ExceptionCode&amp;);
</span><span class="cx">     virtual NodeType nodeType() const = 0;
</span><ins>+    virtual size_t approximateMemoryCost() const { return sizeof(*this); }
</ins><span class="cx">     ContainerNode* parentNode() const;
</span><span class="cx">     static ptrdiff_t parentNodeMemoryOffset() { return OBJECT_OFFSETOF(Node, m_parentNode); }
</span><span class="cx">     Element* parentElement() const;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsImageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Image.h (201560 => 201561)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Image.h        2016-06-01 18:17:06 UTC (rev 201560)
+++ trunk/Source/WebCore/platform/graphics/Image.h        2016-06-01 18:50:09 UTC (rev 201561)
</span><span class="lines">@@ -122,6 +122,7 @@
</span><span class="cx">     virtual void destroyDecodedData(bool destroyAll = true) = 0;
</span><span class="cx"> 
</span><span class="cx">     SharedBuffer* data() { return m_encodedImageData.get(); }
</span><ins>+    const SharedBuffer* data() const { return m_encodedImageData.get(); }
</ins><span class="cx"> 
</span><span class="cx">     // Animation begins whenever someone draws the image, so startAnimation() is not normally called.
</span><span class="cx">     // It will automatically pause once all observers no longer want to render the image anywhere.
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGGraphicsElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGGraphicsElement.h (201560 => 201561)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGGraphicsElement.h        2016-06-01 18:17:06 UTC (rev 201560)
+++ trunk/Source/WebCore/svg/SVGGraphicsElement.h        2016-06-01 18:50:09 UTC (rev 201561)
</span><span class="lines">@@ -53,6 +53,8 @@
</span><span class="cx">     virtual void toClipPath(Path&amp;);
</span><span class="cx">     RenderPtr&lt;RenderElement&gt; createElementRenderer(RenderStyle&amp;&amp;, const RenderTreePosition&amp;) override;
</span><span class="cx"> 
</span><ins>+    size_t approximateMemoryCost() const override { return sizeof(*this); }
+
</ins><span class="cx"> protected:
</span><span class="cx">     SVGGraphicsElement(const QualifiedName&amp;, Document&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGPathElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGPathElement.cpp (201560 => 201561)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGPathElement.cpp        2016-06-01 18:17:06 UTC (rev 201560)
+++ trunk/Source/WebCore/svg/SVGPathElement.cpp        2016-06-01 18:50:09 UTC (rev 201561)
</span><span class="lines">@@ -363,6 +363,14 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+size_t SVGPathElement::approximateMemoryCost() const
+{
+    // This is an approximation for path memory cost since the path is parsed on demand.
+    size_t pathMemoryCost = (m_pathByteStream.size() / 10) * sizeof(FloatPoint);
+    // We need to account for the memory which is allocated by the RenderSVGPath::m_path.
+    return sizeof(*this) + (renderer() ? pathMemoryCost * 2 + sizeof(RenderSVGPath) : pathMemoryCost);
+}
+
</ins><span class="cx"> void SVGPathElement::pathSegListChanged(SVGPathSegRole role, ListModification listModification)
</span><span class="cx"> {
</span><span class="cx">     switch (role) {
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGPathElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGPathElement.h (201560 => 201561)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGPathElement.h        2016-06-01 18:17:06 UTC (rev 201560)
+++ trunk/Source/WebCore/svg/SVGPathElement.h        2016-06-01 18:50:09 UTC (rev 201561)
</span><span class="lines">@@ -101,6 +101,8 @@
</span><span class="cx"> 
</span><span class="cx">     void animatedPropertyWillBeDeleted();
</span><span class="cx"> 
</span><ins>+    size_t approximateMemoryCost() const override;
+
</ins><span class="cx"> private:
</span><span class="cx">     SVGPathElement(const QualifiedName&amp;, Document&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGPolyElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGPolyElement.cpp (201560 => 201561)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGPolyElement.cpp        2016-06-01 18:17:06 UTC (rev 201560)
+++ trunk/Source/WebCore/svg/SVGPolyElement.cpp        2016-06-01 18:50:09 UTC (rev 201561)
</span><span class="lines">@@ -130,4 +130,11 @@
</span><span class="cx">     return static_cast&lt;SVGListPropertyTearOff&lt;SVGPointList&gt;*&gt;(static_reference_cast&lt;SVGAnimatedPointList&gt;(lookupOrCreatePointsWrapper(this))-&gt;animVal().get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+size_t SVGPolyElement::approximateMemoryCost() const
+{
+    size_t pointsCost = pointList().size() * sizeof(FloatPoint);
+    // We need to account for the memory which is allocated by the RenderSVGPath::m_path.
+    return sizeof(*this) + (renderer() ? pointsCost * 2 + sizeof(RenderSVGPath) : pointsCost);
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgSVGPolyElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGPolyElement.h (201560 => 201561)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGPolyElement.h        2016-06-01 18:17:06 UTC (rev 201560)
+++ trunk/Source/WebCore/svg/SVGPolyElement.h        2016-06-01 18:50:09 UTC (rev 201561)
</span><span class="lines">@@ -38,6 +38,8 @@
</span><span class="cx"> 
</span><span class="cx">     static const SVGPropertyInfo* pointsPropertyInfo();
</span><span class="cx"> 
</span><ins>+    size_t approximateMemoryCost() const override;
+
</ins><span class="cx"> protected:
</span><span class="cx">     SVGPolyElement(const QualifiedName&amp;, Document&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvggraphicsSVGImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/graphics/SVGImage.cpp (201560 => 201561)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/graphics/SVGImage.cpp        2016-06-01 18:17:06 UTC (rev 201560)
+++ trunk/Source/WebCore/svg/graphics/SVGImage.cpp        2016-06-01 18:50:09 UTC (rev 201561)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include &quot;SVGImage.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;Chrome.h&quot;
</span><ins>+#include &quot;DOMWindow.h&quot;
</ins><span class="cx"> #include &quot;DocumentLoader.h&quot;
</span><span class="cx"> #include &quot;ElementIterator.h&quot;
</span><span class="cx"> #include &quot;FrameLoader.h&quot;
</span><span class="lines">@@ -36,6 +37,7 @@
</span><span class="cx"> #include &quot;ImageBuffer.h&quot;
</span><span class="cx"> #include &quot;ImageObserver.h&quot;
</span><span class="cx"> #include &quot;IntRect.h&quot;
</span><ins>+#include &quot;JSDOMWindowBase.h&quot;
</ins><span class="cx"> #include &quot;MainFrame.h&quot;
</span><span class="cx"> #include &quot;PageConfiguration.h&quot;
</span><span class="cx"> #include &quot;RenderSVGRoot.h&quot;
</span><span class="lines">@@ -48,6 +50,8 @@
</span><span class="cx"> #include &quot;SVGSVGElement.h&quot;
</span><span class="cx"> #include &quot;Settings.h&quot;
</span><span class="cx"> #include &quot;TextStream.h&quot;
</span><ins>+#include &lt;runtime/JSCInlines.h&gt;
+#include &lt;runtime/JSLock.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -353,6 +357,21 @@
</span><span class="cx">     stopAnimation();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void SVGImage::reportApproximateMemoryCost() const
+{
+    Document* document = m_page-&gt;mainFrame().document();
+    size_t decodedImageMemoryCost = 0;
+
+    for (Node* node = document; node; node = NodeTraversal::next(*node))
+        decodedImageMemoryCost += node-&gt;approximateMemoryCost();
+
+    JSC::VM&amp; vm = JSDOMWindowBase::commonVM();
+    JSC::JSLockHolder lock(vm);
+    // FIXME: Adopt reportExtraMemoryVisited, and switch to reportExtraMemoryAllocated.
+    // https://bugs.webkit.org/show_bug.cgi?id=142595
+    vm.heap.deprecatedReportExtraMemory(decodedImageMemoryCost + data()-&gt;size());
+}
+
</ins><span class="cx"> bool SVGImage::dataChanged(bool allDataReceived)
</span><span class="cx"> {
</span><span class="cx">     // Don't do anything if is an empty image.
</span><span class="lines">@@ -393,6 +412,7 @@
</span><span class="cx"> 
</span><span class="cx">         // Set the intrinsic size before a container size is available.
</span><span class="cx">         m_intrinsicSize = containerSize();
</span><ins>+        reportApproximateMemoryCost();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return m_page != nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCoresvggraphicsSVGImageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/graphics/SVGImage.h (201560 => 201561)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/graphics/SVGImage.h        2016-06-01 18:17:06 UTC (rev 201560)
+++ trunk/Source/WebCore/svg/graphics/SVGImage.h        2016-06-01 18:50:09 UTC (rev 201561)
</span><span class="lines">@@ -82,6 +82,7 @@
</span><span class="cx">     bool usesContainerSize() const override { return true; }
</span><span class="cx">     void computeIntrinsicDimensions(Length&amp; intrinsicWidth, Length&amp; intrinsicHeight, FloatSize&amp; intrinsicRatio) override;
</span><span class="cx"> 
</span><ins>+    void reportApproximateMemoryCost() const;
</ins><span class="cx">     bool dataChanged(bool allDataReceived) override;
</span><span class="cx"> 
</span><span class="cx">     // FIXME: SVGImages will be unable to prune because this function is not implemented yet.
</span></span></pre>
</div>
</div>

</body>
</html>