Add relList to the anchor, area and link elements
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Oct 2014 09:22:05 +0000 (09:22 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Oct 2014 09:22:05 +0000 (09:22 +0000)
commit72926e39072050e21b54d31684f3c60051d29257
treee080f44e27ea82e93c388f561f8fbb2952626375
parent7186c31906b9c70bd9a5535466ab80e40f38ab4a
Add relList to the anchor, area and link elements
https://bugs.webkit.org/show_bug.cgi?id=137860

Patch by Dhi Aurrahman <diorahman@rockybars.com> on 2014-10-22
Reviewed by Darin Adler and Chris Dumez.

Source/WebCore:

Add relList to reflect the rel content attribute for anchor[1],
area[2] and link[3] elements.

[1] https://html.spec.whatwg.org/multipage/semantics.html#dom-a-rellist
[2] https://html.spec.whatwg.org/multipage/embedded-content.html#dom-area-rellist
[3] https://html.spec.whatwg.org/multipage/semantics.html#dom-link-rellist

Tests: fast/dom/rel-list-gc.html
       fast/dom/rel-list.html
       perf/rel-list-remove.html

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/SpaceSplitString.cpp:
(WebCore::SpaceSplitString::set):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAttribute):
(WebCore::HTMLAnchorElement::relList):
(WebCore::HTMLAnchorElement::setRel): Deleted.
* html/HTMLAnchorElement.h:
* html/HTMLAnchorElement.idl:
* html/HTMLAreaElement.idl:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::parseAttribute):
(WebCore::HTMLLinkElement::relList):
* html/HTMLLinkElement.h:
* html/HTMLLinkElement.idl:
* html/RelList.cpp: Added.
(WebCore::RelList::RelList):
(WebCore::RelList::ref):
(WebCore::RelList::deref):
(WebCore::RelList::length):
(WebCore::RelList::item):
(WebCore::RelList::element):
(WebCore::RelList::updateRelAttribute):
(WebCore::RelList::containsInternal):
(WebCore::RelList::value):
(WebCore::RelList::setValue):
* html/RelList.h: Added.

LayoutTests:

Tests relList aspects for anchor, area and list elements.
Update dom static property for-in iteration test result to include relList.

* fast/dom/rel-list-expected.txt: Added.
* fast/dom/rel-list-gc-expected.txt: Added.
* fast/dom/rel-list-gc.html: Added.
* fast/dom/rel-list.html: Added.
* js/dom/dom-static-property-for-in-iteration-expected.txt: Updated results.
* perf/rel-list-remove-expected.txt: Added.
* perf/rel-list-remove.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@175028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/rel-list-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/rel-list-gc-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/rel-list-gc.html [new file with mode: 0644]
LayoutTests/fast/dom/rel-list.html [new file with mode: 0644]
LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt
LayoutTests/perf/rel-list-remove-expected.txt [new file with mode: 0644]
LayoutTests/perf/rel-list-remove.html [new file with mode: 0644]
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/dom/SpaceSplitString.cpp
Source/WebCore/html/HTMLAnchorElement.cpp
Source/WebCore/html/HTMLAnchorElement.h
Source/WebCore/html/HTMLAnchorElement.idl
Source/WebCore/html/HTMLAreaElement.idl
Source/WebCore/html/HTMLLinkElement.cpp
Source/WebCore/html/HTMLLinkElement.h
Source/WebCore/html/HTMLLinkElement.idl
Source/WebCore/html/RelList.cpp [new file with mode: 0644]
Source/WebCore/html/RelList.h [new file with mode: 0644]