Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Side by Side Diff: third_party/WebKit/Source/core/html/RelList.cpp

Issue 1629403003: Merge DOMSettableTokensList into DOMTokensList (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed non-oilpan inheritance Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/RelList.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/html/RelList.h" 5 #include "core/html/RelList.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "wtf/HashMap.h" 8 #include "wtf/HashMap.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 using namespace HTMLNames; 12 using namespace HTMLNames;
13 13
14 14
15 RelList::RelList(Element* element) : m_element(element) { } 15 RelList::RelList(Element* element) : DOMTokenList(nullptr), m_element(element) { }
16
17 #if !ENABLE(OILPAN)
18 void RelList::ref()
19 {
20 m_element->ref();
21 }
22
23 void RelList::deref()
24 {
25 m_element->deref();
26 }
27 #endif
28 16
29 unsigned RelList::length() const 17 unsigned RelList::length() const
30 { 18 {
31 return !m_element->fastGetAttribute(relAttr).isEmpty() ? m_relValues.size() : 0; 19 return !m_element->fastGetAttribute(relAttr).isEmpty() ? m_relValues.size() : 0;
32 } 20 }
33 21
34 const AtomicString RelList::item(unsigned index) const 22 const AtomicString RelList::item(unsigned index) const
35 { 23 {
36 if (index >= length()) 24 if (index >= length())
37 return AtomicString(); 25 return AtomicString();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 return supportedTokens().contains(tokenValue); 63 return supportedTokens().contains(tokenValue);
76 } 64 }
77 65
78 DEFINE_TRACE(RelList) 66 DEFINE_TRACE(RelList)
79 { 67 {
80 visitor->trace(m_element); 68 visitor->trace(m_element);
81 DOMTokenList::trace(visitor); 69 DOMTokenList::trace(visitor);
82 } 70 }
83 71
84 } // namespace blink 72 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/RelList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698