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

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

Issue 2895903002: DOMTokenList: Update serialization algorithm on add()/remove() (Closed)
Patch Set: Apply review comments 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/SpaceSplitString.cpp
diff --git a/third_party/WebKit/Source/core/dom/SpaceSplitString.cpp b/third_party/WebKit/Source/core/dom/SpaceSplitString.cpp
index 1552345488e9bd02c388a1b34dd5e7db9da1e169..9f4b94c66d95c5e869291bf13f07aec88a277076 100644
--- a/third_party/WebKit/Source/core/dom/SpaceSplitString.cpp
+++ b/third_party/WebKit/Source/core/dom/SpaceSplitString.cpp
@@ -116,6 +116,8 @@ void SpaceSplitString::Add(const AtomicString& string) {
EnsureUnique();
if (data_)
data_->Add(string);
+ else
+ data_ = Data::Create(string);
}
bool SpaceSplitString::Remove(const AtomicString& string) {
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMTokenList.cpp ('k') | third_party/WebKit/Source/core/html/ClassList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698