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

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: Patch for landing 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
« no previous file with comments | « no previous file | Source/core/dom/ContainerNode.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 3923 matching lines...) Expand 10 before | Expand all | Expand 10 after
3934 return; 3934 return;
3935 3935
3936 // Parse the first value. We're just making sure that it is one of the valid keywords or a percentage/length. 3936 // Parse the first value. We're just making sure that it is one of the valid keywords or a percentage/length.
3937 unsigned cumulativeFlags = 0; 3937 unsigned cumulativeFlags = 0;
3938 FillPositionFlag value1Flag = InvalidFillPosition; 3938 FillPositionFlag value1Flag = InvalidFillPosition;
3939 FillPositionFlag value2Flag = InvalidFillPosition; 3939 FillPositionFlag value2Flag = InvalidFillPosition;
3940 value1 = parseFillPositionComponent(valueList, cumulativeFlags, value1Flag, ResolveValuesAsKeyword); 3940 value1 = parseFillPositionComponent(valueList, cumulativeFlags, value1Flag, ResolveValuesAsKeyword);
3941 if (!value1) 3941 if (!value1)
3942 return; 3942 return;
3943 3943
3944 value = valueList->next(); 3944 valueList->next();
3945 3945
3946 // In case we are parsing more than two values, relax the check inside of pa rseFillPositionComponent. top 20px is 3946 // In case we are parsing more than two values, relax the check inside of pa rseFillPositionComponent. top 20px is
3947 // a valid start for <position>. 3947 // a valid start for <position>.
3948 cumulativeFlags = AmbiguousFillPosition; 3948 cumulativeFlags = AmbiguousFillPosition;
3949 value2 = parseFillPositionComponent(valueList, cumulativeFlags, value2Flag, ResolveValuesAsKeyword); 3949 value2 = parseFillPositionComponent(valueList, cumulativeFlags, value2Flag, ResolveValuesAsKeyword);
3950 if (value2) 3950 if (value2)
3951 valueList->next(); 3951 valueList->next();
3952 else { 3952 else {
3953 value1.clear(); 3953 value1.clear();
3954 return; 3954 return;
(...skipping 6214 matching lines...) Expand 10 before | Expand all | Expand 10 after
10169 { 10169 {
10170 // The tokenizer checks for the construct of an+b. 10170 // The tokenizer checks for the construct of an+b.
10171 // However, since the {ident} rule precedes the {nth} rule, some of those 10171 // However, since the {ident} rule precedes the {nth} rule, some of those
10172 // tokens are identified as string literal. Furthermore we need to accept 10172 // tokens are identified as string literal. Furthermore we need to accept
10173 // "odd" and "even" which does not match to an+b. 10173 // "odd" and "even" which does not match to an+b.
10174 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 10174 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
10175 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 10175 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
10176 } 10176 }
10177 10177
10178 } 10178 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698