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

Unified Diff: third_party/WebKit/Source/core/dom/DOMTokenList.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/DOMTokenList.cpp
diff --git a/third_party/WebKit/Source/core/dom/DOMTokenList.cpp b/third_party/WebKit/Source/core/dom/DOMTokenList.cpp
index fe524336ed681971e9ce9d44c1d54252401a9271..22645cfa083755089119fdd0f8e93f652556a608 100644
--- a/third_party/WebKit/Source/core/dom/DOMTokenList.cpp
+++ b/third_party/WebKit/Source/core/dom/DOMTokenList.cpp
@@ -287,9 +287,29 @@ AtomicString DOMTokenList::removeTokens(const AtomicString& input, const Vector<
return output.toAtomicString();
}
+void DOMTokenList::setValue(const AtomicString& value)
+{
+ m_value = value;
+ m_tokens.set(value, SpaceSplitString::ShouldNotFoldCase);
+ if (m_observer)
+ m_observer->valueWasSet();
+}
+
+bool DOMTokenList::containsInternal(const AtomicString& token) const
+{
+ return m_tokens.contains(token);
+}
+
ValueIterable<String>::IterationSource* DOMTokenList::startIteration(ScriptState*, ExceptionState&)
{
return new DOMTokenListIterationSource(this);
}
+const AtomicString DOMTokenList::item(unsigned index) const
+{
+ if (index >= length())
+ return AtomicString();
+ return m_tokens[index];
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMTokenList.h ('k') | third_party/WebKit/Source/core/dom/DOMTokenList.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698