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

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

Issue 19668006: [CSS Grid Layout] infinity should be defined as a negative value (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
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 4701 matching lines...) Expand 10 before | Expand all | Expand 10 after
4712 if (currentValue->unit == CSSPrimitiveValue::CSS_FR) { 4712 if (currentValue->unit == CSSPrimitiveValue::CSS_FR) {
4713 double flexValue = currentValue->fValue; 4713 double flexValue = currentValue->fValue;
4714 4714
4715 // Fractional unit is a non-negative dimension. 4715 // Fractional unit is a non-negative dimension.
4716 if (flexValue <= 0) 4716 if (flexValue <= 0)
4717 return 0; 4717 return 0;
4718 4718
4719 return cssValuePool().createValue(flexValue, CSSPrimitiveValue::CSS_FR); 4719 return cssValuePool().createValue(flexValue, CSSPrimitiveValue::CSS_FR);
4720 } 4720 }
4721 4721
4722 if (!validUnit(currentValue, FLength | FPercent)) 4722 if (!validUnit(currentValue, FNonNeg | FLength | FPercent))
4723 return 0; 4723 return 0;
4724 4724
4725 return createPrimitiveNumericValue(currentValue); 4725 return createPrimitiveNumericValue(currentValue);
4726 } 4726 }
4727 4727
4728 PassRefPtr<CSSValue> CSSParser::parseCounterContent(CSSParserValueList* args, bo ol counters) 4728 PassRefPtr<CSSValue> CSSParser::parseCounterContent(CSSParserValueList* args, bo ol counters)
4729 { 4729 {
4730 unsigned numArgs = args->size(); 4730 unsigned numArgs = args->size();
4731 if (counters && numArgs != 3 && numArgs != 5) 4731 if (counters && numArgs != 3 && numArgs != 5)
4732 return 0; 4732 return 0;
(...skipping 7007 matching lines...) Expand 10 before | Expand all | Expand 10 after
11740 { 11740 {
11741 // The tokenizer checks for the construct of an+b. 11741 // The tokenizer checks for the construct of an+b.
11742 // However, since the {ident} rule precedes the {nth} rule, some of those 11742 // However, since the {ident} rule precedes the {nth} rule, some of those
11743 // tokens are identified as string literal. Furthermore we need to accept 11743 // tokens are identified as string literal. Furthermore we need to accept
11744 // "odd" and "even" which does not match to an+b. 11744 // "odd" and "even" which does not match to an+b.
11745 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 11745 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
11746 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 11746 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
11747 } 11747 }
11748 11748
11749 } 11749 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js ('k') | Source/core/rendering/RenderGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698