<!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>[189701] releases/WebKitGTK/webkit-2.10/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/189701">189701</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2015-09-14 02:45:25 -0700 (Mon, 14 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/188839">r188839</a> - Remove SVGFrameLoaderClient and dataProtocolFrameLoader
https://bugs.webkit.org/show_bug.cgi?id=148370

Reviewed by Darin Adler.

With data protocol handled internally in WebKit these are no longer needed.

This mostly reverts code changes from http://trac.webkit.org/179626 keeping the tests.

* loader/FrameLoaderClient.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::loadDataURL):
(WebCore::ResourceLoader::setDataBufferingPolicy):
(WebCore::ResourceLoader::dataProtocolFrameLoader): Deleted.
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::documentLoader):
(WebCore::ResourceLoader::originalRequest):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::finishLoading):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):
* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageClients.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCoreloaderFrameLoaderClienth">releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/FrameLoaderClient.h</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCoreloaderResourceLoadercpp">releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/ResourceLoader.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCoreloaderResourceLoaderh">releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/ResourceLoader.h</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCoreloadercacheCachedImagecpp">releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/cache/CachedImage.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCoresvggraphicsSVGImagecpp">releases/WebKitGTK/webkit-2.10/Source/WebCore/svg/graphics/SVGImage.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCoresvggraphicsSVGImageh">releases/WebKitGTK/webkit-2.10/Source/WebCore/svg/graphics/SVGImage.h</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCoresvggraphicsSVGImageClientsh">releases/WebKitGTK/webkit-2.10/Source/WebCore/svg/graphics/SVGImageClients.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit210SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (189700 => 189701)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog        2015-09-14 09:40:26 UTC (rev 189700)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog        2015-09-14 09:45:25 UTC (rev 189701)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2015-08-23  Antti Koivisto  &lt;antti@apple.com&gt;
+
+        Remove SVGFrameLoaderClient and dataProtocolFrameLoader
+        https://bugs.webkit.org/show_bug.cgi?id=148370
+
+        Reviewed by Darin Adler.
+
+        With data protocol handled internally in WebKit these are no longer needed.
+
+        This mostly reverts code changes from http://trac.webkit.org/179626 keeping the tests.
+
+        * loader/FrameLoaderClient.h:
+        * loader/ResourceLoader.cpp:
+        (WebCore::ResourceLoader::loadDataURL):
+        (WebCore::ResourceLoader::setDataBufferingPolicy):
+        (WebCore::ResourceLoader::dataProtocolFrameLoader): Deleted.
+        * loader/ResourceLoader.h:
+        (WebCore::ResourceLoader::documentLoader):
+        (WebCore::ResourceLoader::originalRequest):
+        * loader/cache/CachedImage.cpp:
+        (WebCore::CachedImage::finishLoading):
+        * svg/graphics/SVGImage.cpp:
+        (WebCore::SVGImage::dataChanged):
+        * svg/graphics/SVGImage.h:
+        * svg/graphics/SVGImageClients.h:
+
</ins><span class="cx"> 2015-08-22  Andreas Kling  &lt;akling@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [JSC] Static hash tables should be 100% compile-time constant.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCoreloaderFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/FrameLoaderClient.h (189700 => 189701)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/FrameLoaderClient.h        2015-09-14 09:40:26 UTC (rev 189700)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/FrameLoaderClient.h        2015-09-14 09:45:25 UTC (rev 189701)
</span><span class="lines">@@ -339,8 +339,6 @@
</span><span class="cx">         // FIXME (bug 116233): We need to get rid of EmptyFrameLoaderClient completely, then this will no longer be needed.
</span><span class="cx">         virtual bool isEmptyFrameLoaderClient() { return false; }
</span><span class="cx"> 
</span><del>-        virtual FrameLoader* dataProtocolLoader() const { return nullptr; }
-
</del><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx">         virtual void didCreateQuickLookHandle(QuickLookHandle&amp;) { }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCoreloaderResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/ResourceLoader.cpp (189700 => 189701)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/ResourceLoader.cpp        2015-09-14 09:40:26 UTC (rev 189700)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/ResourceLoader.cpp        2015-09-14 09:45:25 UTC (rev 189701)
</span><span class="lines">@@ -262,15 +262,6 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// This function should only be called when frameLoader() is non-null.
-FrameLoader&amp; ResourceLoader::dataProtocolFrameLoader() const
-{
-    FrameLoader* loader = frameLoader();
-    ASSERT(loader);
-    FrameLoader* dataProtocolLoader = loader-&gt;client().dataProtocolLoader();
-    return *(dataProtocolLoader ? dataProtocolLoader : loader);
-}
-
</del><span class="cx"> void ResourceLoader::setDataBufferingPolicy(DataBufferingPolicy dataBufferingPolicy)
</span><span class="cx"> { 
</span><span class="cx">     m_options.setDataBufferingPolicy(dataBufferingPolicy); 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCoreloaderResourceLoaderh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/ResourceLoader.h (189700 => 189701)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/ResourceLoader.h        2015-09-14 09:40:26 UTC (rev 189700)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/ResourceLoader.h        2015-09-14 09:45:25 UTC (rev 189701)
</span><span class="lines">@@ -77,7 +77,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT FrameLoader* frameLoader() const;
</span><del>-    FrameLoader&amp; dataProtocolFrameLoader() const;
</del><span class="cx">     DocumentLoader* documentLoader() const { return m_documentLoader.get(); }
</span><span class="cx">     const ResourceRequest&amp; originalRequest() const { return m_originalRequest; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCoreloadercacheCachedImagecpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/cache/CachedImage.cpp (189700 => 189701)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/cache/CachedImage.cpp        2015-09-14 09:40:26 UTC (rev 189700)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/loader/cache/CachedImage.cpp        2015-09-14 09:45:25 UTC (rev 189701)
</span><span class="lines">@@ -419,11 +419,8 @@
</span><span class="cx">     if (!m_image &amp;&amp; data)
</span><span class="cx">         createImage();
</span><span class="cx"> 
</span><del>-    if (m_image) {
-        if (m_loader &amp;&amp; m_image-&gt;isSVGImage())
-            downcast&lt;SVGImage&gt;(*m_image).setDataProtocolLoader(&amp;m_loader-&gt;dataProtocolFrameLoader());
</del><ins>+    if (m_image)
</ins><span class="cx">         m_image-&gt;setData(data, true);
</span><del>-    }
</del><span class="cx"> 
</span><span class="cx">     if (!m_image || m_image-&gt;isNull()) {
</span><span class="cx">         // Image decoding failed; the image data is malformed.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCoresvggraphicsSVGImagecpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/svg/graphics/SVGImage.cpp (189700 => 189701)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/svg/graphics/SVGImage.cpp        2015-09-14 09:40:26 UTC (rev 189700)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/svg/graphics/SVGImage.cpp        2015-09-14 09:45:25 UTC (rev 189701)
</span><span class="lines">@@ -350,8 +350,6 @@
</span><span class="cx">         fillWithEmptyClients(pageConfiguration);
</span><span class="cx">         m_chromeClient = std::make_unique&lt;SVGImageChromeClient&gt;(this);
</span><span class="cx">         pageConfiguration.chromeClient = m_chromeClient.get();
</span><del>-        m_loaderClient = std::make_unique&lt;SVGFrameLoaderClient&gt;(m_dataProtocolLoader);
-        pageConfiguration.loaderClientForMainFrame = m_loaderClient.get();
</del><span class="cx"> 
</span><span class="cx">         // FIXME: If this SVG ends up loading itself, we might leak the world.
</span><span class="cx">         // The Cache code does not know about CachedImages holding Frames and
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCoresvggraphicsSVGImageh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/svg/graphics/SVGImage.h (189700 => 189701)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/svg/graphics/SVGImage.h        2015-09-14 09:40:26 UTC (rev 189700)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/svg/graphics/SVGImage.h        2015-09-14 09:45:25 UTC (rev 189701)
</span><span class="lines">@@ -33,13 +33,11 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class Element;
</span><del>-class FrameLoader;
</del><span class="cx"> class FrameView;
</span><span class="cx"> class ImageBuffer;
</span><span class="cx"> class Page;
</span><span class="cx"> class RenderBox;
</span><span class="cx"> class SVGSVGElement;
</span><del>-class SVGFrameLoaderClient;
</del><span class="cx"> class SVGImageChromeClient;
</span><span class="cx"> class SVGImageForContainer;
</span><span class="cx"> 
</span><span class="lines">@@ -57,7 +55,6 @@
</span><span class="cx">     virtual FloatSize size() const override { return m_intrinsicSize; }
</span><span class="cx"> 
</span><span class="cx">     void setURL(const URL&amp; url) { m_url = url; }
</span><del>-    void setDataProtocolLoader(FrameLoader* dataProtocolLoader) { m_dataProtocolLoader = dataProtocolLoader; }
</del><span class="cx"> 
</span><span class="cx">     virtual bool hasSingleSecurityOrigin() const override;
</span><span class="cx"> 
</span><span class="lines">@@ -101,12 +98,10 @@
</span><span class="cx"> 
</span><span class="cx">     SVGSVGElement* rootElement() const;
</span><span class="cx"> 
</span><del>-    std::unique_ptr&lt;SVGFrameLoaderClient&gt; m_loaderClient;
</del><span class="cx">     std::unique_ptr&lt;SVGImageChromeClient&gt; m_chromeClient;
</span><span class="cx">     std::unique_ptr&lt;Page&gt; m_page;
</span><span class="cx">     FloatSize m_intrinsicSize;
</span><span class="cx">     URL m_url;
</span><del>-    FrameLoader* m_dataProtocolLoader { nullptr };
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> bool isInSVGImage(const Element*);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCoresvggraphicsSVGImageClientsh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/svg/graphics/SVGImageClients.h (189700 => 189701)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/svg/graphics/SVGImageClients.h        2015-09-14 09:40:26 UTC (rev 189700)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/svg/graphics/SVGImageClients.h        2015-09-14 09:45:25 UTC (rev 189701)
</span><span class="lines">@@ -60,18 +60,6 @@
</span><span class="cx">     SVGImage* m_image;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-class SVGFrameLoaderClient final : public EmptyFrameLoaderClient {
-public:
-    SVGFrameLoaderClient(FrameLoader* dataProtocolLoader)
-        : m_dataProtocolLoader(dataProtocolLoader)
-    {
-    }
</del><ins>+}
</ins><span class="cx"> 
</span><del>-    virtual FrameLoader* dataProtocolLoader() const override { return m_dataProtocolLoader; }
-private:
-    FrameLoader* m_dataProtocolLoader;
-};
-
-} 
-
</del><span class="cx"> #endif // SVGImageClients_h
</span></span></pre>
</div>
</div>

</body>
</html>