<!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>[175028] 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/175028">175028</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-10-22 02:22:05 -0700 (Wed, 22 Oct 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add relList to the anchor, area and link elements
https://bugs.webkit.org/show_bug.cgi?id=137860

Patch by Dhi Aurrahman &lt;diorahman@rockybars.com&gt; 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.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</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="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoredomSpaceSplitStringcpp">trunk/Source/WebCore/dom/SpaceSplitString.cpp</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>
<li><a href="#trunkSourceWebCorehtmlHTMLLinkElementcpp">trunk/Source/WebCore/html/HTMLLinkElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLLinkElementh">trunk/Source/WebCore/html/HTMLLinkElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLLinkElementidl">trunk/Source/WebCore/html/HTMLLinkElement.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastdomrellistexpectedtxt">trunk/LayoutTests/fast/dom/rel-list-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomrellistgcexpectedtxt">trunk/LayoutTests/fast/dom/rel-list-gc-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomrellistgchtml">trunk/LayoutTests/fast/dom/rel-list-gc.html</a></li>
<li><a href="#trunkLayoutTestsfastdomrellisthtml">trunk/LayoutTests/fast/dom/rel-list.html</a></li>
<li><a href="#trunkLayoutTestsperfrellistremoveexpectedtxt">trunk/LayoutTests/perf/rel-list-remove-expected.txt</a></li>
<li><a href="#trunkLayoutTestsperfrellistremovehtml">trunk/LayoutTests/perf/rel-list-remove.html</a></li>
<li><a href="#trunkSourceWebCorehtmlRelListcpp">trunk/Source/WebCore/html/RelList.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlRelListh">trunk/Source/WebCore/html/RelList.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (175027 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-10-22 07:29:26 UTC (rev 175027)
+++ trunk/LayoutTests/ChangeLog        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-10-22  Dhi Aurrahman  &lt;diorahman@rockybars.com&gt;
+
+        Add relList to the anchor, area and link elements
+        https://bugs.webkit.org/show_bug.cgi?id=137860
+
+        Reviewed by Darin Adler and Chris Dumez.
+
+        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.
+
</ins><span class="cx"> 2014-10-21  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] More rebaselines.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomrellistexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/rel-list-expected.txt (0 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/rel-list-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/dom/rel-list-expected.txt        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -0,0 +1,378 @@
</span><ins>+Tests that relList works on anchor, area and link elements
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Tests relList for anchor element
+PASS element.relList == null is false
+PASS element.relList == undefined is false
+PASS element.relList instanceof DOMTokenList is true
+PASS element.relList.length is 3
+PASS element.relList.contains(&quot;a&quot;) is true
+PASS element.relList.contains(&quot;b&quot;) is true
+PASS element.relList.contains(&quot;c&quot;) is true
+PASS element.relList.contains(&quot;d&quot;) is false
+PASS element.relList.length is 3
+PASS element.relList.contains(&quot;foo&quot;) is true
+PASS element.relList.contains(&quot;bar&quot;) is true
+PASS element.relList.contains(&quot;chocolate&quot;) is true
+PASS element.relList.contains(&quot;orange&quot;) is false
+PASS element.relList.length is 0
+PASS element.relList.length is 0
+PASS element.relList.length is 2
+PASS element.relList.contains(&quot;marshmallow&quot;) is true
+PASS element.relList.contains(&quot;chips&quot;) is true
+PASS element.relList.contains(&quot;orange&quot;) is false
+PASS String(element.relList) is &quot;x&quot;
+PASS element.relList.length is 0
+PASS element.relList.length is 1
+PASS element.relList.length is 2
+PASS element.relList.length is 2
+PASS element.rel is &quot;x&quot;
+PASS element.rel is &quot;x&quot;
+PASS element.rel is &quot;x  x&quot;
+PASS element.rel is &quot;y x&quot;
+PASS element.rel is &quot;&quot;
+PASS element.rel is &quot;&quot;
+PASS element.rel is &quot; y y &quot;
+PASS element.rel is &quot;y&quot;
+Ensure that we can handle empty rel correctly
+PASS element.relList.toggle('x') is true
+PASS element.rel is &quot;x&quot;
+PASS element.relList.toggle('x') is false
+PASS element.rel is &quot;&quot;
+PASS element.relList.contains(&quot;x&quot;) is false
+PASS element.relList[1] is undefined.
+PASS element.relList.contains(&quot;x&quot;) is false
+PASS element.relList.contains(&quot;x&quot;) is true
+Test toggle with force argument
+PASS element.relList.toggle('x', true) is true
+PASS element.rel is &quot;x&quot;
+PASS element.relList.toggle('x', true) is true
+PASS element.rel is &quot;x&quot;
+PASS element.relList.toggle('x', false) is false
+PASS element.rel is &quot;&quot;
+PASS element.relList.toggle('x', false) is false
+PASS element.rel is &quot;&quot;
+PASS element.relList.toggle(&quot;&quot;, true) threw exception Error: SyntaxError: DOM Exception 12.
+PASS element.relList.toggle(&quot;x y&quot;, false) threw exception Error: InvalidCharacterError: DOM Exception 5.
+Testing add in presence of trailing white spaces.
+PASS element.rel is &quot;x y&quot;
+PASS element.rel is &quot;x\ty&quot;
+PASS element.rel is &quot; y&quot;
+Test invalid tokens
+PASS element.relList.contains(&quot;&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS element.relList.contains(&quot;x y&quot;) threw exception Error: InvalidCharacterError: DOM Exception 5.
+PASS element.relList.add(&quot;&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS element.relList.add(&quot;x y&quot;) threw exception Error: InvalidCharacterError: DOM Exception 5.
+PASS element.relList.remove(&quot;&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS element.relList.remove(&quot;x y&quot;) threw exception Error: InvalidCharacterError: DOM Exception 5.
+PASS element.relList.toggle(&quot;&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+Indexing
+PASS element.relList[0] is &quot;x&quot;
+PASS element.relList.item(0) is &quot;x&quot;
+PASS element.relList[1] is &quot;x&quot;
+PASS element.relList.item(1) is &quot;x&quot;
+PASS element.relList[1] is &quot;y&quot;
+PASS element.relList.item(1) is &quot;y&quot;
+PASS element.relList[0] is undefined.
+PASS element.relList.item(0) is null
+PASS element.relList[4] is undefined.
+PASS element.relList.item(4) is null
+PASS element.relList[-1] is undefined.
+PASS element.relList.item(-1) is null
+PASS element.relList.item() threw exception TypeError: Not enough arguments.
+Test case since DOMTokenList is case sensitive
+PASS element.relList.contains(&quot;x&quot;) is true
+PASS element.relList.contains(&quot;X&quot;) is false
+PASS element.relList[0] is &quot;x&quot;
+PASS element.relList.contains() threw exception TypeError: Not enough arguments.
+PASS element.relList.contains(&quot;X&quot;) is true
+PASS element.relList.contains(&quot;x&quot;) is false
+PASS element.relList[0] is &quot;X&quot;
+Testing whitespace
+PASS element.relList.length is 2
+PASS element.relList.length is 2
+PASS element.relList.length is 2
+PASS element.relList.length is 2
+PASS element.relList.length is 2
+DOMTokenList presence and type
+PASS 'undefined' != typeof DOMTokenList is true
+PASS typeof DOMTokenList.prototype is &quot;object&quot;
+PASS typeof element.relList is &quot;object&quot;
+PASS element.relList.constructor is DOMTokenList
+PASS element.relList === element.relList is true
+Variadic calls
+PASS element.rel is &quot;a b&quot;
+PASS element.rel is &quot;a b c&quot;
+PASS element.rel is &quot;a b c null d undefined 0 false&quot;
+PASS element.rel is &quot;a b&quot;
+PASS element.relList.add(&quot;a&quot;, &quot;b&quot;, &quot;&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS element.rel is &quot;&quot;
+PASS element.relList.add(&quot;a&quot;, &quot;b&quot;, &quot;c d&quot;) threw exception Error: InvalidCharacterError: DOM Exception 5.
+PASS element.rel is &quot;&quot;
+PASS element.relList.add(&quot;a&quot;, {toString: function() { throw new Error(&quot;user error&quot;); }}, &quot;b&quot;) threw exception Error: user error.
+PASS element.rel is &quot;&quot;
+PASS element.relList.add() did not throw exception.
+PASS observer.takeRecords().length is 1
+PASS element.rel is &quot;b d  &quot;
+PASS element.rel is &quot;d  &quot;
+PASS element.rel is &quot;a b c&quot;
+PASS element.relList.remove(&quot;a&quot;, &quot;b&quot;, &quot;&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS element.rel is &quot;a b&quot;
+PASS element.relList.remove(&quot;a&quot;, {toString: function() { throw new Error(&quot;user error&quot;); }}, &quot;b&quot;) threw exception Error: user error.
+PASS element.rel is &quot;a b&quot;
+PASS element.relList.remove(&quot;a&quot;, &quot;b&quot;, &quot;c d&quot;) threw exception Error: InvalidCharacterError: DOM Exception 5.
+PASS element.rel is &quot;a b&quot;
+PASS element.relList.remove() did not throw exception.
+PASS observer.takeRecords().length is 1
+Tests relList for area element
+PASS element.relList == null is false
+PASS element.relList == undefined is false
+PASS element.relList instanceof DOMTokenList is true
+PASS element.relList.length is 3
+PASS element.relList.contains(&quot;a&quot;) is true
+PASS element.relList.contains(&quot;b&quot;) is true
+PASS element.relList.contains(&quot;c&quot;) is true
+PASS element.relList.contains(&quot;d&quot;) is false
+PASS element.relList.length is 3
+PASS element.relList.contains(&quot;foo&quot;) is true
+PASS element.relList.contains(&quot;bar&quot;) is true
+PASS element.relList.contains(&quot;chocolate&quot;) is true
+PASS element.relList.contains(&quot;orange&quot;) is false
+PASS element.relList.length is 0
+PASS element.relList.length is 0
+PASS element.relList.length is 2
+PASS element.relList.contains(&quot;marshmallow&quot;) is true
+PASS element.relList.contains(&quot;chips&quot;) is true
+PASS element.relList.contains(&quot;orange&quot;) is false
+PASS String(element.relList) is &quot;x&quot;
+PASS element.relList.length is 0
+PASS element.relList.length is 1
+PASS element.relList.length is 2
+PASS element.relList.length is 2
+PASS element.rel is &quot;x&quot;
+PASS element.rel is &quot;x&quot;
+PASS element.rel is &quot;x  x&quot;
+PASS element.rel is &quot;y x&quot;
+PASS element.rel is &quot;&quot;
+PASS element.rel is &quot;&quot;
+PASS element.rel is &quot; y y &quot;
+PASS element.rel is &quot;y&quot;
+Ensure that we can handle empty rel correctly
+PASS element.relList.toggle('x') is true
+PASS element.rel is &quot;x&quot;
+PASS element.relList.toggle('x') is false
+PASS element.rel is &quot;&quot;
+PASS element.relList.contains(&quot;x&quot;) is false
+PASS element.relList[1] is undefined.
+PASS element.relList.contains(&quot;x&quot;) is false
+PASS element.relList.contains(&quot;x&quot;) is true
+Test toggle with force argument
+PASS element.relList.toggle('x', true) is true
+PASS element.rel is &quot;x&quot;
+PASS element.relList.toggle('x', true) is true
+PASS element.rel is &quot;x&quot;
+PASS element.relList.toggle('x', false) is false
+PASS element.rel is &quot;&quot;
+PASS element.relList.toggle('x', false) is false
+PASS element.rel is &quot;&quot;
+PASS element.relList.toggle(&quot;&quot;, true) threw exception Error: SyntaxError: DOM Exception 12.
+PASS element.relList.toggle(&quot;x y&quot;, false) threw exception Error: InvalidCharacterError: DOM Exception 5.
+Testing add in presence of trailing white spaces.
+PASS element.rel is &quot;x y&quot;
+PASS element.rel is &quot;x\ty&quot;
+PASS element.rel is &quot; y&quot;
+Test invalid tokens
+PASS element.relList.contains(&quot;&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS element.relList.contains(&quot;x y&quot;) threw exception Error: InvalidCharacterError: DOM Exception 5.
+PASS element.relList.add(&quot;&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS element.relList.add(&quot;x y&quot;) threw exception Error: InvalidCharacterError: DOM Exception 5.
+PASS element.relList.remove(&quot;&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS element.relList.remove(&quot;x y&quot;) threw exception Error: InvalidCharacterError: DOM Exception 5.
+PASS element.relList.toggle(&quot;&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+Indexing
+PASS element.relList[0] is &quot;x&quot;
+PASS element.relList.item(0) is &quot;x&quot;
+PASS element.relList[1] is &quot;x&quot;
+PASS element.relList.item(1) is &quot;x&quot;
+PASS element.relList[1] is &quot;y&quot;
+PASS element.relList.item(1) is &quot;y&quot;
+PASS element.relList[0] is undefined.
+PASS element.relList.item(0) is null
+PASS element.relList[4] is undefined.
+PASS element.relList.item(4) is null
+PASS element.relList[-1] is undefined.
+PASS element.relList.item(-1) is null
+PASS element.relList.item() threw exception TypeError: Not enough arguments.
+Test case since DOMTokenList is case sensitive
+PASS element.relList.contains(&quot;x&quot;) is true
+PASS element.relList.contains(&quot;X&quot;) is false
+PASS element.relList[0] is &quot;x&quot;
+PASS element.relList.contains() threw exception TypeError: Not enough arguments.
+PASS element.relList.contains(&quot;X&quot;) is true
+PASS element.relList.contains(&quot;x&quot;) is false
+PASS element.relList[0] is &quot;X&quot;
+Testing whitespace
+PASS element.relList.length is 2
+PASS element.relList.length is 2
+PASS element.relList.length is 2
+PASS element.relList.length is 2
+PASS element.relList.length is 2
+DOMTokenList presence and type
+PASS 'undefined' != typeof DOMTokenList is true
+PASS typeof DOMTokenList.prototype is &quot;object&quot;
+PASS typeof element.relList is &quot;object&quot;
+PASS element.relList.constructor is DOMTokenList
+PASS element.relList === element.relList is true
+Variadic calls
+PASS element.rel is &quot;a b&quot;
+PASS element.rel is &quot;a b c&quot;
+PASS element.rel is &quot;a b c null d undefined 0 false&quot;
+PASS element.rel is &quot;a b&quot;
+PASS element.relList.add(&quot;a&quot;, &quot;b&quot;, &quot;&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS element.rel is &quot;&quot;
+PASS element.relList.add(&quot;a&quot;, &quot;b&quot;, &quot;c d&quot;) threw exception Error: InvalidCharacterError: DOM Exception 5.
+PASS element.rel is &quot;&quot;
+PASS element.relList.add(&quot;a&quot;, {toString: function() { throw new Error(&quot;user error&quot;); }}, &quot;b&quot;) threw exception Error: user error.
+PASS element.rel is &quot;&quot;
+PASS element.relList.add() did not throw exception.
+PASS observer.takeRecords().length is 1
+PASS element.rel is &quot;b d  &quot;
+PASS element.rel is &quot;d  &quot;
+PASS element.rel is &quot;a b c&quot;
+PASS element.relList.remove(&quot;a&quot;, &quot;b&quot;, &quot;&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS element.rel is &quot;a b&quot;
+PASS element.relList.remove(&quot;a&quot;, {toString: function() { throw new Error(&quot;user error&quot;); }}, &quot;b&quot;) threw exception Error: user error.
+PASS element.rel is &quot;a b&quot;
+PASS element.relList.remove(&quot;a&quot;, &quot;b&quot;, &quot;c d&quot;) threw exception Error: InvalidCharacterError: DOM Exception 5.
+PASS element.rel is &quot;a b&quot;
+PASS element.relList.remove() did not throw exception.
+PASS observer.takeRecords().length is 1
+Tests relList for link element
+PASS element.relList == null is false
+PASS element.relList == undefined is false
+PASS element.relList instanceof DOMTokenList is true
+PASS element.relList.length is 3
+PASS element.relList.contains(&quot;a&quot;) is true
+PASS element.relList.contains(&quot;b&quot;) is true
+PASS element.relList.contains(&quot;c&quot;) is true
+PASS element.relList.contains(&quot;d&quot;) is false
+PASS element.relList.length is 3
+PASS element.relList.contains(&quot;foo&quot;) is true
+PASS element.relList.contains(&quot;bar&quot;) is true
+PASS element.relList.contains(&quot;chocolate&quot;) is true
+PASS element.relList.contains(&quot;orange&quot;) is false
+PASS element.relList.length is 0
+PASS element.relList.length is 0
+PASS element.relList.length is 2
+PASS element.relList.contains(&quot;marshmallow&quot;) is true
+PASS element.relList.contains(&quot;chips&quot;) is true
+PASS element.relList.contains(&quot;orange&quot;) is false
+PASS String(element.relList) is &quot;x&quot;
+PASS element.relList.length is 0
+PASS element.relList.length is 1
+PASS element.relList.length is 2
+PASS element.relList.length is 2
+PASS element.rel is &quot;x&quot;
+PASS element.rel is &quot;x&quot;
+PASS element.rel is &quot;x  x&quot;
+PASS element.rel is &quot;y x&quot;
+PASS element.rel is &quot;&quot;
+PASS element.rel is &quot;&quot;
+PASS element.rel is &quot; y y &quot;
+PASS element.rel is &quot;y&quot;
+Ensure that we can handle empty rel correctly
+PASS element.relList.toggle('x') is true
+PASS element.rel is &quot;x&quot;
+PASS element.relList.toggle('x') is false
+PASS element.rel is &quot;&quot;
+PASS element.relList.contains(&quot;x&quot;) is false
+PASS element.relList[1] is undefined.
+PASS element.relList.contains(&quot;x&quot;) is false
+PASS element.relList.contains(&quot;x&quot;) is true
+Test toggle with force argument
+PASS element.relList.toggle('x', true) is true
+PASS element.rel is &quot;x&quot;
+PASS element.relList.toggle('x', true) is true
+PASS element.rel is &quot;x&quot;
+PASS element.relList.toggle('x', false) is false
+PASS element.rel is &quot;&quot;
+PASS element.relList.toggle('x', false) is false
+PASS element.rel is &quot;&quot;
+PASS element.relList.toggle(&quot;&quot;, true) threw exception Error: SyntaxError: DOM Exception 12.
+PASS element.relList.toggle(&quot;x y&quot;, false) threw exception Error: InvalidCharacterError: DOM Exception 5.
+Testing add in presence of trailing white spaces.
+PASS element.rel is &quot;x y&quot;
+PASS element.rel is &quot;x\ty&quot;
+PASS element.rel is &quot; y&quot;
+Test invalid tokens
+PASS element.relList.contains(&quot;&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS element.relList.contains(&quot;x y&quot;) threw exception Error: InvalidCharacterError: DOM Exception 5.
+PASS element.relList.add(&quot;&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS element.relList.add(&quot;x y&quot;) threw exception Error: InvalidCharacterError: DOM Exception 5.
+PASS element.relList.remove(&quot;&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS element.relList.remove(&quot;x y&quot;) threw exception Error: InvalidCharacterError: DOM Exception 5.
+PASS element.relList.toggle(&quot;&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+Indexing
+PASS element.relList[0] is &quot;x&quot;
+PASS element.relList.item(0) is &quot;x&quot;
+PASS element.relList[1] is &quot;x&quot;
+PASS element.relList.item(1) is &quot;x&quot;
+PASS element.relList[1] is &quot;y&quot;
+PASS element.relList.item(1) is &quot;y&quot;
+PASS element.relList[0] is undefined.
+PASS element.relList.item(0) is null
+PASS element.relList[4] is undefined.
+PASS element.relList.item(4) is null
+PASS element.relList[-1] is undefined.
+PASS element.relList.item(-1) is null
+PASS element.relList.item() threw exception TypeError: Not enough arguments.
+Test case since DOMTokenList is case sensitive
+PASS element.relList.contains(&quot;x&quot;) is true
+PASS element.relList.contains(&quot;X&quot;) is false
+PASS element.relList[0] is &quot;x&quot;
+PASS element.relList.contains() threw exception TypeError: Not enough arguments.
+PASS element.relList.contains(&quot;X&quot;) is true
+PASS element.relList.contains(&quot;x&quot;) is false
+PASS element.relList[0] is &quot;X&quot;
+Testing whitespace
+PASS element.relList.length is 2
+PASS element.relList.length is 2
+PASS element.relList.length is 2
+PASS element.relList.length is 2
+PASS element.relList.length is 2
+DOMTokenList presence and type
+PASS 'undefined' != typeof DOMTokenList is true
+PASS typeof DOMTokenList.prototype is &quot;object&quot;
+PASS typeof element.relList is &quot;object&quot;
+PASS element.relList.constructor is DOMTokenList
+PASS element.relList === element.relList is true
+Variadic calls
+PASS element.rel is &quot;a b&quot;
+PASS element.rel is &quot;a b c&quot;
+PASS element.rel is &quot;a b c null d undefined 0 false&quot;
+PASS element.rel is &quot;a b&quot;
+PASS element.relList.add(&quot;a&quot;, &quot;b&quot;, &quot;&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS element.rel is &quot;&quot;
+PASS element.relList.add(&quot;a&quot;, &quot;b&quot;, &quot;c d&quot;) threw exception Error: InvalidCharacterError: DOM Exception 5.
+PASS element.rel is &quot;&quot;
+PASS element.relList.add(&quot;a&quot;, {toString: function() { throw new Error(&quot;user error&quot;); }}, &quot;b&quot;) threw exception Error: user error.
+PASS element.rel is &quot;&quot;
+PASS element.relList.add() did not throw exception.
+PASS observer.takeRecords().length is 1
+PASS element.rel is &quot;b d  &quot;
+PASS element.rel is &quot;d  &quot;
+PASS element.rel is &quot;a b c&quot;
+PASS element.relList.remove(&quot;a&quot;, &quot;b&quot;, &quot;&quot;) threw exception Error: SyntaxError: DOM Exception 12.
+PASS element.rel is &quot;a b&quot;
+PASS element.relList.remove(&quot;a&quot;, {toString: function() { throw new Error(&quot;user error&quot;); }}, &quot;b&quot;) threw exception Error: user error.
+PASS element.rel is &quot;a b&quot;
+PASS element.relList.remove(&quot;a&quot;, &quot;b&quot;, &quot;c d&quot;) threw exception Error: InvalidCharacterError: DOM Exception 5.
+PASS element.rel is &quot;a b&quot;
+PASS element.relList.remove() did not throw exception.
+PASS observer.takeRecords().length is 1
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomrellistgcexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/rel-list-gc-expected.txt (0 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/rel-list-gc-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/dom/rel-list-gc-expected.txt        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+Tests relList gc for anchor element
+PASS element.relList.life is 42
+PASS element.relList.life is 42
+Tests relList gc for area element
+PASS element.relList.life is 42
+PASS element.relList.life is 42
+Tests relList gc for link element
+PASS element.relList.life is 42
+PASS element.relList.life is 42
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomrellistgchtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/rel-list-gc.html (0 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/rel-list-gc.html                                (rev 0)
+++ trunk/LayoutTests/fast/dom/rel-list-gc.html        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -0,0 +1,30 @@
</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;script&gt;
+var element;
+
+function test(type)
+{
+    element = document.createElement(type);
+    var relList = element.relList;
+    element.relList.life = 42;
+    shouldEvaluateTo('element.relList.life', 42);
+    relList = null;
+    gc();
+    shouldEvaluateTo('element.relList.life', 42);
+}
+
+debug('Tests relList gc for anchor element');
+test('a');
+debug('Tests relList gc for area element');
+test('area');
+debug('Tests relList gc for link element');
+test('link');
+
+&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 class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomrellisthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/rel-list.html (0 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/rel-list.html                                (rev 0)
+++ trunk/LayoutTests/fast/dom/rel-list.html        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -0,0 +1,303 @@
</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;a id=&quot;a&quot; rel=&quot;a b c&quot;&gt;&lt;/a&gt;
+&lt;area id=&quot;area&quot; rel=&quot;a b c&quot;&gt;&lt;/area&gt;
+&lt;link id=&quot;link&quot; rel=&quot;a b c&quot;&gt;
+&lt;script&gt;
+description('Tests that relList works on anchor, area and link elements');
+
+var element;
+var type;
+var observer;
+
+function createElement(rel)
+{
+    element = document.createElement(type);
+    element.rel = rel;
+}
+
+function test() 
+{
+    element = document.getElementById(type);
+    shouldBeFalse('element.relList == null');
+    shouldBeFalse('element.relList == undefined');
+    shouldBeTrue('element.relList instanceof DOMTokenList');
+    shouldBe('element.relList.length', '3');
+    shouldBeTrue('element.relList.contains(&quot;a&quot;)');
+    shouldBeTrue('element.relList.contains(&quot;b&quot;)');
+    shouldBeTrue('element.relList.contains(&quot;c&quot;)');
+    shouldBeFalse('element.relList.contains(&quot;d&quot;)');
+
+    createElement(&quot;foo bar chocolate&quot;);
+    shouldBe('element.relList.length', '3');
+    shouldBeTrue('element.relList.contains(&quot;foo&quot;)');
+    shouldBeTrue('element.relList.contains(&quot;bar&quot;)');
+    shouldBeTrue('element.relList.contains(&quot;chocolate&quot;)');
+    shouldBeFalse('element.relList.contains(&quot;orange&quot;)');
+
+    element.removeAttribute('rel');
+    shouldBe('element.relList.length', '0');
+    
+    element.setAttribute('rel', '');
+    shouldBe('element.relList.length', '0');
+
+    element.setAttribute('rel', 'marshmallow chips');
+    shouldBe('element.relList.length', '2');
+    shouldBeTrue('element.relList.contains(&quot;marshmallow&quot;)');
+    shouldBeTrue('element.relList.contains(&quot;chips&quot;)');
+    shouldBeFalse('element.relList.contains(&quot;orange&quot;)');
+
+    createElement('x');
+    element.relList = 'y';
+    shouldBeEqualToString('String(element.relList)', 'x');
+
+    createElement('');
+    shouldEvaluateTo('element.relList.length', 0);
+
+    createElement('x');
+    shouldEvaluateTo('element.relList.length', 1);
+
+    createElement('x x');
+    shouldEvaluateTo('element.relList.length', 2);
+
+    createElement('x y');
+    shouldEvaluateTo('element.relList.length', 2);
+
+    createElement('');
+    element.relList.add('x');
+    shouldBeEqualToString('element.rel', 'x');
+
+    createElement('x');
+    element.relList.add('x');
+    shouldBeEqualToString('element.rel', 'x');
+
+    createElement('x  x');
+    element.relList.add('x');
+    shouldBeEqualToString('element.rel', 'x  x');
+
+    createElement('y');
+    element.relList.add('x');
+    shouldBeEqualToString('element.rel', 'y x');
+
+    createElement('');
+    element.relList.remove('x');
+    shouldBeEqualToString('element.rel', '');
+
+    createElement('x');
+    element.relList.remove('x');
+    shouldBeEqualToString('element.rel', '');
+
+    createElement(' y x  y ');
+    element.relList.remove('x');
+    shouldBeEqualToString('element.rel', ' y y ');
+
+    createElement(' x y  x ');
+    element.relList.remove('x');
+    shouldBeEqualToString('element.rel', 'y');
+
+    debug('Ensure that we can handle empty rel correctly');
+    element = document.createElement(type);
+    shouldBeTrue(&quot;element.relList.toggle('x')&quot;);
+    shouldBeEqualToString('element.rel', 'x');
+    shouldBeFalse(&quot;element.relList.toggle('x')&quot;);
+    shouldBeEqualToString('element.rel', '');
+
+    element = document.createElement(type);
+    shouldBeFalse('element.relList.contains(&quot;x&quot;)');
+    shouldBeUndefined('element.relList[1]');
+    element.relList.remove('x');
+    shouldBeFalse('element.relList.contains(&quot;x&quot;)');
+    element.relList.add('x');
+    shouldBeTrue('element.relList.contains(&quot;x&quot;)');
+
+    debug('Test toggle with force argument');
+    createElement('');
+    shouldBeTrue(&quot;element.relList.toggle('x', true)&quot;);
+    shouldBeEqualToString('element.rel', 'x');
+    shouldBeTrue(&quot;element.relList.toggle('x', true)&quot;);
+    shouldBeEqualToString('element.rel', 'x');
+    shouldBeFalse(&quot;element.relList.toggle('x', false)&quot;);
+    shouldBeEqualToString('element.rel', '');
+    shouldBeFalse(&quot;element.relList.toggle('x', false)&quot;);
+    shouldBeEqualToString('element.rel', '');
+    shouldThrow('element.relList.toggle(&quot;&quot;, true)');
+    shouldThrow('element.relList.toggle(&quot;x y&quot;, false)');
+
+    debug('Testing add in presence of trailing white spaces.');
+    createElement('x ');
+    element.relList.add('y');
+    shouldBeEqualToString('element.rel', 'x y');
+
+    createElement('x\t');
+    element.relList.add('y');
+    shouldBeEqualToString('element.rel', 'x\ty');
+
+    createElement(' ');
+    element.relList.add('y');
+    shouldBeEqualToString('element.rel', ' y');
+
+    debug('Test invalid tokens');
+
+    createElement('x');
+    shouldThrow('element.relList.contains(&quot;&quot;)');
+
+    createElement('x y');
+    shouldThrow('element.relList.contains(&quot;x y&quot;)');
+
+    createElement('');
+    shouldThrow('element.relList.add(&quot;&quot;)');
+
+    createElement('');
+    shouldThrow('element.relList.add(&quot;x y&quot;)');
+
+    createElement('');
+    shouldThrow('element.relList.remove(&quot;&quot;)');
+
+    createElement('');
+    shouldThrow('element.relList.remove(&quot;x y&quot;)');
+
+    createElement('');
+    shouldThrow('element.relList.toggle(&quot;&quot;)');
+
+    debug('Indexing');
+    createElement('x');
+    shouldBeEqualToString('element.relList[0]', 'x');
+    shouldBeEqualToString('element.relList.item(0)', 'x');
+
+    createElement('x x');
+    shouldBeEqualToString('element.relList[1]', 'x');
+    shouldBeEqualToString('element.relList.item(1)', 'x');
+
+    createElement('x y');
+    shouldBeEqualToString('element.relList[1]', 'y');
+    shouldBeEqualToString('element.relList.item(1)', 'y');
+
+    createElement('');
+    shouldBeUndefined('element.relList[0]');
+    shouldBeNull('element.relList.item(0)');
+
+    createElement('x y z');
+    shouldBeUndefined('element.relList[4]');
+    shouldBeNull('element.relList.item(4)');
+    shouldBeUndefined('element.relList[-1]');
+    shouldBeNull('element.relList.item(-1)');
+    shouldThrow('element.relList.item()');
+
+    debug('Test case since DOMTokenList is case sensitive');
+    createElement('x');
+    shouldBeTrue('element.relList.contains(&quot;x&quot;)');
+    shouldBeFalse('element.relList.contains(&quot;X&quot;)');
+    shouldBeEqualToString('element.relList[0]', 'x');
+    shouldThrow('element.relList.contains()');
+
+    createElement('X');
+    shouldBeTrue('element.relList.contains(&quot;X&quot;)');
+    shouldBeFalse('element.relList.contains(&quot;x&quot;)');
+    shouldBeEqualToString('element.relList[0]', 'X');
+
+    debug('Testing whitespace');
+    createElement('x\u0020y');
+    shouldEvaluateTo('element.relList.length', 2);
+
+    createElement('x\u0009y');
+    shouldEvaluateTo('element.relList.length', 2);
+
+    createElement('x\u000Ay');
+    shouldEvaluateTo('element.relList.length', 2);
+
+    createElement('x\u000Cy');
+    shouldEvaluateTo('element.relList.length', 2);
+
+    createElement('x\u000Dy');
+    shouldEvaluateTo('element.relList.length', 2);
+
+    debug('DOMTokenList presence and type');
+    shouldBeTrue('\'undefined\' != typeof DOMTokenList');
+
+    shouldBeEqualToString('typeof DOMTokenList.prototype', 'object');
+
+    createElement('x');
+    shouldBeEqualToString('typeof element.relList', 'object');
+    shouldEvaluateTo('element.relList.constructor', 'DOMTokenList');
+    shouldBeTrue('element.relList === element.relList');
+
+    debug('Variadic calls');
+
+    createElement('');
+    element.relList.add('a', 'b');
+    shouldBeEqualToString('element.rel', 'a b');
+
+    element.relList.add('a', 'b', 'c');
+    shouldBeEqualToString('element.rel', 'a b c');
+
+    element.relList.add(null, {toString: function() { return 'd' }}, undefined, 0, false);
+    shouldBeEqualToString('element.rel', 'a b c null d undefined 0 false');
+
+    createElement('');
+    element.relList.add('a', 'b', 'a');
+    shouldBeEqualToString('element.rel', 'a b');
+
+    createElement('');
+    shouldThrow('element.relList.add(&quot;a&quot;, &quot;b&quot;, &quot;&quot;)');
+    shouldBeEqualToString('element.rel', '');
+    shouldThrow('element.relList.add(&quot;a&quot;, &quot;b&quot;, &quot;c d&quot;)');
+    shouldBeEqualToString('element.rel', '');
+    shouldThrow('element.relList.add(&quot;a&quot;, {toString: function() { throw new Error(&quot;user error&quot;); }}, &quot;b&quot;)', '&quot;Error: user error&quot;');
+    shouldBeEqualToString('element.rel', '');
+
+    createElement('');
+    shouldNotThrow('element.relList.add()');
+
+    createElement('');
+    observer = new WebKitMutationObserver(function() {});
+    observer.observe(element, {attributes: true});
+    element.relList.add('a', 'c');
+    shouldBe('observer.takeRecords().length', '1');
+
+    createElement('a b c d  ');
+    element.relList.remove('a', 'c');
+    shouldBeEqualToString('element.rel', 'b d  ');
+
+    element.relList.remove('b', 'b');
+    shouldBeEqualToString('element.rel', 'd  ');
+
+    createElement('a b c null d undefined 0 false');
+    element.relList.remove(null, {toString: function() { return 'd' }}, undefined, 0, false);
+    shouldBeEqualToString('element.rel', 'a b c');
+
+    createElement('a b');
+    shouldThrow('element.relList.remove(&quot;a&quot;, &quot;b&quot;, &quot;&quot;)');
+
+    shouldBeEqualToString('element.rel', 'a b');
+    shouldThrow('element.relList.remove(&quot;a&quot;, {toString: function() { throw new Error(&quot;user error&quot;); }}, &quot;b&quot;)', '&quot;Error: user error&quot;');
+    shouldBeEqualToString('element.rel', 'a b');
+
+    shouldThrow('element.relList.remove(&quot;a&quot;, &quot;b&quot;, &quot;c d&quot;)');
+    shouldBeEqualToString('element.rel', 'a b');
+    shouldNotThrow('element.relList.remove()');
+
+    createElement('a b c');
+    observer = new WebKitMutationObserver(function() {});
+    observer.observe(element, {attributes: true});
+    element.relList.remove('a', 'c');
+    shouldBe('observer.takeRecords().length', '1');
+}
+
+debug('Tests relList for anchor element');
+type = 'a';
+test();
+debug('Tests relList for area element');
+type = 'area';
+test();
+debug('Tests relList for link element');
+type = 'link';
+test();
+
+&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 class="cx">\ No newline at end of file
</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 (175027 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt        2014-10-22 07:29:26 UTC (rev 175027)
+++ trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> PASS a[&quot;search&quot;] is 
</span><span class="cx"> PASS a[&quot;origin&quot;] is file://
</span><span class="cx"> PASS a[&quot;text&quot;] is nerget
</span><ins>+PASS a[&quot;relList&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">@@ -49,7 +50,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 774
</del><ins>+PASS a[&quot;offsetTop&quot;] is 789
</ins><span class="cx"> PASS a[&quot;offsetWidth&quot;] is 39
</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="trunkLayoutTestsperfrellistremoveexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/perf/rel-list-remove-expected.txt (0 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/perf/rel-list-remove-expected.txt                                (rev 0)
+++ trunk/LayoutTests/perf/rel-list-remove-expected.txt        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+Tests that relList remove is linear.
+PASS
+PASS
+PASS
+PASS
+PASS
+PASS
+
</ins></span></pre></div>
<a id="trunkLayoutTestsperfrellistremovehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/perf/rel-list-remove.html (0 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/perf/rel-list-remove.html                                (rev 0)
+++ trunk/LayoutTests/perf/rel-list-remove.html        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+&lt;script src=&quot;../resources/magnitude-perf.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+
+var element, rel, relToRemove, type;
+
+// Test 1 tests that remove is linear when there are N rels.
+
+function setupFunction1(magnitude)
+{
+    element = document.createElement(type);
+    relToRemove = 'b';
+    rel = Array(magnitude).join('a ') + relToRemove;
+}
+
+// Test 2 tests that remove is linear when the length of the rel is N.
+
+function setupFunction2(magnitude)
+{
+    element = document.createElement(type);
+    relToRemove = Array(magnitude + 1).join('a');
+    rel = relToRemove;
+}
+
+function test(magnitude)
+{
+    element.rel = rel;
+    element.relList.remove(relToRemove);
+}
+
+Magnitude.description('Tests that relList remove is linear.');
+type = 'a'
+Magnitude.run(setupFunction1, test, Magnitude.LINEAR);
+Magnitude.run(setupFunction2, test, Magnitude.LINEAR);
+type = 'area'
+Magnitude.run(setupFunction1, test, Magnitude.LINEAR);
+Magnitude.run(setupFunction2, test, Magnitude.LINEAR);
+type = 'link'
+Magnitude.run(setupFunction1, test, Magnitude.LINEAR);
+Magnitude.run(setupFunction2, test, Magnitude.LINEAR);
+
+&lt;/script&gt;
+&lt;/body&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (175027 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2014-10-22 07:29:26 UTC (rev 175027)
+++ trunk/Source/WebCore/CMakeLists.txt        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -1647,6 +1647,7 @@
</span><span class="cx">     html/RadioInputType.cpp
</span><span class="cx">     html/RadioNodeList.cpp
</span><span class="cx">     html/RangeInputType.cpp
</span><ins>+    html/RelList.cpp
</ins><span class="cx">     html/ResetInputType.cpp
</span><span class="cx">     html/SearchInputType.cpp
</span><span class="cx">     html/StepRange.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (175027 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-10-22 07:29:26 UTC (rev 175027)
+++ trunk/Source/WebCore/ChangeLog        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -1,3 +1,52 @@
</span><ins>+2014-10-22  Dhi Aurrahman  &lt;diorahman@rockybars.com&gt;
+
+        Add relList to the anchor, area and link elements
+        https://bugs.webkit.org/show_bug.cgi?id=137860
+
+        Reviewed by Darin Adler and Chris Dumez.
+
+        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.
+
</ins><span class="cx"> 2014-10-21  Andy Estes  &lt;aestes@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         One more iOS build fix after r175013.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (175027 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-10-22 07:29:26 UTC (rev 175027)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -16059,6 +16059,7 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\RadioInputType.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\RadioNodeList.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\RangeInputType.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\html\RelList.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\html\ResetInputType.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\SearchInputType.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\StepRange.cpp&quot; /&gt;
</span><span class="lines">@@ -20836,6 +20837,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\RadioInputType.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\RadioNodeList.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\RangeInputType.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\html\RelList.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\html\ResetInputType.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\SearchInputType.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\StepRange.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (175027 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-10-22 07:29:26 UTC (rev 175027)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -4053,6 +4053,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\html\RangeInputType.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\html\RelList.cpp&quot;&gt;
+      &lt;Filter&gt;html&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\html\ResetInputType.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -11208,6 +11211,9 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\RangeInputType.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\html\RelList.h&quot;&gt;
+      &lt;Filter&gt;html&lt;/Filter&gt;
+    &lt;/ClInclude&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\html\ResetInputType.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (175027 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-10-22 07:29:26 UTC (rev 175027)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -4691,6 +4691,8 @@
</span><span class="cx">                 B2ED97710B1F55CE00257D0F /* GraphicsContextCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2ED97700B1F55CE00257D0F /* GraphicsContextCG.cpp */; };
</span><span class="cx">                 B2F34FE60E82F81400F627CD /* DNS.h in Headers */ = {isa = PBXBuildFile; fileRef = B2F34FE50E82F81400F627CD /* DNS.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 B2F34FE90E82F82700F627CD /* DNSCFNet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2F34FE80E82F82700F627CD /* DNSCFNet.cpp */; };
</span><ins>+                B2F78CFD19F2F02D0049696C /* RelList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2F78CFB19F2F02D0049696C /* RelList.cpp */; };
+                B2F78CFE19F2F02D0049696C /* RelList.h in Headers */ = {isa = PBXBuildFile; fileRef = B2F78CFC19F2F02D0049696C /* RelList.h */; };
</ins><span class="cx">                 B2FA3D360AB75A6F000E5AC4 /* JSSVGAnimateColorElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2FA3C4E0AB75A6E000E5AC4 /* JSSVGAnimateColorElement.cpp */; };
</span><span class="cx">                 B2FA3D370AB75A6F000E5AC4 /* JSSVGAnimateColorElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B2FA3C4F0AB75A6E000E5AC4 /* JSSVGAnimateColorElement.h */; };
</span><span class="cx">                 B2FA3D380AB75A6F000E5AC4 /* JSSVGAnimatedAngle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2FA3C500AB75A6E000E5AC4 /* JSSVGAnimatedAngle.cpp */; };
</span><span class="lines">@@ -12061,6 +12063,8 @@
</span><span class="cx">                 B2ED97700B1F55CE00257D0F /* GraphicsContextCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextCG.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 B2F34FE50E82F81400F627CD /* DNS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DNS.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 B2F34FE80E82F82700F627CD /* DNSCFNet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DNSCFNet.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                B2F78CFB19F2F02D0049696C /* RelList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RelList.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                B2F78CFC19F2F02D0049696C /* RelList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RelList.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 B2FA3C4E0AB75A6E000E5AC4 /* JSSVGAnimateColorElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGAnimateColorElement.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 B2FA3C4F0AB75A6E000E5AC4 /* JSSVGAnimateColorElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSSVGAnimateColorElement.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 B2FA3C500AB75A6E000E5AC4 /* JSSVGAnimatedAngle.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGAnimatedAngle.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -17914,6 +17918,8 @@
</span><span class="cx">                                 B658FFA41522EFAA00DD5595 /* RadioNodeList.h */,
</span><span class="cx">                                 F55B3D991251F12D003EF269 /* RangeInputType.cpp */,
</span><span class="cx">                                 F55B3D9A1251F12D003EF269 /* RangeInputType.h */,
</span><ins>+                                B2F78CFB19F2F02D0049696C /* RelList.cpp */,
+                                B2F78CFC19F2F02D0049696C /* RelList.h */,
</ins><span class="cx">                                 F55B3D9B1251F12D003EF269 /* ResetInputType.cpp */,
</span><span class="cx">                                 F55B3D9C1251F12D003EF269 /* ResetInputType.h */,
</span><span class="cx">                                 F55B3D9D1251F12D003EF269 /* SearchInputType.cpp */,
</span><span class="lines">@@ -24670,6 +24676,7 @@
</span><span class="cx">                                 E157A8F118185425009F821D /* JSCryptoAlgorithmBuilder.h in Headers */,
</span><span class="cx">                                 E1C657131815F9DD00256CDD /* JSCryptoAlgorithmDictionary.h in Headers */,
</span><span class="cx">                                 E157A8E11817331C009F821D /* JSCryptoKey.h in Headers */,
</span><ins>+                                B2F78CFE19F2F02D0049696C /* RelList.h in Headers */,
</ins><span class="cx">                                 E1F80B8E183172B5007885C3 /* JSCryptoKeyPair.h in Headers */,
</span><span class="cx">                                 E125F85218283A5600D84CD9 /* JSCryptoKeySerializationJWK.h in Headers */,
</span><span class="cx">                                 E125F83E182411E700D84CD9 /* JSCryptoOperationData.h in Headers */,
</span><span class="lines">@@ -27402,6 +27409,7 @@
</span><span class="cx">                                 CECADFC6153778FF00E37068 /* DictationAlternative.cpp in Sources */,
</span><span class="cx">                                 CECADFC8153778FF00E37068 /* DictationCommand.cpp in Sources */,
</span><span class="cx">                                 D0BD4F5C1408850F006839B6 /* DictationCommandIOS.cpp in Sources */,
</span><ins>+                                B2F78CFD19F2F02D0049696C /* RelList.cpp in Sources */,
</ins><span class="cx">                                 312D67B11535691F00563D0D /* Dictionary.cpp in Sources */,
</span><span class="cx">                                 FDAF19981513D131008DB0C3 /* DirectConvolver.cpp in Sources */,
</span><span class="cx">                                 49FC7A501444AF5F00A5D864 /* DisplayRefreshMonitor.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoredomSpaceSplitStringcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/SpaceSplitString.cpp (175027 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/SpaceSplitString.cpp        2014-10-22 07:29:26 UTC (rev 175027)
+++ trunk/Source/WebCore/dom/SpaceSplitString.cpp        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -94,6 +94,10 @@
</span><span class="cx"> 
</span><span class="cx"> void SpaceSplitString::set(const AtomicString&amp; inputString, bool shouldFoldCase)
</span><span class="cx"> {
</span><ins>+    if (inputString.isNull()) {
+        clear();
+        return;
+    }
</ins><span class="cx">     m_data = SpaceSplitStringData::create(shouldFoldCase ? inputString.convertToASCIILowercase() : inputString);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAnchorElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAnchorElement.cpp (175027 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAnchorElement.cpp        2014-10-22 07:29:26 UTC (rev 175027)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.cpp        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> #include &quot;MouseEvent.h&quot;
</span><span class="cx"> #include &quot;PingLoader.h&quot;
</span><span class="cx"> #include &quot;PlatformMouseEvent.h&quot;
</span><ins>+#include &quot;RelList.h&quot;
</ins><span class="cx"> #include &quot;RenderImage.h&quot;
</span><span class="cx"> #include &quot;ResourceRequest.h&quot;
</span><span class="cx"> #include &quot;SVGImage.h&quot;
</span><span class="lines">@@ -261,8 +262,12 @@
</span><span class="cx">         invalidateCachedVisitedLinkHash();
</span><span class="cx">     } else if (name == nameAttr || name == titleAttr) {
</span><span class="cx">         // Do nothing.
</span><del>-    } else if (name == relAttr)
-        setRel(value);
</del><ins>+    } else if (name == relAttr) {
+        if (SpaceSplitString::spaceSplitStringContainsValue(value, &quot;noreferrer&quot;, true))
+            m_linkRelations |= RelationNoReferrer;
+        if (m_relList)
+            m_relList-&gt;updateRelAttribute(value);
+    }
</ins><span class="cx">     else
</span><span class="cx">         HTMLElement::parseAttribute(name, value);
</span><span class="cx"> }
</span><span class="lines">@@ -310,10 +315,11 @@
</span><span class="cx">     return m_linkRelations &amp; relation;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void HTMLAnchorElement::setRel(const String&amp; value)
</del><ins>+DOMTokenList&amp; HTMLAnchorElement::relList()
</ins><span class="cx"> {
</span><del>-    if (SpaceSplitString::spaceSplitStringContainsValue(value, &quot;noreferrer&quot;, true))
-        m_linkRelations |= RelationNoReferrer;
</del><ins>+    if (!m_relList) 
+        m_relList = std::make_unique&lt;RelList&gt;(*this);
+    return *m_relList;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> const AtomicString&amp; HTMLAnchorElement::name() const
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAnchorElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAnchorElement.h (175027 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAnchorElement.h        2014-10-22 07:29:26 UTC (rev 175027)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.h        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -30,6 +30,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class RelList;
+
</ins><span class="cx"> // Link relation bitmask values.
</span><span class="cx"> // FIXME: Uncomment as the various link relations are implemented.
</span><span class="cx"> enum {
</span><span class="lines">@@ -97,11 +99,12 @@
</span><span class="cx">     virtual bool willRespondToMouseClickEvents() override;
</span><span class="cx"> 
</span><span class="cx">     bool hasRel(uint32_t relation) const;
</span><del>-    void setRel(const String&amp;);
</del><span class="cx">     
</span><span class="cx">     LinkHash visitedLinkHash() const;
</span><span class="cx">     void invalidateCachedVisitedLinkHash() { m_cachedVisitedLinkHash = 0; }
</span><span class="cx"> 
</span><ins>+    DOMTokenList&amp; relList();
+
</ins><span class="cx"> protected:
</span><span class="cx">     HTMLAnchorElement(const QualifiedName&amp;, Document&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -140,6 +143,8 @@
</span><span class="cx">     bool m_wasShiftKeyDownOnMouseDown : 1;
</span><span class="cx">     uint32_t m_linkRelations : 30;
</span><span class="cx">     mutable LinkHash m_cachedVisitedLinkHash;
</span><ins>+
+    std::unique_ptr&lt;RelList&gt; m_relList;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> inline LinkHash HTMLAnchorElement::visitedLinkHash() const
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAnchorElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAnchorElement.idl (175027 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAnchorElement.idl        2014-10-22 07:29:26 UTC (rev 175027)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.idl        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -66,5 +66,7 @@
</span><span class="cx">     // Objective-C extension:
</span><span class="cx">     readonly attribute URL absoluteLinkURL;
</span><span class="cx"> #endif
</span><ins>+
+    readonly attribute DOMTokenList relList;
</ins><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAreaElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAreaElement.idl (175027 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAreaElement.idl        2014-10-22 07:29:26 UTC (rev 175027)
+++ trunk/Source/WebCore/html/HTMLAreaElement.idl        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx">     [Reflect, URL] attribute DOMString href;
</span><span class="cx">     [Reflect] attribute boolean noHref;
</span><span class="cx">     [Reflect] attribute DOMString ping;
</span><ins>+    [Reflect] attribute DOMString rel;
</ins><span class="cx">     [Reflect] attribute DOMString shape;
</span><span class="cx">     [Reflect] attribute DOMString target;
</span><span class="cx"> 
</span><span class="lines">@@ -43,5 +44,7 @@
</span><span class="cx">     // Objective-C extension:
</span><span class="cx">     readonly attribute URL absoluteLinkURL;
</span><span class="cx"> #endif
</span><ins>+
+    readonly attribute DOMTokenList relList;
</ins><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLLinkElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLLinkElement.cpp (175027 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLLinkElement.cpp        2014-10-22 07:29:26 UTC (rev 175027)
+++ trunk/Source/WebCore/html/HTMLLinkElement.cpp        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx"> #include &quot;MediaQueryEvaluator.h&quot;
</span><span class="cx"> #include &quot;MouseEvent.h&quot;
</span><span class="cx"> #include &quot;Page.h&quot;
</span><ins>+#include &quot;RelList.h&quot;
</ins><span class="cx"> #include &quot;RenderStyle.h&quot;
</span><span class="cx"> #include &quot;SecurityOrigin.h&quot;
</span><span class="cx"> #include &quot;Settings.h&quot;
</span><span class="lines">@@ -139,6 +140,8 @@
</span><span class="cx"> {
</span><span class="cx">     if (name == relAttr) {
</span><span class="cx">         m_relAttribute = LinkRelAttribute(value);
</span><ins>+        if (m_relList)
+            m_relList-&gt;updateRelAttribute(value);
</ins><span class="cx">         process();
</span><span class="cx">     } else if (name == hrefAttr) {
</span><span class="cx">         bool wasLink = isLink();
</span><span class="lines">@@ -381,6 +384,13 @@
</span><span class="cx">         linkLoadingErrored();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+DOMTokenList&amp; HTMLLinkElement::relList()
+{
+    if (!m_relList) 
+        m_relList = std::make_unique&lt;RelList&gt;(*this);
+    return *m_relList;
+}
+
</ins><span class="cx"> void HTMLLinkElement::notifyLoadedSheetAndAllCriticalSubresources(bool errorOccurred)
</span><span class="cx"> {
</span><span class="cx">     if (m_firedLoad)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLLinkElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLLinkElement.h (175027 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLLinkElement.h        2014-10-22 07:29:26 UTC (rev 175027)
+++ trunk/Source/WebCore/html/HTMLLinkElement.h        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class HTMLLinkElement;
</span><ins>+class RelList;
</ins><span class="cx"> class URL;
</span><span class="cx"> 
</span><span class="cx"> template&lt;typename T&gt; class EventSender;
</span><span class="lines">@@ -71,6 +72,8 @@
</span><span class="cx">     void dispatchPendingEvent(LinkEventSender*);
</span><span class="cx">     static void dispatchPendingLoadEvents();
</span><span class="cx"> 
</span><ins>+    DOMTokenList&amp; relList();
+
</ins><span class="cx"> private:
</span><span class="cx">     virtual void parseAttribute(const QualifiedName&amp;, const AtomicString&amp;) override;
</span><span class="cx"> 
</span><span class="lines">@@ -100,7 +103,6 @@
</span><span class="cx">     virtual void defaultEventHandler(Event*) override;
</span><span class="cx">     void handleClick(Event&amp;);
</span><span class="cx"> 
</span><del>-private:
</del><span class="cx">     HTMLLinkElement(const QualifiedName&amp;, Document&amp;, bool createdByParser);
</span><span class="cx"> 
</span><span class="cx">     virtual void addSubresourceAttributeURLs(ListHashSet&lt;URL&gt;&amp;) const override;
</span><span class="lines">@@ -138,6 +140,8 @@
</span><span class="cx">     bool m_loadedSheet;
</span><span class="cx"> 
</span><span class="cx">     PendingSheetType m_pendingSheetType;
</span><ins>+
+    std::unique_ptr&lt;RelList&gt; m_relList;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } //namespace
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLLinkElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLLinkElement.idl (175027 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLLinkElement.idl        2014-10-22 07:29:26 UTC (rev 175027)
+++ trunk/Source/WebCore/html/HTMLLinkElement.idl        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -40,5 +40,7 @@
</span><span class="cx">     // Objective-C extension:
</span><span class="cx">     readonly attribute URL absoluteLinkURL;
</span><span class="cx"> #endif
</span><ins>+
+    readonly attribute DOMTokenList relList;
</ins><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlRelListcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/html/RelList.cpp (0 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/RelList.cpp                                (rev 0)
+++ trunk/Source/WebCore/html/RelList.cpp        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -0,0 +1,87 @@
</span><ins>+/*
+ * Copyright (C) 2014 Dhi Aurrahman &lt;diorahman@rockybars.com&gt;
+ *
+ * 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.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;RelList.h&quot;
+
+#include &quot;Element.h&quot;
+#include &quot;HTMLNames.h&quot;
+
+namespace WebCore {
+
+RelList::RelList(Element&amp; element) 
+    : m_element(element)
+    , m_relAttributeValue(SpaceSplitString(element.fastGetAttribute(HTMLNames::relAttr), false))
+{
+}
+
+void RelList::ref()
+{
+    m_element.ref();
+}
+
+void RelList::deref()
+{
+    m_element.deref();
+}
+
+unsigned RelList::length() const
+{
+    return m_relAttributeValue.size();
+}
+
+const AtomicString RelList::item(unsigned index) const
+{
+    if (index &gt;= length())
+        return nullAtom;
+    return m_relAttributeValue[index];
+}
+
+Element* RelList::element() const
+{
+    return &amp;m_element;
+}
+
+void RelList::updateRelAttribute(const AtomicString&amp; value)
+{
+    m_relAttributeValue.set(value, false);
+}
+
+bool RelList::containsInternal(const AtomicString&amp; token) const
+{
+    return m_relAttributeValue.contains(token);
+}
+
+AtomicString RelList::value() const
+{
+    return m_element.fastGetAttribute(HTMLNames::relAttr);
+}
+
+void RelList::setValue(const AtomicString&amp; value)
+{
+    m_element.setAttribute(HTMLNames::relAttr, value);
+}
+
+} // namespace WebCore
+
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlRelListh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/html/RelList.h (0 => 175028)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/RelList.h                                (rev 0)
+++ trunk/Source/WebCore/html/RelList.h        2014-10-22 09:22:05 UTC (rev 175028)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+/*
+ * Copyright (C) 2014 Dhi Aurrahman &lt;diorahman@rockybars.com&gt;
+ *
+ * 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.
+ */
+
+#ifndef RelList_h
+#define RelList_h
+
+#include &quot;DOMTokenList.h&quot;
+#include &quot;SpaceSplitString.h&quot;
+
+namespace WebCore {
+
+class Element;
+
+class RelList final : public DOMTokenList {
+public:
+    RelList(Element&amp;);
+    void updateRelAttribute(const AtomicString&amp;);
+
+private:
+    virtual void ref() override;
+    virtual void deref() override;
+    virtual unsigned length() const override;
+    virtual const AtomicString item(unsigned index) const override;
+    virtual Element* element() const override;
+    virtual bool containsInternal(const AtomicString&amp;) const override;
+    virtual AtomicString value() const override;
+    virtual void setValue(const AtomicString&amp;) override;
+    
+    Element&amp; m_element;
+    mutable SpaceSplitString m_relAttributeValue;
+};
+
+} // namespace WebCore
+
+#endif // RelList_h
+
</ins></span></pre>
</div>
</div>

</body>
</html>