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

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

Issue 23903041: Make the Vector copy constructor for mismatched inline sizes explicit. (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 | « no previous file | Source/core/css/CSSValueList.cpp » ('j') | Source/core/css/CSSValueList.cpp » ('J')
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 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 cssyyparse(this); 1221 cssyyparse(this);
1222 1222
1223 m_rule = 0; 1223 m_rule = 0;
1224 m_id = CSSPropertyInvalid; 1224 m_id = CSSPropertyInvalid;
1225 1225
1226 bool ok = false; 1226 bool ok = false;
1227 if (m_hasFontFaceOnlyValues) 1227 if (m_hasFontFaceOnlyValues)
1228 deleteFontFaceOnlyValues(); 1228 deleteFontFaceOnlyValues();
1229 if (!m_parsedProperties.isEmpty()) { 1229 if (!m_parsedProperties.isEmpty()) {
1230 ok = true; 1230 ok = true;
1231 declaration->addParsedProperties(m_parsedProperties); 1231 declaration->addParsedProperties(Vector<CSSProperty>(m_parsedProperties) );
1232 clearProperties(); 1232 clearProperties();
1233 } 1233 }
1234 1234
1235 return ok; 1235 return ok;
1236 } 1236 }
1237 1237
1238 // The color will only be changed when string contains a valid CSS color, so cal lers 1238 // The color will only be changed when string contains a valid CSS color, so cal lers
1239 // can set it to a default color and ignore the boolean result. 1239 // can set it to a default color and ignore the boolean result.
1240 bool CSSParser::parseColor(RGBA32& color, const String& string, bool strict) 1240 bool CSSParser::parseColor(RGBA32& color, const String& string, bool strict)
1241 { 1241 {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 m_sourceDataHandler->startRuleBody(0); 1334 m_sourceDataHandler->startRuleBody(0);
1335 } 1335 }
1336 cssyyparse(this); 1336 cssyyparse(this);
1337 m_rule = 0; 1337 m_rule = 0;
1338 1338
1339 bool ok = false; 1339 bool ok = false;
1340 if (m_hasFontFaceOnlyValues) 1340 if (m_hasFontFaceOnlyValues)
1341 deleteFontFaceOnlyValues(); 1341 deleteFontFaceOnlyValues();
1342 if (!m_parsedProperties.isEmpty()) { 1342 if (!m_parsedProperties.isEmpty()) {
1343 ok = true; 1343 ok = true;
1344 declaration->addParsedProperties(m_parsedProperties); 1344 declaration->addParsedProperties(Vector<CSSProperty>(m_parsedProperties) );
1345 clearProperties(); 1345 clearProperties();
1346 } 1346 }
1347 1347
1348 if (m_sourceDataHandler) 1348 if (m_sourceDataHandler)
1349 m_sourceDataHandler->endRuleBody(string.length(), false); 1349 m_sourceDataHandler->endRuleBody(string.length(), false);
1350 m_sourceDataHandler = 0; 1350 m_sourceDataHandler = 0;
1351 1351
1352 return ok; 1352 return ok;
1353 } 1353 }
1354 1354
(...skipping 10634 matching lines...) Expand 10 before | Expand all | Expand 10 after
11989 { 11989 {
11990 // The tokenizer checks for the construct of an+b. 11990 // The tokenizer checks for the construct of an+b.
11991 // However, since the {ident} rule precedes the {nth} rule, some of those 11991 // However, since the {ident} rule precedes the {nth} rule, some of those
11992 // tokens are identified as string literal. Furthermore we need to accept 11992 // tokens are identified as string literal. Furthermore we need to accept
11993 // "odd" and "even" which does not match to an+b. 11993 // "odd" and "even" which does not match to an+b.
11994 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 11994 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
11995 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 11995 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
11996 } 11996 }
11997 11997
11998 } 11998 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/CSSValueList.cpp » ('j') | Source/core/css/CSSValueList.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698