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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2402223002: Fix class name which has only space (Closed)
Patch Set: Fix class name which has only space 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/imported/wpt/dom/nodes/Element-classlist-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * (C) 2007 Eric Seidel (eric@webkit.org) 9 * (C) 2007 Eric Seidel (eric@webkit.org)
10 * 10 *
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 unsigned length) { 1336 unsigned length) {
1337 DCHECK_GT(length, 0u); 1337 DCHECK_GT(length, 0u);
1338 1338
1339 unsigned i = 0; 1339 unsigned i = 0;
1340 do { 1340 do {
1341 if (isNotHTMLSpace<CharacterType>(characters[i])) 1341 if (isNotHTMLSpace<CharacterType>(characters[i]))
1342 break; 1342 break;
1343 ++i; 1343 ++i;
1344 } while (i < length); 1344 } while (i < length);
1345 1345
1346 if (i == length && length == 1) 1346 if (i == length && length >= 1)
1347 return ClassStringContent::Empty;
1348 if (i == length && length > 1)
1349 return ClassStringContent::WhiteSpaceOnly; 1347 return ClassStringContent::WhiteSpaceOnly;
1350 1348
1351 return ClassStringContent::HasClasses; 1349 return ClassStringContent::HasClasses;
1352 } 1350 }
1353 1351
1354 static inline ClassStringContent classStringHasClassName( 1352 static inline ClassStringContent classStringHasClassName(
1355 const AtomicString& newClassString) { 1353 const AtomicString& newClassString) {
1356 unsigned length = newClassString.length(); 1354 unsigned length = newClassString.length();
1357 1355
1358 if (!length) 1356 if (!length)
(...skipping 2723 matching lines...) Expand 10 before | Expand all | Expand 10 after
4082 } 4080 }
4083 4081
4084 DEFINE_TRACE_WRAPPERS(Element) { 4082 DEFINE_TRACE_WRAPPERS(Element) {
4085 if (hasRareData()) { 4083 if (hasRareData()) {
4086 visitor->traceWrappers(elementRareData()); 4084 visitor->traceWrappers(elementRareData());
4087 } 4085 }
4088 ContainerNode::traceWrappers(visitor); 4086 ContainerNode::traceWrappers(visitor);
4089 } 4087 }
4090 4088
4091 } // namespace blink 4089 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/imported/wpt/dom/nodes/Element-classlist-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698