OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 DEFINE_WRAPPERTYPEINFO(); | 51 DEFINE_WRAPPERTYPEINFO(); |
52 WTF_MAKE_NONCOPYABLE(DOMTokenList); | 52 WTF_MAKE_NONCOPYABLE(DOMTokenList); |
53 public: | 53 public: |
54 static DOMTokenList* create(DOMTokenListObserver* observer = nullptr) | 54 static DOMTokenList* create(DOMTokenListObserver* observer = nullptr) |
55 { | 55 { |
56 return new DOMTokenList(observer); | 56 return new DOMTokenList(observer); |
57 } | 57 } |
58 | 58 |
59 virtual ~DOMTokenList() { } | 59 virtual ~DOMTokenList() { } |
60 | 60 |
61 #if !ENABLE(OILPAN) | |
62 virtual void ref() { RefCounted<DOMTokenList>::ref(); } | |
63 virtual void deref() { RefCounted<DOMTokenList>::deref(); } | |
64 #endif | |
65 | |
66 virtual unsigned length() const { return m_tokens.size(); } | 61 virtual unsigned length() const { return m_tokens.size(); } |
67 virtual const AtomicString item(unsigned index) const; | 62 virtual const AtomicString item(unsigned index) const; |
68 | 63 |
69 bool contains(const AtomicString&, ExceptionState&) const; | 64 bool contains(const AtomicString&, ExceptionState&) const; |
70 virtual void add(const Vector<String>&, ExceptionState&); | 65 virtual void add(const Vector<String>&, ExceptionState&); |
71 void add(const AtomicString&, ExceptionState&); | 66 void add(const AtomicString&, ExceptionState&); |
72 virtual void remove(const Vector<String>&, ExceptionState&); | 67 virtual void remove(const Vector<String>&, ExceptionState&); |
73 void remove(const AtomicString&, ExceptionState&); | 68 void remove(const AtomicString&, ExceptionState&); |
74 bool toggle(const AtomicString&, ExceptionState&); | 69 bool toggle(const AtomicString&, ExceptionState&); |
75 bool toggle(const AtomicString&, bool force, ExceptionState&); | 70 bool toggle(const AtomicString&, bool force, ExceptionState&); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 private: | 105 private: |
111 IterationSource* startIteration(ScriptState*, ExceptionState&) override; | 106 IterationSource* startIteration(ScriptState*, ExceptionState&) override; |
112 SpaceSplitString m_tokens; | 107 SpaceSplitString m_tokens; |
113 AtomicString m_value; | 108 AtomicString m_value; |
114 WeakMember<DOMTokenListObserver> m_observer; | 109 WeakMember<DOMTokenListObserver> m_observer; |
115 }; | 110 }; |
116 | 111 |
117 } // namespace blink | 112 } // namespace blink |
118 | 113 |
119 #endif // DOMTokenList_h | 114 #endif // DOMTokenList_h |
OLD | NEW |