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

Side by Side Diff: Source/core/css/CSSParser-in.cpp

Issue 23464095: WTF::notFound looks too much like a local variable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSFontFaceSource.cpp ('k') | Source/core/css/CSSSelector.cpp » ('j') | 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) 2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. 9 * Copyright (C) 2012 Intel Corporation. All rights reserved.
10 * 10 *
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 1080
1081 declaration->addParsedProperty(CSSProperty(propertyId, value.release(), impo rtant)); 1081 declaration->addParsedProperty(CSSProperty(propertyId, value.release(), impo rtant));
1082 return true; 1082 return true;
1083 } 1083 }
1084 1084
1085 template <typename CharacterType> 1085 template <typename CharacterType>
1086 static bool parseTransformArguments(CSSTransformValue* transformValue, Character Type* characters, unsigned length, unsigned start, unsigned expectedCount) 1086 static bool parseTransformArguments(CSSTransformValue* transformValue, Character Type* characters, unsigned length, unsigned start, unsigned expectedCount)
1087 { 1087 {
1088 while (expectedCount) { 1088 while (expectedCount) {
1089 size_t end = WTF::find(characters, length, expectedCount == 1 ? ')' : ', ', start); 1089 size_t end = WTF::find(characters, length, expectedCount == 1 ? ')' : ', ', start);
1090 if (end == notFound || (expectedCount == 1 && end != length - 1)) 1090 if (end == kNotFound || (expectedCount == 1 && end != length - 1))
1091 return false; 1091 return false;
1092 unsigned argumentLength = end - start; 1092 unsigned argumentLength = end - start;
1093 CSSPrimitiveValue::UnitTypes unit = CSSPrimitiveValue::CSS_NUMBER; 1093 CSSPrimitiveValue::UnitTypes unit = CSSPrimitiveValue::CSS_NUMBER;
1094 double number; 1094 double number;
1095 if (!parseSimpleLength(characters + start, argumentLength, unit, number) ) 1095 if (!parseSimpleLength(characters + start, argumentLength, unit, number) )
1096 return false; 1096 return false;
1097 if (unit != CSSPrimitiveValue::CSS_PX && (number || unit != CSSPrimitive Value::CSS_NUMBER)) 1097 if (unit != CSSPrimitiveValue::CSS_PX && (number || unit != CSSPrimitive Value::CSS_NUMBER))
1098 return false; 1098 return false;
1099 transformValue->append(cssValuePool().createValue(number, unit)); 1099 transformValue->append(cssValuePool().createValue(number, unit));
1100 start = end + 1; 1100 start = end + 1;
(...skipping 10900 matching lines...) Expand 10 before | Expand all | Expand 10 after
12001 { 12001 {
12002 // The tokenizer checks for the construct of an+b. 12002 // The tokenizer checks for the construct of an+b.
12003 // However, since the {ident} rule precedes the {nth} rule, some of those 12003 // However, since the {ident} rule precedes the {nth} rule, some of those
12004 // tokens are identified as string literal. Furthermore we need to accept 12004 // tokens are identified as string literal. Furthermore we need to accept
12005 // "odd" and "even" which does not match to an+b. 12005 // "odd" and "even" which does not match to an+b.
12006 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 12006 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
12007 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 12007 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
12008 } 12008 }
12009 12009
12010 } 12010 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSFontFaceSource.cpp ('k') | Source/core/css/CSSSelector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698