<!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>[196890] 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/196890">196890</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-02-21 19:28:55 -0800 (Sun, 21 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add username / password attributes to HTMLAnchorElement / HTMLAreaElement
https://bugs.webkit.org/show_bug.cgi?id=154519

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline now that more checks are passing.

* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

Add username / password attributes to HTMLAnchorElement / HTMLAreaElement as per:
https://html.spec.whatwg.org/#htmlhyperlinkelementutils

Firefox and Chrome already implement these.

Also stop treating null as the empty string for the HTMLHyperlinkElementUtils
attributes. This behavior does not match the specification or other browsers
(tested Firefox and Chrome).

Test: fast/dom/HTMLAnchorElement/set-href-attribute-user-pass.html

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::username):
(WebCore::HTMLAnchorElement::setUsername):
(WebCore::HTMLAnchorElement::password):
(WebCore::HTMLAnchorElement::setPassword):
* html/HTMLAnchorElement.h:
* html/HTMLAnchorElement.idl:
* html/HTMLAreaElement.idl:
* html/HTMLHyperlinkElementUtils.idl: Added.

LayoutTests:

* fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hash.js:
* fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-host.js:
* fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hostname.js:
* fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-pathname.js:
* fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-protocol.js:
* fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-search.js:
* fast/dom/HTMLAnchorElement/set-href-attribute-hash-expected.txt:
* fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt:
* fast/dom/HTMLAnchorElement/set-href-attribute-hostname-expected.txt:
* fast/dom/HTMLAnchorElement/set-href-attribute-pathname-expected.txt:
* fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt:
* fast/dom/HTMLAnchorElement/set-href-attribute-search-expected.txt:
Update / rebaseline tests now that we no longer treat null as the empty string.

* fast/dom/HTMLAnchorElement/set-href-attribute-user-pass-expected.txt: Added.
* fast/dom/HTMLAnchorElement/set-href-attribute-user-pass.html: Added.
Add test coverage for setting the username / password attributes.

* js/dom/dom-static-property-for-in-iteration-expected.txt:
Rebaseline now that HTMLAnchorElement / HTMLAreaElement have 2 additional
attributes: username and password.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLAnchorElementscripttestssethrefattributehashjs">trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hash.js</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLAnchorElementscripttestssethrefattributehostjs">trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-host.js</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLAnchorElementscripttestssethrefattributehostnamejs">trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hostname.js</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLAnchorElementscripttestssethrefattributepathnamejs">trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-pathname.js</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLAnchorElementscripttestssethrefattributeprotocoljs">trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-protocol.js</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLAnchorElementscripttestssethrefattributesearchjs">trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-search.js</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLAnchorElementsethrefattributehashexpectedtxt">trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hash-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLAnchorElementsethrefattributehostexpectedtxt">trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLAnchorElementsethrefattributehostnameexpectedtxt">trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hostname-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLAnchorElementsethrefattributepathnameexpectedtxt">trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLAnchorElementsethrefattributeprotocolexpectedtxt">trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLAnchorElementsethrefattributesearchexpectedtxt">trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmldominterfacesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdomdomstaticpropertyforiniterationexpectedtxt">trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAnchorElementcpp">trunk/Source/WebCore/html/HTMLAnchorElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAnchorElementh">trunk/Source/WebCore/html/HTMLAnchorElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAnchorElementidl">trunk/Source/WebCore/html/HTMLAnchorElement.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAreaElementidl">trunk/Source/WebCore/html/HTMLAreaElement.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastdomHTMLAnchorElementsethrefattributeuserpassexpectedtxt">trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-user-pass-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLAnchorElementsethrefattributeuserpasshtml">trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-user-pass.html</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLHyperlinkElementUtilsidl">trunk/Source/WebCore/html/HTMLHyperlinkElementUtils.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/LayoutTests/ChangeLog        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -1,5 +1,34 @@
</span><span class="cx"> 2016-02-21  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Add username / password attributes to HTMLAnchorElement / HTMLAreaElement
+        https://bugs.webkit.org/show_bug.cgi?id=154519
+
+        Reviewed by Sam Weinig.
+
+        * fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hash.js:
+        * fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-host.js:
+        * fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hostname.js:
+        * fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-pathname.js:
+        * fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-protocol.js:
+        * fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-search.js:
+        * fast/dom/HTMLAnchorElement/set-href-attribute-hash-expected.txt:
+        * fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt:
+        * fast/dom/HTMLAnchorElement/set-href-attribute-hostname-expected.txt:
+        * fast/dom/HTMLAnchorElement/set-href-attribute-pathname-expected.txt:
+        * fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt:
+        * fast/dom/HTMLAnchorElement/set-href-attribute-search-expected.txt:
+        Update / rebaseline tests now that we no longer treat null as the empty string.
+
+        * fast/dom/HTMLAnchorElement/set-href-attribute-user-pass-expected.txt: Added.
+        * fast/dom/HTMLAnchorElement/set-href-attribute-user-pass.html: Added.
+        Add test coverage for setting the username / password attributes.
+
+        * js/dom/dom-static-property-for-in-iteration-expected.txt:
+        Rebaseline now that HTMLAnchorElement / HTMLAreaElement have 2 additional
+        attributes: username and password.
+
+2016-02-21  Chris Dumez  &lt;cdumez@apple.com&gt;
+
</ins><span class="cx">         iframe/frame/object.contentDocument should be on the prototype
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=154409
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLAnchorElementscripttestssethrefattributehashjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hash.js (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hash.js        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hash.js        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -24,13 +24,10 @@
</span><span class="cx"> a.hash = &quot;#hash#value&quot;;
</span><span class="cx"> shouldBe(&quot;a.href&quot;, &quot;'https://www.my\&quot;d(){}|~om?ain#com/path/testurl.html#middle'&quot;);
</span><span class="cx"> 
</span><del>-// IE8 converts null to &quot;null&quot;, 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(&quot;Set hash to null&quot;);
</span><span class="cx"> a.href = &quot;https://www.mydomain.com/path/testurl.html#middle&quot;;
</span><span class="cx"> a.hash = null;
</span><del>-shouldBe(&quot;a.href&quot;, &quot;'https://www.mydomain.com/path/testurl.html#'&quot;);
</del><ins>+shouldBe(&quot;a.href&quot;, &quot;'https://www.mydomain.com/path/testurl.html#null'&quot;);
</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="trunkLayoutTestsfastdomHTMLAnchorElementscripttestssethrefattributehostjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-host.js (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-host.js        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-host.js        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -45,13 +45,10 @@
</span><span class="cx"> a.host = &quot;www.otherdomain.com:&quot;;
</span><span class="cx"> shouldBe(&quot;a.href&quot;, &quot;'https://www.otherdomain.com:0/path/'&quot;);
</span><span class="cx"> 
</span><del>-// IE8 converts null to &quot;null&quot;, 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(&quot;Set host to null&quot;);
</span><span class="cx"> a.href = &quot;https://www.mydomain.com:8080/path/&quot;;
</span><span class="cx"> a.host = null;
</span><del>-shouldBe(&quot;a.href&quot;, &quot;'https://www.mydomain.com:8080/path/'&quot;);
</del><ins>+shouldBe(&quot;a.href&quot;, &quot;'https://null/path/'&quot;);
</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="trunkLayoutTestsfastdomHTMLAnchorElementscripttestssethrefattributehostnamejs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hostname.js (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hostname.js        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hostname.js        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -23,13 +23,10 @@
</span><span class="cx"> a.hostname = &quot;www.otherdomain.com&quot;;
</span><span class="cx"> shouldBe(&quot;a.href&quot;, &quot;'foo://www.otherdomain.com/path/'&quot;);
</span><span class="cx"> 
</span><del>-// IE8 converts null to &quot;null&quot;, 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(&quot;Set hostname to null&quot;);
</span><span class="cx"> a.href = &quot;https://www.mydomain.com:8080/path/&quot;;
</span><span class="cx"> a.hostname = null;
</span><del>-shouldBe(&quot;a.href&quot;, &quot;'https://www.mydomain.com:8080/path/'&quot;);
</del><ins>+shouldBe(&quot;a.href&quot;, &quot;'https://null:8080/path/'&quot;);
</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="trunkLayoutTestsfastdomHTMLAnchorElementscripttestssethrefattributepathnamejs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-pathname.js (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-pathname.js        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-pathname.js        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -32,11 +32,10 @@
</span><span class="cx"> a.pathname = &quot;/it/../path&quot;;
</span><span class="cx"> shouldBe(&quot;a.href&quot;, &quot;'https://www.mydomain.com/path?key=value'&quot;);
</span><span class="cx"> 
</span><del>-// IE8 converts null to &quot;null&quot;, which is not the right thing to do.
</del><span class="cx"> debug(&quot;Set pathname to null&quot;);
</span><span class="cx"> a.href = &quot;https://www.mydomain.com/path/testurl.html?key=value&quot;;
</span><span class="cx"> a.pathname = null;
</span><del>-shouldBe(&quot;a.href&quot;, &quot;'https://www.mydomain.com/?key=value'&quot;);
</del><ins>+shouldBe(&quot;a.href&quot;, &quot;'https://www.mydomain.com/null?key=value'&quot;);
</ins><span class="cx"> 
</span><span class="cx"> debug(&quot;Set pathname to empty string&quot;);
</span><span class="cx"> a.href = &quot;https://www.mydomain.com/?key=value&quot;;
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLAnchorElementscripttestssethrefattributeprotocoljs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-protocol.js (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-protocol.js        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-protocol.js        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -44,11 +44,10 @@
</span><span class="cx"> debug(&quot;Exception: &quot; + e.description);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// IE8 converts null to &quot;null&quot;, which is not the right thing to do.
</del><span class="cx"> debug(&quot;Set protocol to null&quot;);
</span><span class="cx"> a.href = &quot;https://www.mydomain.com/path/&quot;;
</span><span class="cx"> a.protocol = null;
</span><del>-shouldBe(&quot;a.href&quot;, &quot;'https://www.mydomain.com/path/'&quot;);
</del><ins>+shouldBe(&quot;a.href&quot;, &quot;'null://www.mydomain.com/path/'&quot;);
</ins><span class="cx"> 
</span><span class="cx"> // IE8 throws &quot;Invalid argument&quot; exception.
</span><span class="cx"> try {
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLAnchorElementscripttestssethrefattributesearchjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-search.js (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-search.js        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-search.js        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -33,11 +33,10 @@
</span><span class="cx"> a.search = &quot;?value=key&quot;;
</span><span class="cx"> shouldBe(&quot;a.href&quot;, &quot;'bad:/|/url?value=key'&quot;);
</span><span class="cx"> 
</span><del>-// IE8 converts null to &quot;null&quot;, which is not the right thing to do.
</del><span class="cx"> debug(&quot;Set search to null&quot;);
</span><span class="cx"> a.href = &quot;https://www.mydomain.com/path/?key=value&quot;;
</span><span class="cx"> a.search = null;
</span><del>-shouldBe(&quot;a.href&quot;, &quot;'https://www.mydomain.com/path/'&quot;);
</del><ins>+shouldBe(&quot;a.href&quot;, &quot;'https://www.mydomain.com/path/?null'&quot;);
</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="trunkLayoutTestsfastdomHTMLAnchorElementsethrefattributehashexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hash-expected.txt (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hash-expected.txt        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hash-expected.txt        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx"> '#' in hash value, and illegal characters in hostname
</span><span class="cx"> PASS a.href is 'https://www.my&quot;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="trunkLayoutTestsfastdomHTMLAnchorElementsethrefattributehostexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt        2016-02-22 03:28:55 UTC (rev 196890)
</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="trunkLayoutTestsfastdomHTMLAnchorElementsethrefattributehostnameexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hostname-expected.txt (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hostname-expected.txt        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hostname-expected.txt        2016-02-22 03:28:55 UTC (rev 196890)
</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="trunkLayoutTestsfastdomHTMLAnchorElementsethrefattributepathnameexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname-expected.txt (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname-expected.txt        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname-expected.txt        2016-02-22 03:28:55 UTC (rev 196890)
</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="trunkLayoutTestsfastdomHTMLAnchorElementsethrefattributeprotocolexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt        2016-02-22 03:28:55 UTC (rev 196890)
</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="trunkLayoutTestsfastdomHTMLAnchorElementsethrefattributesearchexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search-expected.txt (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search-expected.txt        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search-expected.txt        2016-02-22 03:28:55 UTC (rev 196890)
</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="trunkLayoutTestsfastdomHTMLAnchorElementsethrefattributeuserpassexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-user-pass-expected.txt (0 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-user-pass-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-user-pass-expected.txt        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+Test setting the username / password attributes of the URL in HTMLAnchorElement.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS a.href is 'https://user@www.mydomain.com:8080/path/testurl.html#middle'
+PASS a.href is 'https://user:password@www.mydomain.com:8080/path/testurl.html#middle'
+PASS a.href is 'https://null:password@www.mydomain.com:8080/path/testurl.html#middle'
+PASS a.href is 'https://null:null@www.mydomain.com:8080/path/testurl.html#middle'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLAnchorElementsethrefattributeuserpasshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-user-pass.html (0 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-user-pass.html                                (rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-user-pass.html        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description('Test setting the username / password attributes of the URL in HTMLAnchorElement.');
+
+var a = document.createElement('a');
+
+a.href = &quot;https://www.mydomain.com:8080/path/testurl.html#middle&quot;;
+a.username = &quot;user&quot;;
+shouldBe(&quot;a.href&quot;, &quot;'https://user@www.mydomain.com:8080/path/testurl.html#middle'&quot;);
+
+a.password = &quot;password&quot;;
+shouldBe(&quot;a.href&quot;, &quot;'https://user:password@www.mydomain.com:8080/path/testurl.html#middle'&quot;);
+
+a.username = null;
+shouldBe(&quot;a.href&quot;, &quot;'https://null:password@www.mydomain.com:8080/path/testurl.html#middle'&quot;);
+
+a.password = null;
+shouldBe(&quot;a.href&quot;, &quot;'https://null:null@www.mydomain.com:8080/path/testurl.html#middle'&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -1,5 +1,16 @@
</span><span class="cx"> 2016-02-21  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Add username / password attributes to HTMLAnchorElement / HTMLAreaElement
+        https://bugs.webkit.org/show_bug.cgi?id=154519
+
+        Reviewed by Sam Weinig.
+
+        Rebaseline now that more checks are passing.
+
+        * web-platform-tests/html/dom/interfaces-expected.txt:
+
+2016-02-21  Chris Dumez  &lt;cdumez@apple.com&gt;
+
</ins><span class="cx">         iframe/frame/object.contentDocument should be on the prototype
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=154409
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmldominterfacesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -1607,8 +1607,8 @@
</span><span class="cx"> PASS HTMLAnchorElement interface: attribute href 
</span><span class="cx"> PASS HTMLAnchorElement interface: attribute origin 
</span><span class="cx"> PASS HTMLAnchorElement interface: attribute protocol 
</span><del>-FAIL HTMLAnchorElement interface: attribute username assert_true: The prototype object must have a property &quot;username&quot; expected true got false
-FAIL HTMLAnchorElement interface: attribute password assert_true: The prototype object must have a property &quot;password&quot; expected true got false
</del><ins>+PASS HTMLAnchorElement interface: attribute username 
+PASS HTMLAnchorElement interface: attribute password 
</ins><span class="cx"> PASS HTMLAnchorElement interface: attribute host 
</span><span class="cx"> PASS HTMLAnchorElement interface: attribute hostname 
</span><span class="cx"> PASS HTMLAnchorElement interface: attribute port 
</span><span class="lines">@@ -1633,8 +1633,8 @@
</span><span class="cx"> PASS HTMLAnchorElement interface: document.createElement(&quot;a&quot;) must inherit property &quot;href&quot; with the proper type (13) 
</span><span class="cx"> PASS HTMLAnchorElement interface: document.createElement(&quot;a&quot;) must inherit property &quot;origin&quot; with the proper type (14) 
</span><span class="cx"> PASS HTMLAnchorElement interface: document.createElement(&quot;a&quot;) must inherit property &quot;protocol&quot; with the proper type (15) 
</span><del>-FAIL HTMLAnchorElement interface: document.createElement(&quot;a&quot;) must inherit property &quot;username&quot; with the proper type (16) assert_inherits: property &quot;username&quot; not found in prototype chain
-FAIL HTMLAnchorElement interface: document.createElement(&quot;a&quot;) must inherit property &quot;password&quot; with the proper type (17) assert_inherits: property &quot;password&quot; not found in prototype chain
</del><ins>+PASS HTMLAnchorElement interface: document.createElement(&quot;a&quot;) must inherit property &quot;username&quot; with the proper type (16) 
+PASS HTMLAnchorElement interface: document.createElement(&quot;a&quot;) must inherit property &quot;password&quot; with the proper type (17) 
</ins><span class="cx"> PASS HTMLAnchorElement interface: document.createElement(&quot;a&quot;) must inherit property &quot;host&quot; with the proper type (18) 
</span><span class="cx"> PASS HTMLAnchorElement interface: document.createElement(&quot;a&quot;) must inherit property &quot;hostname&quot; with the proper type (19) 
</span><span class="cx"> PASS HTMLAnchorElement interface: document.createElement(&quot;a&quot;) must inherit property &quot;port&quot; with the proper type (20) 
</span><span class="lines">@@ -2476,16 +2476,16 @@
</span><span class="cx"> PASS HTMLAreaElement interface: attribute relList 
</span><span class="cx"> PASS HTMLAreaElement interface: attribute noHref 
</span><span class="cx"> PASS HTMLAreaElement interface: attribute href 
</span><del>-FAIL HTMLAreaElement interface: attribute origin assert_true: The prototype object must have a property &quot;origin&quot; expected true got false
-FAIL HTMLAreaElement interface: attribute protocol assert_equals: setter must be function for PutForwards, Replaceable, or non-readonly attributes expected &quot;function&quot; but got &quot;undefined&quot;
-FAIL HTMLAreaElement interface: attribute username assert_true: The prototype object must have a property &quot;username&quot; expected true got false
-FAIL HTMLAreaElement interface: attribute password assert_true: The prototype object must have a property &quot;password&quot; expected true got false
-FAIL HTMLAreaElement interface: attribute host assert_equals: setter must be function for PutForwards, Replaceable, or non-readonly attributes expected &quot;function&quot; but got &quot;undefined&quot;
-FAIL HTMLAreaElement interface: attribute hostname assert_equals: setter must be function for PutForwards, Replaceable, or non-readonly attributes expected &quot;function&quot; but got &quot;undefined&quot;
-FAIL HTMLAreaElement interface: attribute port assert_equals: setter must be function for PutForwards, Replaceable, or non-readonly attributes expected &quot;function&quot; but got &quot;undefined&quot;
-FAIL HTMLAreaElement interface: attribute pathname assert_equals: setter must be function for PutForwards, Replaceable, or non-readonly attributes expected &quot;function&quot; but got &quot;undefined&quot;
-FAIL HTMLAreaElement interface: attribute search assert_equals: setter must be function for PutForwards, Replaceable, or non-readonly attributes expected &quot;function&quot; but got &quot;undefined&quot;
-FAIL HTMLAreaElement interface: attribute hash assert_equals: setter must be function for PutForwards, Replaceable, or non-readonly attributes expected &quot;function&quot; but got &quot;undefined&quot;
</del><ins>+FAIL HTMLAreaElement interface: attribute origin assert_equals: setter must be function for PutForwards, Replaceable, or non-readonly attributes expected &quot;function&quot; but got &quot;undefined&quot;
+PASS HTMLAreaElement interface: attribute protocol 
+PASS HTMLAreaElement interface: attribute username 
+PASS HTMLAreaElement interface: attribute password 
+PASS HTMLAreaElement interface: attribute host 
+PASS HTMLAreaElement interface: attribute hostname 
+PASS HTMLAreaElement interface: attribute port 
+PASS HTMLAreaElement interface: attribute pathname 
+PASS HTMLAreaElement interface: attribute search 
+PASS HTMLAreaElement interface: attribute hash 
</ins><span class="cx"> PASS HTMLAreaElement must be primary interface of document.createElement(&quot;area&quot;) 
</span><span class="cx"> PASS Stringification of document.createElement(&quot;area&quot;) 
</span><span class="cx"> PASS HTMLAreaElement interface: document.createElement(&quot;area&quot;) must inherit property &quot;alt&quot; with the proper type (0) 
</span><span class="lines">@@ -2498,10 +2498,10 @@
</span><span class="cx"> PASS HTMLAreaElement interface: document.createElement(&quot;area&quot;) must inherit property &quot;relList&quot; with the proper type (7) 
</span><span class="cx"> PASS HTMLAreaElement interface: document.createElement(&quot;area&quot;) must inherit property &quot;noHref&quot; with the proper type (8) 
</span><span class="cx"> PASS HTMLAreaElement interface: document.createElement(&quot;area&quot;) must inherit property &quot;href&quot; with the proper type (9) 
</span><del>-FAIL HTMLAreaElement interface: document.createElement(&quot;area&quot;) must inherit property &quot;origin&quot; with the proper type (10) assert_inherits: property &quot;origin&quot; not found in prototype chain
</del><ins>+PASS HTMLAreaElement interface: document.createElement(&quot;area&quot;) must inherit property &quot;origin&quot; with the proper type (10) 
</ins><span class="cx"> PASS HTMLAreaElement interface: document.createElement(&quot;area&quot;) must inherit property &quot;protocol&quot; with the proper type (11) 
</span><del>-FAIL HTMLAreaElement interface: document.createElement(&quot;area&quot;) must inherit property &quot;username&quot; with the proper type (12) assert_inherits: property &quot;username&quot; not found in prototype chain
-FAIL HTMLAreaElement interface: document.createElement(&quot;area&quot;) must inherit property &quot;password&quot; with the proper type (13) assert_inherits: property &quot;password&quot; not found in prototype chain
</del><ins>+PASS HTMLAreaElement interface: document.createElement(&quot;area&quot;) must inherit property &quot;username&quot; with the proper type (12) 
+PASS HTMLAreaElement interface: document.createElement(&quot;area&quot;) must inherit property &quot;password&quot; with the proper type (13) 
</ins><span class="cx"> PASS HTMLAreaElement interface: document.createElement(&quot;area&quot;) must inherit property &quot;host&quot; with the proper type (14) 
</span><span class="cx"> PASS HTMLAreaElement interface: document.createElement(&quot;area&quot;) must inherit property &quot;hostname&quot; with the proper type (15) 
</span><span class="cx"> PASS HTMLAreaElement interface: document.createElement(&quot;area&quot;) must inherit property &quot;port&quot; with the proper type (16) 
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomdomstaticpropertyforiniterationexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -19,15 +19,17 @@
</span><span class="cx"> PASS a[&quot;shape&quot;] is 
</span><span class="cx"> PASS a[&quot;target&quot;] is 
</span><span class="cx"> PASS a[&quot;type&quot;] is 
</span><del>-PASS a[&quot;hash&quot;] is 
</del><ins>+PASS a[&quot;text&quot;] is nerget
+PASS a[&quot;relList&quot;] is 
+PASS a[&quot;origin&quot;] is file://
+PASS a[&quot;protocol&quot;] is file:
+PASS a[&quot;username&quot;] is 
+PASS a[&quot;password&quot;] is 
</ins><span class="cx"> PASS a[&quot;host&quot;] is 
</span><span class="cx"> PASS a[&quot;hostname&quot;] is 
</span><span class="cx"> PASS a[&quot;port&quot;] is 
</span><del>-PASS a[&quot;protocol&quot;] is file:
</del><span class="cx"> PASS a[&quot;search&quot;] is 
</span><del>-PASS a[&quot;origin&quot;] is file://
-PASS a[&quot;text&quot;] is nerget
-PASS a[&quot;relList&quot;] is 
</del><ins>+PASS a[&quot;hash&quot;] is 
</ins><span class="cx"> PASS a[&quot;title&quot;] is 
</span><span class="cx"> PASS a[&quot;lang&quot;] is 
</span><span class="cx"> PASS a[&quot;translate&quot;] is true
</span><span class="lines">@@ -47,7 +49,7 @@
</span><span class="cx"> PASS a[&quot;style&quot;] is [object CSSStyleDeclaration]
</span><span class="cx"> PASS a[&quot;id&quot;] is foo
</span><span class="cx"> PASS a[&quot;offsetLeft&quot;] is 8
</span><del>-PASS a[&quot;offsetTop&quot;] is 744
</del><ins>+PASS a[&quot;offsetTop&quot;] is 774
</ins><span class="cx"> PASS a[&quot;offsetWidth&quot;] is 40
</span><span class="cx"> PASS a[&quot;offsetHeight&quot;] is 18
</span><span class="cx"> PASS a[&quot;clientLeft&quot;] is 0
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -462,6 +462,7 @@
</span><span class="cx">     html/HTMLHeadElement.idl
</span><span class="cx">     html/HTMLHeadingElement.idl
</span><span class="cx">     html/HTMLHtmlElement.idl
</span><ins>+    html/HTMLHyperlinkElementUtils.idl
</ins><span class="cx">     html/HTMLIFrameElement.idl
</span><span class="cx">     html/HTMLImageElement.idl
</span><span class="cx">     html/HTMLInputElement.idl
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/Source/WebCore/ChangeLog        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -1,5 +1,36 @@
</span><span class="cx"> 2016-02-21  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Add username / password attributes to HTMLAnchorElement / HTMLAreaElement
+        https://bugs.webkit.org/show_bug.cgi?id=154519
+
+        Reviewed by Sam Weinig.
+
+        Add username / password attributes to HTMLAnchorElement / HTMLAreaElement as per:
+        https://html.spec.whatwg.org/#htmlhyperlinkelementutils
+
+        Firefox and Chrome already implement these.
+
+        Also stop treating null as the empty string for the HTMLHyperlinkElementUtils
+        attributes. This behavior does not match the specification or other browsers
+        (tested Firefox and Chrome).
+
+        Test: fast/dom/HTMLAnchorElement/set-href-attribute-user-pass.html
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * html/HTMLAnchorElement.cpp:
+        (WebCore::HTMLAnchorElement::username):
+        (WebCore::HTMLAnchorElement::setUsername):
+        (WebCore::HTMLAnchorElement::password):
+        (WebCore::HTMLAnchorElement::setPassword):
+        * html/HTMLAnchorElement.h:
+        * html/HTMLAnchorElement.idl:
+        * html/HTMLAreaElement.idl:
+        * html/HTMLHyperlinkElementUtils.idl: Added.
+
+2016-02-21  Chris Dumez  &lt;cdumez@apple.com&gt;
+
</ins><span class="cx">         iframe/frame/object.contentDocument should be on the prototype
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=154409
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/Source/WebCore/DerivedSources.make        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -376,6 +376,7 @@
</span><span class="cx">     $(WebCore)/html/HTMLHeadElement.idl \
</span><span class="cx">     $(WebCore)/html/HTMLHeadingElement.idl \
</span><span class="cx">     $(WebCore)/html/HTMLHtmlElement.idl \
</span><ins>+    $(WebCore)/html/HTMLHyperlinkElementUtils.idl \
</ins><span class="cx">     $(WebCore)/html/HTMLIFrameElement.idl \
</span><span class="cx">     $(WebCore)/html/HTMLImageElement.idl \
</span><span class="cx">     $(WebCore)/html/HTMLInputElement.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -10518,6 +10518,7 @@
</span><span class="cx">                 830784B01C52EE1900104D1D /* XMLDocument.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = XMLDocument.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 830784B11C52EE1900104D1D /* XMLDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLDocument.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 831D1F291C56ECA000F5F6C0 /* HTMLDataElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLDataElement.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                8329DCC21C7A6AE300730B33 /* HTMLHyperlinkElementUtils.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLHyperlinkElementUtils.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 832B843319D8E55100B26055 /* SVGAnimateElementBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimateElementBase.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 832B843519D8E57400B26055 /* SVGAnimateElementBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimateElementBase.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 8348BFA91B85729500912F36 /* ClassCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClassCollection.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -19194,6 +19195,7 @@
</span><span class="cx">                                 A871DE1A0A152AC800B12A68 /* HTMLHtmlElement.cpp */,
</span><span class="cx">                                 A871DE1B0A152AC800B12A68 /* HTMLHtmlElement.h */,
</span><span class="cx">                                 1A85B17D0A1B183600D8C87C /* HTMLHtmlElement.idl */,
</span><ins>+                                8329DCC21C7A6AE300730B33 /* HTMLHyperlinkElementUtils.idl */,
</ins><span class="cx">                                 A871DE180A152AC800B12A68 /* HTMLIFrameElement.cpp */,
</span><span class="cx">                                 A871DE1E0A152AC800B12A68 /* HTMLIFrameElement.h */,
</span><span class="cx">                                 855542970AA4938800BA89F2 /* HTMLIFrameElement.idl */,
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAnchorElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAnchorElement.cpp (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAnchorElement.cpp        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.cpp        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -391,6 +391,30 @@
</span><span class="cx">     setHref(url.string());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+String HTMLAnchorElement::username() const
+{
+    return href().encodedUser();
+}
+
+void HTMLAnchorElement::setUsername(const String&amp; value)
+{
+    URL url = href();
+    url.setUser(value);
+    setHref(url.string());
+}
+
+String HTMLAnchorElement::password() const
+{
+    return href().encodedPass();
+}
+
+void HTMLAnchorElement::setPassword(const String&amp; value)
+{
+    URL url = href();
+    url.setPass(value);
+    setHref(url.string());
+}
+
</ins><span class="cx"> String HTMLAnchorElement::hostname() const
</span><span class="cx"> {
</span><span class="cx">     return href().host();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAnchorElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAnchorElement.h (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAnchorElement.h        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.h        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -73,6 +73,12 @@
</span><span class="cx">     String host() const;
</span><span class="cx">     void setHost(const String&amp;);
</span><span class="cx"> 
</span><ins>+    String username() const;
+    void setUsername(const String&amp;);
+
+    String password() const;
+    void setPassword(const String&amp;);
+
</ins><span class="cx">     String hostname() const;
</span><span class="cx">     void setHostname(const String&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAnchorElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAnchorElement.idl (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAnchorElement.idl        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.idl        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -22,7 +22,6 @@
</span><span class="cx">     [Reflect] attribute DOMString charset;
</span><span class="cx">     [Reflect] attribute DOMString coords;
</span><span class="cx">     [Conditional=DOWNLOAD_ATTRIBUTE, Reflect] attribute DOMString download;
</span><del>-    [Reflect, URL] attribute DOMString href;
</del><span class="cx">     [Reflect] attribute DOMString hreflang;
</span><span class="cx">     [Reflect] attribute DOMString name;
</span><span class="cx"> 
</span><span class="lines">@@ -41,23 +40,8 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if defined(LANGUAGE_OBJECTIVE_C) &amp;&amp; LANGUAGE_OBJECTIVE_C
</span><del>-    readonly attribute DOMString hash;
-    readonly attribute DOMString host;
-    readonly attribute DOMString hostname;
-    readonly attribute DOMString pathname;
-    readonly attribute DOMString port;
-    readonly attribute DOMString protocol;
-    readonly attribute DOMString search;
</del><span class="cx">     readonly attribute DOMString text;
</span><span class="cx"> #else
</span><del>-    [TreatNullAs=NullString] attribute DOMString hash;
-    [TreatNullAs=NullString] attribute DOMString host;
-    [TreatNullAs=NullString] attribute DOMString hostname;
-    [TreatNullAs=NullString] attribute DOMString pathname;
-    [TreatNullAs=NullString] attribute DOMString port;
-    [TreatNullAs=NullString] attribute DOMString protocol;
-    [TreatNullAs=NullString] attribute DOMString search;
-    [TreatNullAs=NullString] readonly attribute DOMString origin;
</del><span class="cx">     [SetterRaisesException]  attribute DOMString text;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -73,3 +57,4 @@
</span><span class="cx">     [PutForwards=value] readonly attribute DOMTokenList relList;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+HTMLAnchorElement implements HTMLHyperlinkElementUtils;
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAreaElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAreaElement.idl (196889 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAreaElement.idl        2016-02-22 03:27:44 UTC (rev 196889)
+++ trunk/Source/WebCore/html/HTMLAreaElement.idl        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -21,7 +21,6 @@
</span><span class="cx"> interface HTMLAreaElement : HTMLElement {
</span><span class="cx">     [Reflect] attribute DOMString alt;
</span><span class="cx">     [Reflect] attribute DOMString coords;
</span><del>-    [Reflect, URL] attribute DOMString href;
</del><span class="cx">     [Reflect] attribute boolean noHref;
</span><span class="cx"> 
</span><span class="cx">     // FIXME: This is supposed to be:
</span><span class="lines">@@ -35,14 +34,6 @@
</span><span class="cx"> #if defined(LANGUAGE_OBJECTIVE_C) &amp;&amp; LANGUAGE_OBJECTIVE_C
</span><span class="cx">     [Reflect] attribute DOMString accessKey;
</span><span class="cx"> #endif
</span><del>-    // IE Extensions
-    readonly attribute DOMString hash;
-    readonly attribute DOMString host;
-    readonly attribute DOMString hostname;
-    readonly attribute DOMString pathname;
-    readonly attribute DOMString port;
-    readonly attribute DOMString protocol;
-    readonly attribute DOMString search;
</del><span class="cx"> 
</span><span class="cx"> #if defined(LANGUAGE_OBJECTIVE_C) &amp;&amp; LANGUAGE_OBJECTIVE_C
</span><span class="cx">     // Objective-C extension:
</span><span class="lines">@@ -52,3 +43,4 @@
</span><span class="cx">     [PutForwards=value] readonly attribute DOMTokenList relList;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+HTMLAreaElement implements HTMLHyperlinkElementUtils;
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLHyperlinkElementUtilsidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/html/HTMLHyperlinkElementUtils.idl (0 => 196890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLHyperlinkElementUtils.idl                                (rev 0)
+++ trunk/Source/WebCore/html/HTMLHyperlinkElementUtils.idl        2016-02-22 03:28:55 UTC (rev 196890)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    NoInterfaceObject
+] interface HTMLHyperlinkElementUtils {
+    [Reflect, URL] attribute DOMString href;
+    readonly attribute DOMString origin;
+
+#if defined(LANGUAGE_OBJECTIVE_C) &amp;&amp; LANGUAGE_OBJECTIVE_C
+    readonly attribute DOMString protocol;
+    readonly attribute DOMString host;
+    readonly attribute DOMString hostname;
+    readonly attribute DOMString port;
+    readonly attribute DOMString pathname;
+    readonly attribute DOMString search;
+    readonly attribute DOMString hash;
+#else
+    attribute DOMString protocol;
+    attribute DOMString username;
+    attribute DOMString password;
+    attribute DOMString host;
+    attribute DOMString hostname;
+    attribute DOMString port;
+    attribute DOMString pathname;
+    attribute DOMString search;
+    attribute DOMString hash;
+#endif
+};
</ins></span></pre>
</div>
</div>

</body>
</html>