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

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

Issue 141273002: Code problems detected by cppcheck (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add a few more fixes Created 6 years, 11 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
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 3905 matching lines...) Expand 10 before | Expand all | Expand 10 after
3916 return; 3916 return;
3917 3917
3918 // Parse the first value. We're just making sure that it is one of the valid keywords or a percentage/length. 3918 // Parse the first value. We're just making sure that it is one of the valid keywords or a percentage/length.
3919 unsigned cumulativeFlags = 0; 3919 unsigned cumulativeFlags = 0;
3920 FillPositionFlag value1Flag = InvalidFillPosition; 3920 FillPositionFlag value1Flag = InvalidFillPosition;
3921 FillPositionFlag value2Flag = InvalidFillPosition; 3921 FillPositionFlag value2Flag = InvalidFillPosition;
3922 value1 = parseFillPositionComponent(valueList, cumulativeFlags, value1Flag, ResolveValuesAsKeyword); 3922 value1 = parseFillPositionComponent(valueList, cumulativeFlags, value1Flag, ResolveValuesAsKeyword);
3923 if (!value1) 3923 if (!value1)
3924 return; 3924 return;
3925 3925
3926 value = valueList->next(); 3926 valueList->next();
3927 3927
3928 // In case we are parsing more than two values, relax the check inside of pa rseFillPositionComponent. top 20px is 3928 // In case we are parsing more than two values, relax the check inside of pa rseFillPositionComponent. top 20px is
3929 // a valid start for <position>. 3929 // a valid start for <position>.
3930 cumulativeFlags = AmbiguousFillPosition; 3930 cumulativeFlags = AmbiguousFillPosition;
3931 value2 = parseFillPositionComponent(valueList, cumulativeFlags, value2Flag, ResolveValuesAsKeyword); 3931 value2 = parseFillPositionComponent(valueList, cumulativeFlags, value2Flag, ResolveValuesAsKeyword);
3932 if (value2) 3932 if (value2)
3933 valueList->next(); 3933 valueList->next();
3934 else { 3934 else {
3935 value1.clear(); 3935 value1.clear();
3936 return; 3936 return;
(...skipping 6214 matching lines...) Expand 10 before | Expand all | Expand 10 after
10151 { 10151 {
10152 // The tokenizer checks for the construct of an+b. 10152 // The tokenizer checks for the construct of an+b.
10153 // However, since the {ident} rule precedes the {nth} rule, some of those 10153 // However, since the {ident} rule precedes the {nth} rule, some of those
10154 // tokens are identified as string literal. Furthermore we need to accept 10154 // tokens are identified as string literal. Furthermore we need to accept
10155 // "odd" and "even" which does not match to an+b. 10155 // "odd" and "even" which does not match to an+b.
10156 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 10156 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
10157 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 10157 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
10158 } 10158 }
10159 10159
10160 } 10160 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/ContainerNode.cpp » ('j') | Source/core/rendering/style/BasicShapes.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698