Add username / password attributes to HTMLAnchorElement / HTMLAreaElement
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Feb 2016 03:28:55 +0000 (03:28 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Feb 2016 03:28:55 +0000 (03:28 +0000)
commit60f8448e7e510d7db0520662600058f247e6f300
treea04b7728e903a226e8e14c5e35c6f6621f6e54c0
parentda15f2de197ad1b922f7b3b6764807b863065748
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196890 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hash.js
LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-host.js
LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hostname.js
LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-pathname.js
LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-protocol.js
LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-search.js
LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hash-expected.txt
LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt
LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-hostname-expected.txt
LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-pathname-expected.txt
LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt
LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-search-expected.txt
LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-user-pass-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-user-pass.html [new file with mode: 0644]
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/html/HTMLAnchorElement.cpp
Source/WebCore/html/HTMLAnchorElement.h
Source/WebCore/html/HTMLAnchorElement.idl
Source/WebCore/html/HTMLAreaElement.idl
Source/WebCore/html/HTMLHyperlinkElementUtils.idl [new file with mode: 0644]