<!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>[168103] branches/safari-537.76-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/168103">168103</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2014-05-01 09:06:02 -0700 (Thu, 01 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/167480">r167480</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari53776branchLayoutTestsChangeLog">branches/safari-537.76-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari53776branchSourceWebCoreChangeLog">branches/safari-537.76-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari53776branchSourceWebCoreplatformKURLcpp">branches/safari-537.76-branch/Source/WebCore/platform/KURL.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari53776branchLayoutTestsfastdomDOMURLparsingexpectedtxt">branches/safari-537.76-branch/LayoutTests/fast/dom/DOMURL/parsing-expected.txt</a></li>
<li><a href="#branchessafari53776branchLayoutTestsfastdomDOMURLparsinghtml">branches/safari-537.76-branch/LayoutTests/fast/dom/DOMURL/parsing.html</a></li>
<li><a href="#branchessafari53776branchLayoutTestsfastdomHTMLAnchorElementanchorelementhrefparsingexpectedtxt">branches/safari-537.76-branch/LayoutTests/fast/dom/HTMLAnchorElement/anchor-element-href-parsing-expected.txt</a></li>
<li><a href="#branchessafari53776branchLayoutTestsfastdomHTMLAnchorElementanchorelementhrefparsinghtml">branches/safari-537.76-branch/LayoutTests/fast/dom/HTMLAnchorElement/anchor-element-href-parsing.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari53776branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-537.76-branch/LayoutTests/ChangeLog (168102 => 168103)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.76-branch/LayoutTests/ChangeLog        2014-05-01 15:55:00 UTC (rev 168102)
+++ branches/safari-537.76-branch/LayoutTests/ChangeLog        2014-05-01 16:06:02 UTC (rev 168103)
</span><span class="lines">@@ -1,5 +1,22 @@
</span><span class="cx"> 2014-05-01  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r167480.
+
+    2014-04-17  Darin Adler  &lt;darin@apple.com&gt;
+    
+            hostname extraction from a URL should not decode percent-escape sequences
+            https://bugs.webkit.org/show_bug.cgi?id=131837
+            rdar://problem/15211936
+    
+            Reviewed by Anders Carlsson and Dave Hyatt.
+    
+            * fast/dom/DOMURL/parsing-expected.txt: Added.
+            * fast/dom/DOMURL/parsing.html: Added.
+            * fast/dom/HTMLAnchorElement/anchor-element-href-parsing-expected.txt: Added.
+            * fast/dom/HTMLAnchorElement/anchor-element-href-parsing.html: Added.
+    
+2014-05-01  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r167672.
</span><span class="cx"> 
</span><span class="cx">     2014-04-22  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari53776branchLayoutTestsfastdomDOMURLparsingexpectedtxtfromrev167480trunkLayoutTestsfastdomDOMURLparsingexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-537.76-branch/LayoutTests/fast/dom/DOMURL/parsing-expected.txt (from rev 167480, trunk/LayoutTests/fast/dom/DOMURL/parsing-expected.txt) (0 => 168103)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.76-branch/LayoutTests/fast/dom/DOMURL/parsing-expected.txt                                (rev 0)
+++ branches/safari-537.76-branch/LayoutTests/fast/dom/DOMURL/parsing-expected.txt        2014-05-01 16:06:02 UTC (rev 168103)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+PASS breakDownURL('about:blank') is 'protocol=about:, pathname=blank, origin=null'
+PASS breakDownURL('http://example.com/') is 'protocol=http:, host=example.com, pathname=/, origin=http://example.com'
+PASS breakDownURL('http://@example.com/') is 'protocol=http:, host=example.com, pathname=/, origin=http://example.com, toString=http://example.com/'
+PASS breakDownURL('http://a@example.com/') is 'protocol=http:, username=a, host=example.com, pathname=/, origin=http://example.com'
+PASS breakDownURL('http://a:@example.com/') is 'protocol=http:, username=a, host=example.com, pathname=/, origin=http://example.com, toString=http://a@example.com/'
+PASS breakDownURL('http://joebob1:abc123@example.com/') is 'protocol=http:, username=joebob1, password=abc123, host=example.com, pathname=/, origin=http://example.com'
+PASS breakDownURL('http://:def456@example.com/') is 'protocol=http:, password=def456, host=example.com, pathname=/, origin=http://example.com'
+PASS breakDownURL('http://example.com/foo/bar') is 'protocol=http:, host=example.com, pathname=/foo/bar, origin=http://example.com'
+PASS breakDownURL('HTTP://example.com/foo/bar') is 'protocol=http:, host=example.com, pathname=/foo/bar, origin=http://example.com, toString=http://example.com/foo/bar'
+PASS breakDownURL('https://example.com/ttt?ggg') is 'protocol=https:, host=example.com, pathname=/ttt, search=?ggg, origin=https://example.com'
+PASS breakDownURL('ftp://example.com/ttt?ggg') is 'protocol=ftp:, host=example.com, pathname=/ttt, search=?ggg, origin=ftp://example.com'
+PASS breakDownURL('file:///Users/darin') is 'protocol=file:, pathname=/Users/darin, origin=file://'
+PASS breakDownURL('data:text/html,&lt;b&gt;foo&lt;/b&gt;') is 'protocol=data:, pathname=text/html,&lt;b&gt;foo&lt;/b&gt;, origin=null'
+PASS breakDownURL('http://a:b@c:1/e/f?g%h') is 'protocol=http:, username=a, password=b, hostname=c, host=c:1, port=1, pathname=/e/f, search=?g%h, origin=http://c:1'
+PASS breakDownURL('http://ex%61mple.com/') is 'protocol=http:, host=ex%61mple.com, pathname=/, origin=http://ex%61mple.com'
+PASS breakDownURL('http://ex%2fmple.com/') is 'protocol=http:, host=ex%2fmple.com, pathname=/, origin=http://ex%2fmple.com'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="branchessafari53776branchLayoutTestsfastdomDOMURLparsinghtmlfromrev167480trunkLayoutTestsfastdomDOMURLparsinghtml"></a>
<div class="copfile"><h4>Copied: branches/safari-537.76-branch/LayoutTests/fast/dom/DOMURL/parsing.html (from rev 167480, trunk/LayoutTests/fast/dom/DOMURL/parsing.html) (0 => 168103)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.76-branch/LayoutTests/fast/dom/DOMURL/parsing.html                                (rev 0)
+++ branches/safari-537.76-branch/LayoutTests/fast/dom/DOMURL/parsing.html        2014-05-01 16:06:02 UTC (rev 168103)
</span><span class="lines">@@ -0,0 +1,61 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+
+function breakDownURL(string)
+{
+    var a = new URL(string);
+
+    var result = &quot;&quot;;
+
+    var propertyNames = [
+        &quot;protocol&quot;,
+        &quot;username&quot;,
+        &quot;password&quot;,
+        &quot;hostname&quot;,
+        &quot;host&quot;,
+        &quot;port&quot;,
+        &quot;pathname&quot;,
+        &quot;search&quot;,
+        &quot;hash&quot;,
+        &quot;origin&quot;
+    ];
+    for (var i = 0; i &lt; propertyNames.length; ++i) {
+        var name = propertyNames[i];
+        var value = a[name];
+        if (value == &quot;&quot;)
+            continue;
+        if (name == &quot;hostname&quot; &amp;&amp; value == a.host)
+            continue;
+        if (typeof value != &quot;string&quot;)
+            value = &quot;non-string&quot;;
+        if (result != &quot;&quot;)
+            result += &quot;, &quot;;
+        result += name + &quot;=&quot; + value;
+    }
+
+    if (string != a.toString())
+        result += &quot;, toString=&quot; + a.toString();
+
+    return result;
+}
+
+shouldBe(&quot;breakDownURL('about:blank')&quot;, &quot;'protocol=about:, pathname=blank, origin=null'&quot;);
+shouldBe(&quot;breakDownURL('http://example.com/')&quot;, &quot;'protocol=http:, host=example.com, pathname=/, origin=http://example.com'&quot;);
+shouldBe(&quot;breakDownURL('http://@example.com/')&quot;, &quot;'protocol=http:, host=example.com, pathname=/, origin=http://example.com, toString=http://example.com/'&quot;);
+shouldBe(&quot;breakDownURL('http://a@example.com/')&quot;, &quot;'protocol=http:, username=a, host=example.com, pathname=/, origin=http://example.com'&quot;);
+shouldBe(&quot;breakDownURL('http://a:@example.com/')&quot;, &quot;'protocol=http:, username=a, host=example.com, pathname=/, origin=http://example.com, toString=http://a@example.com/'&quot;);
+shouldBe(&quot;breakDownURL('http://joebob1:abc123@example.com/')&quot;, &quot;'protocol=http:, username=joebob1, password=abc123, host=example.com, pathname=/, origin=http://example.com'&quot;);
+shouldBe(&quot;breakDownURL('http://:def456@example.com/')&quot;, &quot;'protocol=http:, password=def456, host=example.com, pathname=/, origin=http://example.com'&quot;);
+shouldBe(&quot;breakDownURL('http://example.com/foo/bar')&quot;, &quot;'protocol=http:, host=example.com, pathname=/foo/bar, origin=http://example.com'&quot;);
+shouldBe(&quot;breakDownURL('HTTP://example.com/foo/bar')&quot;, &quot;'protocol=http:, host=example.com, pathname=/foo/bar, origin=http://example.com, toString=http://example.com/foo/bar'&quot;);
+shouldBe(&quot;breakDownURL('https://example.com/ttt?ggg')&quot;, &quot;'protocol=https:, host=example.com, pathname=/ttt, search=?ggg, origin=https://example.com'&quot;);
+shouldBe(&quot;breakDownURL('ftp://example.com/ttt?ggg')&quot;, &quot;'protocol=ftp:, host=example.com, pathname=/ttt, search=?ggg, origin=ftp://example.com'&quot;);
+shouldBe(&quot;breakDownURL('file:///Users/darin')&quot;, &quot;'protocol=file:, pathname=/Users/darin, origin=file://'&quot;);
+shouldBe(&quot;breakDownURL('data:text/html,&lt;b&gt;foo&lt;/b&gt;')&quot;, &quot;'protocol=data:, pathname=text/html,&lt;b&gt;foo&lt;/b&gt;, origin=null'&quot;);
+shouldBe(&quot;breakDownURL('http://a:b@c:1/e/f?g%h')&quot;, &quot;'protocol=http:, username=a, password=b, hostname=c, host=c:1, port=1, pathname=/e/f, search=?g%h, origin=http://c:1'&quot;);
+
+shouldBe(&quot;breakDownURL('http://ex%61mple.com/')&quot;, &quot;'protocol=http:, host=ex%61mple.com, pathname=/, origin=http://ex%61mple.com'&quot;);
+shouldBe(&quot;breakDownURL('http://ex%2fmple.com/')&quot;, &quot;'protocol=http:, host=ex%2fmple.com, pathname=/, origin=http://ex%2fmple.com'&quot;);
+
+&lt;/script&gt;
</ins></span></pre></div>
<a id="branchessafari53776branchLayoutTestsfastdomHTMLAnchorElementanchorelementhrefparsingexpectedtxtfromrev167480trunkLayoutTestsfastdomHTMLAnchorElementanchorelementhrefparsingexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-537.76-branch/LayoutTests/fast/dom/HTMLAnchorElement/anchor-element-href-parsing-expected.txt (from rev 167480, trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-element-href-parsing-expected.txt) (0 => 168103)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.76-branch/LayoutTests/fast/dom/HTMLAnchorElement/anchor-element-href-parsing-expected.txt                                (rev 0)
+++ branches/safari-537.76-branch/LayoutTests/fast/dom/HTMLAnchorElement/anchor-element-href-parsing-expected.txt        2014-05-01 16:06:02 UTC (rev 168103)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+PASS breakDownURL('about:blank') is 'protocol=about:, pathname=blank, origin=null'
+PASS breakDownURL('http://example.com/') is 'protocol=http:, host=example.com, pathname=/, origin=http://example.com'
+PASS breakDownURL('http://@example.com/') is 'protocol=http:, host=example.com, pathname=/, origin=http://example.com, toString=http://example.com/'
+PASS breakDownURL('http://a@example.com/') is 'protocol=http:, host=example.com, pathname=/, origin=http://example.com'
+PASS breakDownURL('http://a:@example.com/') is 'protocol=http:, host=example.com, pathname=/, origin=http://example.com, toString=http://a@example.com/'
+PASS breakDownURL('http://joebob1:abc123@example.com/') is 'protocol=http:, host=example.com, pathname=/, origin=http://example.com'
+PASS breakDownURL('http://:def456@example.com/') is 'protocol=http:, host=example.com, pathname=/, origin=http://example.com'
+PASS breakDownURL('http://example.com/foo/bar') is 'protocol=http:, host=example.com, pathname=/foo/bar, origin=http://example.com'
+PASS breakDownURL('HTTP://example.com/foo/bar') is 'protocol=http:, host=example.com, pathname=/foo/bar, origin=http://example.com, toString=http://example.com/foo/bar'
+PASS breakDownURL('https://example.com/ttt?ggg') is 'protocol=https:, host=example.com, pathname=/ttt, search=?ggg, origin=https://example.com'
+PASS breakDownURL('ftp://example.com/ttt?ggg') is 'protocol=ftp:, host=example.com, pathname=/ttt, search=?ggg, origin=ftp://example.com'
+PASS breakDownURL('file:///Users/darin') is 'protocol=file:, pathname=/Users/darin, origin=file://'
+PASS breakDownURL('data:text/html,&lt;b&gt;foo&lt;/b&gt;') is 'protocol=data:, pathname=text/html,&lt;b&gt;foo&lt;/b&gt;, origin=null'
+PASS breakDownURL('http://a:b@c:1/e/f?g%h') is 'protocol=http:, hostname=c, host=c:1, port=1, pathname=/e/f, search=?g%h, origin=http://c:1'
+PASS breakDownURL('http://ex%61mple.com/') is 'protocol=http:, host=ex%61mple.com, pathname=/, origin=http://ex%61mple.com'
+PASS breakDownURL('http://ex%2fmple.com/') is 'protocol=http:, host=ex%2fmple.com, pathname=/, origin=http://ex%2fmple.com'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="branchessafari53776branchLayoutTestsfastdomHTMLAnchorElementanchorelementhrefparsinghtmlfromrev167480trunkLayoutTestsfastdomHTMLAnchorElementanchorelementhrefparsinghtml"></a>
<div class="copfile"><h4>Copied: branches/safari-537.76-branch/LayoutTests/fast/dom/HTMLAnchorElement/anchor-element-href-parsing.html (from rev 167480, trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-element-href-parsing.html) (0 => 168103)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.76-branch/LayoutTests/fast/dom/HTMLAnchorElement/anchor-element-href-parsing.html                                (rev 0)
+++ branches/safari-537.76-branch/LayoutTests/fast/dom/HTMLAnchorElement/anchor-element-href-parsing.html        2014-05-01 16:06:02 UTC (rev 168103)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+
+function breakDownURL(string)
+{
+    var a = document.createElement(&quot;a&quot;);
+    a.href = string;
+
+    var result = &quot;&quot;;
+
+    var propertyNames = [
+        &quot;protocol&quot;,
+        &quot;hostname&quot;,
+        &quot;host&quot;,
+        &quot;port&quot;,
+        &quot;pathname&quot;,
+        &quot;search&quot;,
+        &quot;hash&quot;,
+        &quot;origin&quot;
+    ];
+    for (var i = 0; i &lt; propertyNames.length; ++i) {
+        var name = propertyNames[i];
+        var value = a[name];
+        if (value == &quot;&quot;)
+            continue;
+        if (name == &quot;hostname&quot; &amp;&amp; value == a.host)
+            continue;
+        if (typeof value != &quot;string&quot;)
+            value = &quot;non-string&quot;;
+        if (result != &quot;&quot;)
+            result += &quot;, &quot;;
+        result += name + &quot;=&quot; + value;
+    }
+
+    if (string != a.toString())
+        result += &quot;, toString=&quot; + a.toString();
+
+    return result;
+}
+
+shouldBe(&quot;breakDownURL('about:blank')&quot;, &quot;'protocol=about:, pathname=blank, origin=null'&quot;);
+shouldBe(&quot;breakDownURL('http://example.com/')&quot;, &quot;'protocol=http:, host=example.com, pathname=/, origin=http://example.com'&quot;);
+shouldBe(&quot;breakDownURL('http://@example.com/')&quot;, &quot;'protocol=http:, host=example.com, pathname=/, origin=http://example.com, toString=http://example.com/'&quot;);
+shouldBe(&quot;breakDownURL('http://a@example.com/')&quot;, &quot;'protocol=http:, host=example.com, pathname=/, origin=http://example.com'&quot;);
+shouldBe(&quot;breakDownURL('http://a:@example.com/')&quot;, &quot;'protocol=http:, host=example.com, pathname=/, origin=http://example.com, toString=http://a@example.com/'&quot;);
+shouldBe(&quot;breakDownURL('http://joebob1:abc123@example.com/')&quot;, &quot;'protocol=http:, host=example.com, pathname=/, origin=http://example.com'&quot;);
+shouldBe(&quot;breakDownURL('http://:def456@example.com/')&quot;, &quot;'protocol=http:, host=example.com, pathname=/, origin=http://example.com'&quot;);
+shouldBe(&quot;breakDownURL('http://example.com/foo/bar')&quot;, &quot;'protocol=http:, host=example.com, pathname=/foo/bar, origin=http://example.com'&quot;);
+shouldBe(&quot;breakDownURL('HTTP://example.com/foo/bar')&quot;, &quot;'protocol=http:, host=example.com, pathname=/foo/bar, origin=http://example.com, toString=http://example.com/foo/bar'&quot;);
+shouldBe(&quot;breakDownURL('https://example.com/ttt?ggg')&quot;, &quot;'protocol=https:, host=example.com, pathname=/ttt, search=?ggg, origin=https://example.com'&quot;);
+shouldBe(&quot;breakDownURL('ftp://example.com/ttt?ggg')&quot;, &quot;'protocol=ftp:, host=example.com, pathname=/ttt, search=?ggg, origin=ftp://example.com'&quot;);
+shouldBe(&quot;breakDownURL('file:///Users/darin')&quot;, &quot;'protocol=file:, pathname=/Users/darin, origin=file://'&quot;);
+shouldBe(&quot;breakDownURL('data:text/html,&lt;b&gt;foo&lt;/b&gt;')&quot;, &quot;'protocol=data:, pathname=text/html,&lt;b&gt;foo&lt;/b&gt;, origin=null'&quot;);
+shouldBe(&quot;breakDownURL('http://a:b@c:1/e/f?g%h')&quot;, &quot;'protocol=http:, hostname=c, host=c:1, port=1, pathname=/e/f, search=?g%h, origin=http://c:1'&quot;);
+
+shouldBe(&quot;breakDownURL('http://ex%61mple.com/')&quot;, &quot;'protocol=http:, host=ex%61mple.com, pathname=/, origin=http://ex%61mple.com'&quot;);
+shouldBe(&quot;breakDownURL('http://ex%2fmple.com/')&quot;, &quot;'protocol=http:, host=ex%2fmple.com, pathname=/, origin=http://ex%2fmple.com'&quot;);
+
+&lt;/script&gt;
</ins></span></pre></div>
<a id="branchessafari53776branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-537.76-branch/Source/WebCore/ChangeLog (168102 => 168103)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.76-branch/Source/WebCore/ChangeLog        2014-05-01 15:55:00 UTC (rev 168102)
+++ branches/safari-537.76-branch/Source/WebCore/ChangeLog        2014-05-01 16:06:02 UTC (rev 168103)
</span><span class="lines">@@ -1,5 +1,24 @@
</span><span class="cx"> 2014-05-01  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r167480.
+
+    2014-04-17  Darin Adler  &lt;darin@apple.com&gt;
+    
+            origin spoofing possible (HTTP Origin, postMessage event.origin) due to inappropriate URL escape sequence decoding
+            https://bugs.webkit.org/show_bug.cgi?id=131837
+            rdar://problem/15211936
+    
+            Reviewed by Anders Carlsson and Dave Hyatt.
+    
+            Tests: fast/dom/DOMURL/parsing.html
+                   fast/dom/HTMLAnchorElement/anchor-element-href-parsing.html
+    
+            * platform/URL.cpp:
+            (WebCore::URL::host): Removed unnecessary call to decodeURLEscapeSequences, which caused
+            problems and was not needed.
+    
+2014-05-01  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r167524.
</span><span class="cx"> 
</span><span class="cx">     2014-04-18  Jon Honeycutt  &lt;jhoneycutt@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari53776branchSourceWebCoreplatformKURLcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537.76-branch/Source/WebCore/platform/KURL.cpp (168102 => 168103)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.76-branch/Source/WebCore/platform/KURL.cpp        2014-05-01 15:55:00 UTC (rev 168102)
+++ branches/safari-537.76-branch/Source/WebCore/platform/KURL.cpp        2014-05-01 16:06:02 UTC (rev 168103)
</span><span class="lines">@@ -579,7 +579,7 @@
</span><span class="cx"> String KURL::host() const
</span><span class="cx"> {
</span><span class="cx">     int start = hostStart();
</span><del>-    return decodeURLEscapeSequences(m_string.substring(start, m_hostEnd - start));
</del><ins>+    return m_string.substring(start, m_hostEnd - start);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> unsigned short KURL::port() const
</span></span></pre>
</div>
</div>

</body>
</html>