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

Unified Diff: third_party/WebKit/Source/core/dom/DOMTokenList.cpp

Issue 2910143002: DOMTokenList: Rename add() and remove() with single string argument. (Closed)
Patch Set: Created 3 years, 7 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 60e9c7f6f6c185af61343ecb7129fad18d16bafe..2b8060f30db7a04e9c67b4423d7b4b24673deb2c 100644
--- a/third_party/WebKit/Source/core/dom/DOMTokenList.cpp
+++ b/third_party/WebKit/Source/core/dom/DOMTokenList.cpp
@@ -86,11 +86,8 @@ bool DOMTokenList::contains(const AtomicString& token) const {
return tokens_.Contains(token);
}
-void DOMTokenList::add(const AtomicString& token,
- ExceptionState& exception_state) {
- Vector<String> tokens;
- tokens.push_back(token.GetString());
- add(tokens, exception_state);
+void DOMTokenList::Add(const AtomicString& token) {
+ add(Vector<String>({token}), ASSERT_NO_EXCEPTION);
}
// https://dom.spec.whatwg.org/#dom-domtokenlist-add
@@ -104,11 +101,8 @@ void DOMTokenList::add(const Vector<String>& tokens,
AddTokens(tokens);
}
-void DOMTokenList::remove(const AtomicString& token,
- ExceptionState& exception_state) {
- Vector<String> tokens;
- tokens.push_back(token.GetString());
- remove(tokens, exception_state);
+void DOMTokenList::Remove(const AtomicString& token) {
+ remove(Vector<String>({token}), ASSERT_NO_EXCEPTION);
}
// https://dom.spec.whatwg.org/#dom-domtokenlist-remove
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMTokenList.h ('k') | third_party/WebKit/Source/core/html/track/vtt/VTTRegion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698