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

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

Issue 2402223002: Fix class name which has only space (Closed)
Patch Set: Fix layout tests Created 4 years, 2 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/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index 047e339cba3e817a5c7eb056291cb3d2776f7584..cb7b7384384d17ea2784671686bed79a0fd058a4 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -1377,10 +1377,7 @@ void Element::classAttributeChanged(const AtomicString& newClassString) {
} else {
const SpaceSplitString& oldClasses = elementData()->classNames();
document().styleEngine().classChangedForElement(oldClasses, *this);
- if (classStringContentType == ClassStringContent::WhiteSpaceOnly)
- elementData()->setClass(newClassString, shouldFoldCase);
- else
- elementData()->clearClass();
+ elementData()->setClass(newClassString, shouldFoldCase);
skobes 2016/10/14 20:41:30 I don't quite understand how this works. Setting
}
if (hasRareData())

Powered by Google App Engine
This is Rietveld 408576698