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

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

Issue 1388903002: className should be allowed to be a whitespace-only string (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | 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. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 { 1233 {
1234 ASSERT(length > 0); 1234 ASSERT(length > 0);
1235 1235
1236 unsigned i = 0; 1236 unsigned i = 0;
1237 do { 1237 do {
1238 if (isNotHTMLSpace<CharacterType>(characters[i])) 1238 if (isNotHTMLSpace<CharacterType>(characters[i]))
1239 break; 1239 break;
1240 ++i; 1240 ++i;
1241 } while (i < length); 1241 } while (i < length);
1242 1242
1243 return i < length; 1243 return i <= length;
tkent 2015/10/06 07:19:02 It means this function always returns |true|. Do y
1244 } 1244 }
1245 1245
1246 static inline bool classStringHasClassName(const AtomicString& newClassString) 1246 static inline bool classStringHasClassName(const AtomicString& newClassString)
1247 { 1247 {
1248 unsigned length = newClassString.length(); 1248 unsigned length = newClassString.length();
1249 1249
1250 if (!length) 1250 if (!length)
1251 return false; 1251 return false;
1252 1252
1253 if (newClassString.is8Bit()) 1253 if (newClassString.is8Bit())
(...skipping 2310 matching lines...) Expand 10 before | Expand all | Expand 10 after
3564 { 3564 {
3565 #if ENABLE(OILPAN) 3565 #if ENABLE(OILPAN)
3566 if (hasRareData()) 3566 if (hasRareData())
3567 visitor->trace(elementRareData()); 3567 visitor->trace(elementRareData());
3568 visitor->trace(m_elementData); 3568 visitor->trace(m_elementData);
3569 #endif 3569 #endif
3570 ContainerNode::trace(visitor); 3570 ContainerNode::trace(visitor);
3571 } 3571 }
3572 3572
3573 } // namespace blink 3573 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698