<!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>[197507] trunk</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/197507">197507</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-03-03 09:25:26 -0800 (Thu, 03 Mar 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Drop [TreatNullAs=EmptyString] from URL interface attributes
https://bugs.webkit.org/show_bug.cgi?id=154951
Reviewed by Darin Adler.
Source/WebCore:
Drop [TreatNullAs=EmptyString] from URL interface attributes to match
the specification:
- https://url.spec.whatwg.org/#api
Firefox and Chrome both already follow the specification and convert
null to the "null" string.
No new tests, already covered by existing tests.
* html/URLUtils.idl:
LayoutTests:
Update existing tests now that URL interface attributes no longer treat
null as the empty string.
* fast/dom/DOMURL/set-href-attribute-hash-expected.txt:
* fast/dom/DOMURL/set-href-attribute-hash.html:
* fast/dom/DOMURL/set-href-attribute-host-expected.txt:
* fast/dom/DOMURL/set-href-attribute-host.html:
* fast/dom/DOMURL/set-href-attribute-hostname-expected.txt:
* fast/dom/DOMURL/set-href-attribute-hostname.html:
* fast/dom/DOMURL/set-href-attribute-pathname-expected.txt:
* fast/dom/DOMURL/set-href-attribute-pathname.html:
* fast/dom/DOMURL/set-href-attribute-protocol-expected.txt:
* fast/dom/DOMURL/set-href-attribute-protocol.html:
* fast/dom/DOMURL/set-href-attribute-search-expected.txt:
* fast/dom/DOMURL/set-href-attribute-search.html:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMURLsethrefattributehashexpectedtxt">trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hash-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMURLsethrefattributehashhtml">trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hash.html</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMURLsethrefattributehostexpectedtxt">trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-host-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMURLsethrefattributehosthtml">trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-host.html</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMURLsethrefattributehostnameexpectedtxt">trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hostname-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMURLsethrefattributehostnamehtml">trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hostname.html</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMURLsethrefattributepathnameexpectedtxt">trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-pathname-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMURLsethrefattributepathnamehtml">trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-pathname.html</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMURLsethrefattributeprotocolexpectedtxt">trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-protocol-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMURLsethrefattributeprotocolhtml">trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-protocol.html</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMURLsethrefattributesearchexpectedtxt">trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-search-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMURLsethrefattributesearchhtml">trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-search.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlURLUtilsidl">trunk/Source/WebCore/html/URLUtils.idl</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (197506 => 197507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/ChangeLog        2016-03-03 17:25:26 UTC (rev 197507)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2016-03-03 Chris Dumez <cdumez@apple.com>
+
+ Drop [TreatNullAs=EmptyString] from URL interface attributes
+ https://bugs.webkit.org/show_bug.cgi?id=154951
+
+ Reviewed by Darin Adler.
+
+ Update existing tests now that URL interface attributes no longer treat
+ null as the empty string.
+
+ * fast/dom/DOMURL/set-href-attribute-hash-expected.txt:
+ * fast/dom/DOMURL/set-href-attribute-hash.html:
+ * fast/dom/DOMURL/set-href-attribute-host-expected.txt:
+ * fast/dom/DOMURL/set-href-attribute-host.html:
+ * fast/dom/DOMURL/set-href-attribute-hostname-expected.txt:
+ * fast/dom/DOMURL/set-href-attribute-hostname.html:
+ * fast/dom/DOMURL/set-href-attribute-pathname-expected.txt:
+ * fast/dom/DOMURL/set-href-attribute-pathname.html:
+ * fast/dom/DOMURL/set-href-attribute-protocol-expected.txt:
+ * fast/dom/DOMURL/set-href-attribute-protocol.html:
+ * fast/dom/DOMURL/set-href-attribute-search-expected.txt:
+ * fast/dom/DOMURL/set-href-attribute-search.html:
+
</ins><span class="cx"> 2016-03-03 Javier Fernandez <jfernandez@igalia.com>
</span><span class="cx">
</span><span class="cx"> [CSS Box Alignment] New CSS Value 'normal' for Content Alignment
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMURLsethrefattributehashexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hash-expected.txt (197506 => 197507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hash-expected.txt        2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hash-expected.txt        2016-03-03 17:25:26 UTC (rev 197507)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> PASS a.href = "https://www.my\"d(){}|~om?ain#com/path/testurl.html#middle" threw exception TypeError: Type error.
</span><span class="cx"> PASS a.href is 'https://www.my\"d(){}|~om?ain#com/path/testurl.html#middle'
</span><span class="cx"> Set hash to null
</span><del>-PASS a.href is 'https://www.mydomain.com/path/testurl.html#'
</del><ins>+PASS a.href is 'https://www.mydomain.com/path/testurl.html#null'
</ins><span class="cx"> Set hash to empty string
</span><span class="cx"> PASS a.href is 'https://www.mydomain.com/path/testurl.html#'
</span><span class="cx"> Add hash to mailto: protocol
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMURLsethrefattributehashhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hash.html (197506 => 197507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hash.html        2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hash.html        2016-03-03 17:25:26 UTC (rev 197507)
</span><span class="lines">@@ -34,13 +34,10 @@
</span><span class="cx"> a.hash = "#hash#value";
</span><span class="cx"> shouldBe("a.href", "'https://www.my\\\"d(){}|~om?ain#com/path/testurl.html#middle'");
</span><span class="cx">
</span><del>-// IE8 converts null to "null", which is not the right thing to do.
-// Firefox 3.5.2 removes the '#' at the end, and it should per
-// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes .
</del><span class="cx"> debug("Set hash to null");
</span><span class="cx"> a.href = "https://www.mydomain.com/path/testurl.html#middle";
</span><span class="cx"> a.hash = null;
</span><del>-shouldBe("a.href", "'https://www.mydomain.com/path/testurl.html#'");
</del><ins>+shouldBe("a.href", "'https://www.mydomain.com/path/testurl.html#null'");
</ins><span class="cx">
</span><span class="cx"> // Firefox 3.5.2 removes the '#' at the end, and it should per
</span><span class="cx"> // http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes .
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMURLsethrefattributehostexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-host-expected.txt (197506 => 197507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-host-expected.txt        2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-host-expected.txt        2016-03-03 17:25:26 UTC (rev 197507)
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx"> Colon without port number
</span><span class="cx"> PASS a.href is 'https://www.otherdomain.com:0/path/'
</span><span class="cx"> Set host to null
</span><del>-PASS a.href is 'https://www.mydomain.com:8080/path/'
</del><ins>+PASS a.href is 'https://null/path/'
</ins><span class="cx"> Set host to empty string
</span><span class="cx"> PASS a.href is 'https://www.mydomain.com:8080/path/'
</span><span class="cx"> Set host to URL with file: protocol
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMURLsethrefattributehosthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-host.html (197506 => 197507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-host.html        2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-host.html        2016-03-03 17:25:26 UTC (rev 197507)
</span><span class="lines">@@ -54,13 +54,10 @@
</span><span class="cx"> a.host = "www.otherdomain.com:";
</span><span class="cx"> shouldBe("a.href", "'https://www.otherdomain.com:0/path/'");
</span><span class="cx">
</span><del>-// IE8 converts null to "null", which is not the right thing to do.
-// Firefox 3.5.2 allows setting the host to null, which it shouldn't per
-// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes .
</del><span class="cx"> debug("Set host to null");
</span><span class="cx"> a.href = "https://www.mydomain.com:8080/path/";
</span><span class="cx"> a.host = null;
</span><del>-shouldBe("a.href", "'https://www.mydomain.com:8080/path/'");
</del><ins>+shouldBe("a.href", "'https://null/path/'");
</ins><span class="cx">
</span><span class="cx"> // Both IE8 and Firefox 3.5.2 allow setting the host to empty string, which they shouldn't, per
</span><span class="cx"> // http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes .
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMURLsethrefattributehostnameexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hostname-expected.txt (197506 => 197507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hostname-expected.txt        2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hostname-expected.txt        2016-03-03 17:25:26 UTC (rev 197507)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx"> Set hostname to URL with foo: protocol
</span><span class="cx"> PASS a.href is 'foo://www.otherdomain.com/path/'
</span><span class="cx"> Set hostname to null
</span><del>-PASS a.href is 'https://www.mydomain.com:8080/path/'
</del><ins>+PASS a.href is 'https://null:8080/path/'
</ins><span class="cx"> Set hostname to empty string
</span><span class="cx"> PASS a.href is 'https://www.mydomain.com:8080/path/'
</span><span class="cx"> Set hostname to URL with 2 colons
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMURLsethrefattributehostnamehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hostname.html (197506 => 197507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hostname.html        2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-hostname.html        2016-03-03 17:25:26 UTC (rev 197507)
</span><span class="lines">@@ -32,13 +32,10 @@
</span><span class="cx"> a.hostname = "www.otherdomain.com";
</span><span class="cx"> shouldBe("a.href", "'foo://www.otherdomain.com/path/'");
</span><span class="cx">
</span><del>-// IE8 converts null to "null", which is not the right thing to do.
-// Firefox 3.5.2 allows setting the hostname to null, which is wrong per
-// http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes .
</del><span class="cx"> debug("Set hostname to null");
</span><span class="cx"> a.href = "https://www.mydomain.com:8080/path/";
</span><span class="cx"> a.hostname = null;
</span><del>-shouldBe("a.href", "'https://www.mydomain.com:8080/path/'");
</del><ins>+shouldBe("a.href", "'https://null:8080/path/'");
</ins><span class="cx">
</span><span class="cx"> // Both IE8 and Firefox 3.5.2 allow setting the host to empty string, against the spec at
</span><span class="cx"> // http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes .
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMURLsethrefattributepathnameexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-pathname-expected.txt (197506 => 197507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-pathname-expected.txt        2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-pathname-expected.txt        2016-03-03 17:25:26 UTC (rev 197507)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx"> Set a pathname containing .. in it
</span><span class="cx"> PASS a.href is 'https://www.mydomain.com/path?key=value'
</span><span class="cx"> Set pathname to null
</span><del>-PASS a.href is 'https://www.mydomain.com/?key=value'
</del><ins>+PASS a.href is 'https://www.mydomain.com/null?key=value'
</ins><span class="cx"> Set pathname to empty string
</span><span class="cx"> PASS a.href is 'https://www.mydomain.com/?key=value'
</span><span class="cx"> Set pathname that includes illegal characters to URL that contains illegal characters.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMURLsethrefattributepathnamehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-pathname.html (197506 => 197507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-pathname.html        2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-pathname.html        2016-03-03 17:25:26 UTC (rev 197507)
</span><span class="lines">@@ -41,11 +41,10 @@
</span><span class="cx"> a.pathname = "/it/../path";
</span><span class="cx"> shouldBe("a.href", "'https://www.mydomain.com/path?key=value'");
</span><span class="cx">
</span><del>-// IE8 converts null to "null", which is not the right thing to do.
</del><span class="cx"> debug("Set pathname to null");
</span><span class="cx"> a.href = "https://www.mydomain.com/path/testurl.html?key=value";
</span><span class="cx"> a.pathname = null;
</span><del>-shouldBe("a.href", "'https://www.mydomain.com/?key=value'");
</del><ins>+shouldBe("a.href", "'https://www.mydomain.com/null?key=value'");
</ins><span class="cx">
</span><span class="cx"> debug("Set pathname to empty string");
</span><span class="cx"> a.href = "https://www.mydomain.com/?key=value";
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMURLsethrefattributeprotocolexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-protocol-expected.txt (197506 => 197507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-protocol-expected.txt        2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-protocol-expected.txt        2016-03-03 17:25:26 UTC (rev 197507)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx"> Set a protocol that starts with ':'
</span><span class="cx"> PASS a.href is 'https://www.mydomain.com/path/'
</span><span class="cx"> Set protocol to null
</span><del>-PASS a.href is 'https://www.mydomain.com/path/'
</del><ins>+PASS a.href is 'null://www.mydomain.com/path/'
</ins><span class="cx"> Set protocol to empty string
</span><span class="cx"> PASS a.href is 'https://www.mydomain.com/path/'
</span><span class="cx"> Set protocol to http on malformed URL
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMURLsethrefattributeprotocolhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-protocol.html (197506 => 197507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-protocol.html        2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-protocol.html        2016-03-03 17:25:26 UTC (rev 197507)
</span><span class="lines">@@ -53,11 +53,10 @@
</span><span class="cx"> debug("Exception: " + e.description);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-// IE8 converts null to "null", which is not the right thing to do.
</del><span class="cx"> debug("Set protocol to null");
</span><span class="cx"> a.href = "https://www.mydomain.com/path/";
</span><span class="cx"> a.protocol = null;
</span><del>-shouldBe("a.href", "'https://www.mydomain.com/path/'");
</del><ins>+shouldBe("a.href", "'null://www.mydomain.com/path/'");
</ins><span class="cx">
</span><span class="cx"> // IE8 throws "Invalid argument" exception.
</span><span class="cx"> try {
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMURLsethrefattributesearchexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-search-expected.txt (197506 => 197507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-search-expected.txt        2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-search-expected.txt        2016-03-03 17:25:26 UTC (rev 197507)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx"> Set search to a malformed URL
</span><span class="cx"> PASS a.href is 'bad:/|/url?value=key'
</span><span class="cx"> Set search to null
</span><del>-PASS a.href is 'https://www.mydomain.com/path/'
</del><ins>+PASS a.href is 'https://www.mydomain.com/path/?null'
</ins><span class="cx"> Set search to empty string
</span><span class="cx"> PASS a.href is 'https://www.mydomain.com/path/?'
</span><span class="cx"> PASS successfullyParsed is true
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMURLsethrefattributesearchhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-search.html (197506 => 197507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-search.html        2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/LayoutTests/fast/dom/DOMURL/set-href-attribute-search.html        2016-03-03 17:25:26 UTC (rev 197507)
</span><span class="lines">@@ -42,11 +42,10 @@
</span><span class="cx"> a.search = "?value=key";
</span><span class="cx"> shouldBe("a.href", "'bad:/|/url?value=key'");
</span><span class="cx">
</span><del>-// IE8 converts null to "null", which is not the right thing to do.
</del><span class="cx"> debug("Set search to null");
</span><span class="cx"> a.href = "https://www.mydomain.com/path/?key=value";
</span><span class="cx"> a.search = null;
</span><del>-shouldBe("a.href", "'https://www.mydomain.com/path/'");
</del><ins>+shouldBe("a.href", "'https://www.mydomain.com/path/?null'");
</ins><span class="cx">
</span><span class="cx"> // Firefox 3.5.2 Removes the '?', and it shouldn't, per
</span><span class="cx"> // http://dev.w3.org/html5/spec/infrastructure.html#url-decomposition-idl-attributes .
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (197506 => 197507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/Source/WebCore/ChangeLog        2016-03-03 17:25:26 UTC (rev 197507)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2016-03-03 Chris Dumez <cdumez@apple.com>
+
+ Drop [TreatNullAs=EmptyString] from URL interface attributes
+ https://bugs.webkit.org/show_bug.cgi?id=154951
+
+ Reviewed by Darin Adler.
+
+ Drop [TreatNullAs=EmptyString] from URL interface attributes to match
+ the specification:
+ - https://url.spec.whatwg.org/#api
+
+ Firefox and Chrome both already follow the specification and convert
+ null to the "null" string.
+
+ No new tests, already covered by existing tests.
+
+ * html/URLUtils.idl:
+
</ins><span class="cx"> 2016-03-03 Miguel Gomez <magomez@igalia.com>
</span><span class="cx">
</span><span class="cx"> [TextureMapper] Use RGBA format for textures attached to framebuffers
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlURLUtilsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/URLUtils.idl (197506 => 197507)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/URLUtils.idl        2016-03-03 17:09:49 UTC (rev 197506)
+++ trunk/Source/WebCore/html/URLUtils.idl        2016-03-03 17:25:26 UTC (rev 197507)
</span><span class="lines">@@ -32,16 +32,13 @@
</span><span class="cx">
</span><span class="cx"> readonly attribute DOMString origin;
</span><span class="cx">
</span><del>- // FIXME: These should not have [TreatNullAs=EmptyString].
- [TreatNullAs=EmptyString] attribute DOMString protocol;
- [TreatNullAs=EmptyString] attribute DOMString username;
- [TreatNullAs=EmptyString] attribute DOMString password;
- [TreatNullAs=EmptyString] attribute DOMString host;
- [TreatNullAs=EmptyString] attribute DOMString hostname;
- [TreatNullAs=EmptyString] attribute DOMString port;
- [TreatNullAs=EmptyString] attribute DOMString pathname;
- [TreatNullAs=EmptyString] attribute DOMString hash;
-
- // FIXME: This should not have [TreatNullAs=NullString].
- [TreatNullAs=LegacyNullString] attribute DOMString search;
</del><ins>+ attribute DOMString protocol;
+ attribute DOMString username;
+ attribute DOMString password;
+ attribute DOMString host;
+ attribute DOMString hostname;
+ attribute DOMString port;
+ attribute DOMString pathname;
+ attribute DOMString hash;
+ attribute DOMString search;
</ins><span class="cx"> };
</span></span></pre>
</div>
</div>
</body>
</html>