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

Side by Side Diff: Source/core/css/parser/CSSPropertyParser.cpp

Issue 345903005: calc expressions should support time, angle and frequency values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated patch Created 6 years, 5 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 | « Source/core/css/CSSPrimitiveValue.cpp ('k') | Source/core/css/resolver/CSSToStyleMap.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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 b = true; 218 b = true;
219 if (b && mustBeNonNegative && m_parsedCalculation->isNegative()) 219 if (b && mustBeNonNegative && m_parsedCalculation->isNegative())
220 b = false; 220 b = false;
221 break; 221 break;
222 case CalcPercentLength: 222 case CalcPercentLength:
223 b = (unitflags & FPercent) && (unitflags & FLength); 223 b = (unitflags & FPercent) && (unitflags & FLength);
224 break; 224 break;
225 case CalcPercentNumber: 225 case CalcPercentNumber:
226 b = (unitflags & FPercent) && (unitflags & FNumber); 226 b = (unitflags & FPercent) && (unitflags & FNumber);
227 break; 227 break;
228 case CalcAngle:
229 b = (unitflags & FAngle);
230 break;
231 case CalcTime:
232 b = (unitflags & FTime);
233 break;
234 case CalcFrequency:
235 b = (unitflags & FFrequency);
236 break;
228 case CalcOther: 237 case CalcOther:
229 break; 238 break;
230 } 239 }
231 if (!b || releaseCalc == ReleaseParsedCalcValue) 240 if (!b || releaseCalc == ReleaseParsedCalcValue)
232 m_parsedCalculation.release(); 241 m_parsedCalculation.release();
233 return b; 242 return b;
234 } 243 }
235 244
236 inline bool CSSPropertyParser::shouldAcceptUnitLessValues(CSSParserValue* value, Units unitflags, CSSParserMode cssParserMode) 245 inline bool CSSPropertyParser::shouldAcceptUnitLessValues(CSSParserValue* value, Units unitflags, CSSParserMode cssParserMode)
237 { 246 {
(...skipping 8264 matching lines...) Expand 10 before | Expand all | Expand 10 after
8502 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); 8511 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill));
8503 if (!seenStroke) 8512 if (!seenStroke)
8504 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke) ); 8513 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke) );
8505 if (!seenMarkers) 8514 if (!seenMarkers)
8506 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers )); 8515 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers ));
8507 8516
8508 return parsedValues.release(); 8517 return parsedValues.release();
8509 } 8518 }
8510 8519
8511 } // namespace blink 8520 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/CSSPrimitiveValue.cpp ('k') | Source/core/css/resolver/CSSToStyleMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698