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