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

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

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
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 #ifndef RelList_h 5 #ifndef RelList_h
6 #define RelList_h 6 #define RelList_h
7 7
8 #include "core/HTMLNames.h" 8 #include "core/HTMLNames.h"
9 #include "core/dom/DOMTokenList.h" 9 #include "core/dom/DOMTokenList.h"
10 #include "core/dom/Element.h" 10 #include "core/dom/Element.h"
11 #include "core/dom/SpaceSplitString.h" 11 #include "core/dom/SpaceSplitString.h"
12 #include "wtf/PassOwnPtr.h"
13 12
14 namespace blink { 13 namespace blink {
15 14
16 class RelList final : public DOMTokenList { 15 class RelList final : public DOMTokenList {
17 public: 16 public:
18 static PassOwnPtrWillBeRawPtr<RelList> create(Element* element) 17 static PassRefPtrWillBeRawPtr<RelList> create(Element* element)
19 { 18 {
20 return adoptPtrWillBeNoop(new RelList(element)); 19 return adoptRefWillBeNoop(new RelList(element));
21 } 20 }
22 21
23 #if !ENABLE(OILPAN)
24 void ref() override;
25 void deref() override;
26 #endif
27
28 unsigned length() const override; 22 unsigned length() const override;
29 const AtomicString item(unsigned index) const override; 23 const AtomicString item(unsigned index) const override;
30 24
31 Element* element() override { return m_element; } 25 Element* element() override { return m_element; }
32 void setRelValues(const AtomicString&); 26 void setRelValues(const AtomicString&);
33 27
34 DECLARE_VIRTUAL_TRACE(); 28 DECLARE_VIRTUAL_TRACE();
35 29
36 using SupportedTokens = HashSet<AtomicString>; 30 using SupportedTokens = HashSet<AtomicString>;
37 31
38 private: 32 private:
39 explicit RelList(Element*); 33 explicit RelList(Element*);
40 34
41 bool containsInternal(const AtomicString&) const override; 35 bool containsInternal(const AtomicString&) const override;
42 36
43 const AtomicString& value() const override { return m_element->getAttribute( HTMLNames::relAttr); } 37 const AtomicString& value() const override { return m_element->getAttribute( HTMLNames::relAttr); }
44 void setValue(const AtomicString& value) override { m_element->setAttribute( HTMLNames::relAttr, value); } 38 void setValue(const AtomicString& value) override { m_element->setAttribute( HTMLNames::relAttr, value); }
45 39
46 bool validateTokenValue(const AtomicString&, ExceptionState&) const override ; 40 bool validateTokenValue(const AtomicString&, ExceptionState&) const override ;
47 41
48 RawPtrWillBeMember<Element> m_element; 42 RawPtrWillBeMember<Element> m_element;
49 SpaceSplitString m_relValues; 43 SpaceSplitString m_relValues;
50 }; 44 };
51 45
52 } // namespace blink 46 } // namespace blink
53 47
54 #endif // RelList_h 48 #endif // RelList_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLTableCellElement.idl ('k') | third_party/WebKit/Source/core/html/RelList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698