<!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>[199909] branches/safari-601.1.46-branch</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/199909">199909</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2016-04-22 14:32:02 -0700 (Fri, 22 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/199881">r199881</a>. rdar://problem/25879593</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari601146branchLayoutTestsChangeLog">branches/safari-601.1.46-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreChangeLog">branches/safari-601.1.46-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreloaderTextResourceDecodercpp">branches/safari-601.1.46-branch/Source/WebCore/loader/TextResourceDecoder.cpp</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreloaderTextResourceDecoderh">branches/safari-601.1.46-branch/Source/WebCore/loader/TextResourceDecoder.h</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreloadercacheCachedCSSStyleSheeth">branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedCSSStyleSheet.h</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreloadercacheCachedResourceh">branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedResource.h</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreloadercacheCachedResourceLoadercpp">branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedResourceLoader.cpp</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreloadercacheCachedSVGDocumenth">branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedSVGDocument.h</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreloadercacheCachedScripth">branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedScript.h</a></li>
<li><a href="#branchessafari601146branchSourceWebCoreloadercacheCachedXSLStyleSheeth">branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedXSLStyleSheet.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari601146branchLayoutTestshttptestssvgresourcessymboldefssvg">branches/safari-601.1.46-branch/LayoutTests/http/tests/svg/resources/symbol-defs.svg</a></li>
<li><a href="#branchessafari601146branchLayoutTestshttptestssvgsvguseexternalexpectedtxt">branches/safari-601.1.46-branch/LayoutTests/http/tests/svg/svg-use-external-expected.txt</a></li>
<li><a href="#branchessafari601146branchLayoutTestshttptestssvgsvguseexternalhtml">branches/safari-601.1.46-branch/LayoutTests/http/tests/svg/svg-use-external.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari601146branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/LayoutTests/ChangeLog (199908 => 199909)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/ChangeLog        2016-04-22 21:27:14 UTC (rev 199908)
+++ branches/safari-601.1.46-branch/LayoutTests/ChangeLog        2016-04-22 21:32:02 UTC (rev 199909)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-04-22  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
+        Merge r199881. rdar://problem/25879593
+
+    2016-04-22  Antti Koivisto  &lt;antti@apple.com&gt;
+
+            REGRESSION (r194898): Multi download of external SVG defs file by &lt;use&gt; xlinks:href (caching)
+            https://bugs.webkit.org/show_bug.cgi?id=156368
+            &lt;rdar://problem/25611746&gt;
+
+            Reviewed by Simon Fraser.
+
+            * http/tests/svg/resources/symbol-defs.svg: Added.
+            * http/tests/svg/svg-use-external-expected.txt: Added.
+            * http/tests/svg/svg-use-external.html: Added.
+
</ins><span class="cx"> 2016-03-31  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Roll out r191180. rdar://problem/25449273
</span></span></pre></div>
<a id="branchessafari601146branchLayoutTestshttptestssvgresourcessymboldefssvg"></a>
<div class="addfile"><h4>Added: branches/safari-601.1.46-branch/LayoutTests/http/tests/svg/resources/symbol-defs.svg (0 => 199909)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/http/tests/svg/resources/symbol-defs.svg                                (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/http/tests/svg/resources/symbol-defs.svg        2016-04-22 21:32:02 UTC (rev 199909)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+&lt;svg style=&quot;position: absolute; width: 0; height: 0;&quot; width=&quot;0&quot; height=&quot;0&quot; version=&quot;1.1&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
+    &lt;defs&gt;
+        &lt;symbol id=&quot;icon-rocket&quot; viewBox=&quot;0 0 16 16&quot;&gt;
+            &lt;title&gt;rocket&lt;/title&gt;
+            &lt;path class=&quot;path1&quot; d=&quot;M11 1l-5 5h-3l-3 4c0 0 3.178-0.885 5.032-0.47l-5.032 6.47 6.592-5.127c0.919 2.104-0.592 5.127-0.592 5.127l4-3v-3l5-5 1-5-5 1z&quot;&gt;&lt;/path&gt;
+        &lt;/symbol&gt;
+        &lt;symbol id=&quot;icon-fire&quot; viewBox=&quot;0 0 16 16&quot;&gt;
+            &lt;title&gt;fire&lt;/title&gt;
+            &lt;path class=&quot;path1&quot; d=&quot;M5.016 16c-1.066-2.219-0.498-3.49 0.321-4.688 0.897-1.312 1.129-2.61 1.129-2.61s0.706 0.917 0.423 2.352c1.246-1.387 1.482-3.598 1.293-4.445 2.817 1.969 4.021 6.232 2.399 9.392 8.631-4.883 2.147-12.19 1.018-13.013 0.376 0.823 0.448 2.216-0.313 2.893-1.287-4.879-4.468-5.879-4.468-5.879 0.376 2.516-1.364 5.268-3.042 7.324-0.059-1.003-0.122-1.696-0.649-2.656-0.118 1.823-1.511 3.309-1.889 5.135-0.511 2.473 0.383 4.284 3.777 6.197z&quot;&gt;&lt;/path&gt;
+        &lt;/symbol&gt;
+        &lt;symbol id=&quot;icon-lab&quot; viewBox=&quot;0 0 16 16&quot;&gt;
+            &lt;title&gt;lab&lt;/title&gt;
+            &lt;path class=&quot;path1&quot; d=&quot;M14.942 12.57l-4.942-8.235v-3.335h0.5c0.275 0 0.5-0.225 0.5-0.5s-0.225-0.5-0.5-0.5h-5c-0.275 0-0.5 0.225-0.5 0.5s0.225 0.5 0.5 0.5h0.5v3.335l-4.942 8.235c-1.132 1.886-0.258 3.43 1.942 3.43h10c2.2 0 3.074-1.543 1.942-3.43zM3.766 10l3.234-5.39v-3.61h2v3.61l3.234 5.39h-8.468z&quot;&gt;&lt;/path&gt;
+        &lt;/symbol&gt;
+        &lt;symbol id=&quot;icon-magnet&quot; viewBox=&quot;0 0 16 16&quot;&gt;
+            &lt;title&gt;magnet&lt;/title&gt;
+            &lt;path class=&quot;path1&quot; d=&quot;M14 0h-4l1 9c0 1.657-1.343 3-3 3s-3-1.343-3-3l1-9h-4l-1 9c0 3.866 3.134 7 7 7s7-3.134 7-7l-1-9zM12.154 13.154c-1.11 1.11-2.585 1.721-4.154 1.721s-3.045-0.611-4.154-1.721c-1.096-1.096-1.705-2.548-1.72-4.095l0.564-5.075h1.736l-0.55 4.953v0.062c0 1.102 0.429 2.138 1.208 2.917s1.815 1.208 2.917 1.208 2.138-0.429 2.917-1.208c0.779-0.779 1.208-1.815 1.208-2.917v-0.062l-0.007-0.062-0.543-4.891h1.736l0.564 5.075c-0.015 1.547-0.625 2.999-1.72 4.095z&quot;&gt;&lt;/path&gt;
+        &lt;/symbol&gt;
+        &lt;symbol id=&quot;icon-shield&quot; viewBox=&quot;0 0 16 16&quot;&gt;
+            &lt;title&gt;shield&lt;/title&gt;
+            &lt;path class=&quot;path1&quot; d=&quot;M15 0l-7 2-7-2c0 0-0.070 0.808 0 2l7 2.189 7-2.189c0.070-1.192 0-2 0-2zM1.128 3.049c0.375 3.917 1.773 10.504 6.872 12.951 5.099-2.448 6.497-9.034 6.872-12.951l-6.872 2.584-6.872-2.584z&quot;&gt;&lt;/path&gt;
+        &lt;/symbol&gt;
+        &lt;symbol id=&quot;icon-power&quot; viewBox=&quot;0 0 16 16&quot;&gt;
+            &lt;title&gt;power&lt;/title&gt;
+            &lt;path class=&quot;path1&quot; d=&quot;M6 0l-6 8h6l-4 8 14-10h-8l6-6z&quot;&gt;&lt;/path&gt;
+        &lt;/symbol&gt;
+    &lt;/defs&gt;
+&lt;/svg&gt;
</ins><span class="cx">Property changes on: branches/safari-601.1.46-branch/LayoutTests/http/tests/svg/resources/symbol-defs.svg
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnexecutable"></a>
<div class="addfile"><h4>Added: svn:executable</h4></div>
<a id="branchessafari601146branchLayoutTestshttptestssvgsvguseexternalexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-601.1.46-branch/LayoutTests/http/tests/svg/svg-use-external-expected.txt (0 => 199909)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/http/tests/svg/svg-use-external-expected.txt                                (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/http/tests/svg/svg-use-external-expected.txt        2016-04-22 21:32:02 UTC (rev 199909)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+http://127.0.0.1:8000/svg/resources/symbol-defs.svg#icon-rocket - willSendRequest &lt;NSURLRequest URL http://127.0.0.1:8000/svg/resources/symbol-defs.svg#icon-rocket, main document URL http://127.0.0.1:8000/svg/svg-use-external.html, http method GET&gt; redirectResponse (null)
+http://127.0.0.1:8000/svg/svg-use-external.html - didFinishLoading
+http://127.0.0.1:8000/svg/resources/symbol-defs.svg#icon-rocket - didReceiveResponse &lt;NSURLResponse http://127.0.0.1:8000/svg/resources/symbol-defs.svg#icon-rocket, http status code 200&gt;
+http://127.0.0.1:8000/svg/resources/symbol-defs.svg#icon-rocket - didFinishLoading
+   
</ins></span></pre></div>
<a id="branchessafari601146branchLayoutTestshttptestssvgsvguseexternalhtml"></a>
<div class="addfile"><h4>Added: branches/safari-601.1.46-branch/LayoutTests/http/tests/svg/svg-use-external.html (0 => 199909)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/http/tests/svg/svg-use-external.html                                (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/http/tests/svg/svg-use-external.html        2016-04-22 21:32:02 UTC (rev 199909)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html lang=&quot;en&quot;&gt;
+&lt;head&gt;
+    &lt;meta charset=&quot;utf-8&quot;&gt;
+    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;
+
+    &lt;title&gt;Verify that the SVG use resource only loads once&lt;/title&gt;
+    &lt;script&gt;
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.dumpResourceLoadCallbacks();
+        testRunner.waitUntilDone();
+        onload = function() {
+            testRunner.notifyDone();
+        }
+    }
+    &lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;svg&gt;
+        &lt;use xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; xlink:href=&quot;resources/symbol-defs.svg#icon-rocket&quot;&gt;&lt;/use&gt;
+    &lt;/svg&gt;
+
+    &lt;svg&gt;
+        &lt;use xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; xlink:href=&quot;resources/symbol-defs.svg#icon-fire&quot;&gt;&lt;/use&gt;
+    &lt;/svg&gt;
+
+    &lt;svg&gt;
+        &lt;use xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; xlink:href=&quot;resources/symbol-defs.svg#icon-lab&quot;&gt;&lt;/use&gt;
+    &lt;/svg&gt;
+
+    &lt;svg&gt;
+        &lt;use xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; xlink:href=&quot;resources/symbol-defs.svg#icon-magnet&quot;&gt;&lt;/use&gt;
+    &lt;/svg&gt;
+
+    &lt;svg&gt;
+        &lt;use xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; xlink:href=&quot;resources/symbol-defs.svg#icon-shield&quot;&gt;&lt;/use&gt;
+    &lt;/svg&gt;
+
+    &lt;svg&gt;
+        &lt;use xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; xlink:href=&quot;resources/symbol-defs.svg#icon-power&quot;&gt;&lt;/use&gt;
+    &lt;/svg&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: branches/safari-601.1.46-branch/LayoutTests/http/tests/svg/svg-use-external.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnexecutable"></a>
<div class="addfile"><h4>Added: svn:executable</h4></div>
<a id="branchessafari601146branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/ChangeLog (199908 => 199909)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/ChangeLog        2016-04-22 21:27:14 UTC (rev 199908)
+++ branches/safari-601.1.46-branch/Source/WebCore/ChangeLog        2016-04-22 21:32:02 UTC (rev 199909)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2016-04-22  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
+        Merge r199881. rdar://problem/25879593
+
+    2016-04-22  Antti Koivisto  &lt;antti@apple.com&gt;
+
+            REGRESSION (r194898): Multi download of external SVG defs file by &lt;use&gt; xlinks:href (caching)
+            https://bugs.webkit.org/show_bug.cgi?id=156368
+            &lt;rdar://problem/25611746&gt;
+
+            Reviewed by Simon Fraser.
+
+            We would load svg resources with fragment identifier again because the encoding never matched.
+
+            Test: http/tests/svg/svg-use-external.html
+
+            * loader/TextResourceDecoder.cpp:
+            (WebCore::TextResourceDecoder::setEncoding):
+            (WebCore::TextResourceDecoder::hasEqualEncodingForCharset):
+
+                Encoding can depend on mime type. Add a comparison function that takes this into account.
+
+            (WebCore::findXMLEncoding):
+            * loader/TextResourceDecoder.h:
+            (WebCore::TextResourceDecoder::encoding):
+            * loader/cache/CachedCSSStyleSheet.h:
+            * loader/cache/CachedResource.h:
+            (WebCore::CachedResource::textResourceDecoder):
+
+                Add a way to get the TextResourceDecoder from a cached resource.
+
+            * loader/cache/CachedResourceLoader.cpp:
+            (WebCore::CachedResourceLoader::determineRevalidationPolicy):
+
+                Use the new comparison function.
+
+            * loader/cache/CachedSVGDocument.h:
+            * loader/cache/CachedScript.h:
+            * loader/cache/CachedXSLStyleSheet.h:
+
</ins><span class="cx"> 2016-04-15  Babak Shafiei  &lt;bshafiei@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r199598.
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCoreloaderTextResourceDecodercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/loader/TextResourceDecoder.cpp (199908 => 199909)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/loader/TextResourceDecoder.cpp        2016-04-22 21:27:14 UTC (rev 199908)
+++ branches/safari-601.1.46-branch/Source/WebCore/loader/TextResourceDecoder.cpp        2016-04-22 21:32:02 UTC (rev 199909)
</span><span class="lines">@@ -359,6 +359,11 @@
</span><span class="cx">     m_source = source;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool TextResourceDecoder::hasEqualEncodingForCharset(const String&amp; charset) const
+{
+    return defaultEncoding(m_contentType, charset) == m_encoding;
+}
+
</ins><span class="cx"> // Returns the position of the encoding string.
</span><span class="cx"> static int findXMLEncoding(const char* str, int len, int&amp; encodingLength)
</span><span class="cx"> {
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCoreloaderTextResourceDecoderh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/loader/TextResourceDecoder.h (199908 => 199909)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/loader/TextResourceDecoder.h        2016-04-22 21:27:14 UTC (rev 199908)
+++ branches/safari-601.1.46-branch/Source/WebCore/loader/TextResourceDecoder.h        2016-04-22 21:32:02 UTC (rev 199909)
</span><span class="lines">@@ -52,6 +52,8 @@
</span><span class="cx">     void setEncoding(const TextEncoding&amp;, EncodingSource);
</span><span class="cx">     const TextEncoding&amp; encoding() const { return m_encoding; }
</span><span class="cx"> 
</span><ins>+    bool hasEqualEncodingForCharset(const String&amp;) const;
+
</ins><span class="cx">     WEBCORE_EXPORT String decode(const char* data, size_t length);
</span><span class="cx">     WEBCORE_EXPORT String flush();
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCoreloadercacheCachedCSSStyleSheeth"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedCSSStyleSheet.h (199908 => 199909)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedCSSStyleSheet.h        2016-04-22 21:27:14 UTC (rev 199908)
+++ branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedCSSStyleSheet.h        2016-04-22 21:32:02 UTC (rev 199909)
</span><span class="lines">@@ -55,6 +55,7 @@
</span><span class="cx"> 
</span><span class="cx">         virtual void setEncoding(const String&amp;) override;
</span><span class="cx">         virtual String encoding() const override;
</span><ins>+        const TextResourceDecoder* textResourceDecoder() const override { return m_decoder.get(); }
</ins><span class="cx">         virtual void finishLoading(SharedBuffer*) override;
</span><span class="cx">         virtual void destroyDecodedData() override;
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCoreloadercacheCachedResourceh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedResource.h (199908 => 199909)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedResource.h        2016-04-22 21:27:14 UTC (rev 199908)
+++ branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedResource.h        2016-04-22 21:32:02 UTC (rev 199909)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx"> class SecurityOrigin;
</span><span class="cx"> class SharedBuffer;
</span><span class="cx"> class SubresourceLoader;
</span><ins>+class TextResourceDecoder;
</ins><span class="cx"> 
</span><span class="cx"> // A resource that is held in the cache. Classes who want to use this object should derive
</span><span class="cx"> // from CachedResourceClient, to get the function calls in case the requested data has arrived.
</span><span class="lines">@@ -98,6 +99,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void setEncoding(const String&amp;) { }
</span><span class="cx">     virtual String encoding() const { return String(); }
</span><ins>+    virtual const TextResourceDecoder* textResourceDecoder() const { return nullptr; }
</ins><span class="cx">     virtual void addDataBuffer(SharedBuffer&amp;);
</span><span class="cx">     virtual void addData(const char* data, unsigned length);
</span><span class="cx">     virtual void finishLoading(SharedBuffer*);
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCoreloadercacheCachedResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedResourceLoader.cpp (199908 => 199909)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedResourceLoader.cpp        2016-04-22 21:27:14 UTC (rev 199908)
+++ branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedResourceLoader.cpp        2016-04-22 21:32:02 UTC (rev 199909)
</span><span class="lines">@@ -725,7 +725,8 @@
</span><span class="cx">     if (!existingResource-&gt;canReuse(request))
</span><span class="cx">         return Reload;
</span><span class="cx"> 
</span><del>-    if (existingResource-&gt;encoding() != TextEncoding(cachedResourceRequest.charset()))
</del><ins>+    auto* textDecoder = existingResource-&gt;textResourceDecoder();
+    if (textDecoder &amp;&amp; !textDecoder-&gt;hasEqualEncodingForCharset(cachedResourceRequest.charset()))
</ins><span class="cx">         return Reload;
</span><span class="cx"> 
</span><span class="cx">     // Conditional requests should have failed canReuse check.
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCoreloadercacheCachedSVGDocumenth"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedSVGDocument.h (199908 => 199909)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedSVGDocument.h        2016-04-22 21:27:14 UTC (rev 199908)
+++ branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedSVGDocument.h        2016-04-22 21:32:02 UTC (rev 199909)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx">     virtual bool mayTryReplaceEncodedData() const override { return true; }
</span><span class="cx">     virtual void setEncoding(const String&amp;) override;
</span><span class="cx">     virtual String encoding() const override;
</span><ins>+    const TextResourceDecoder* textResourceDecoder() const override { return m_decoder.get(); }
</ins><span class="cx">     virtual void finishLoading(SharedBuffer*) override;
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;SVGDocument&gt; m_document;
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCoreloadercacheCachedScripth"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedScript.h (199908 => 199909)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedScript.h        2016-04-22 21:27:14 UTC (rev 199908)
+++ branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedScript.h        2016-04-22 21:32:02 UTC (rev 199909)
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void setEncoding(const String&amp;) override;
</span><span class="cx">     virtual String encoding() const override;
</span><ins>+    const TextResourceDecoder* textResourceDecoder() const override { return m_decoder.get(); }
</ins><span class="cx">     virtual void finishLoading(SharedBuffer*) override;
</span><span class="cx"> 
</span><span class="cx">     virtual void destroyDecodedData() override;
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebCoreloadercacheCachedXSLStyleSheeth"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedXSLStyleSheet.h (199908 => 199909)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedXSLStyleSheet.h        2016-04-22 21:27:14 UTC (rev 199908)
+++ branches/safari-601.1.46-branch/Source/WebCore/loader/cache/CachedXSLStyleSheet.h        2016-04-22 21:32:02 UTC (rev 199909)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx">     virtual void didAddClient(CachedResourceClient*) override;
</span><span class="cx">     virtual void setEncoding(const String&amp;) override;
</span><span class="cx">     virtual String encoding() const override;
</span><ins>+    const TextResourceDecoder* textResourceDecoder() const override { return m_decoder.get(); }
</ins><span class="cx">     virtual void finishLoading(SharedBuffer*) override;
</span><span class="cx"> 
</span><span class="cx">     String m_sheet;
</span></span></pre>
</div>
</div>

</body>
</html>