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

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

Issue 478233004: Flexbox flex: 1 incorrectly sets flex-basis to 0px (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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 5771 matching lines...) Expand 10 before | Expand all | Expand 10 after
5782 return false; 5782 return false;
5783 } 5783 }
5784 args->next(); 5784 args->next();
5785 } 5785 }
5786 5786
5787 if (flexGrow == unsetValue) 5787 if (flexGrow == unsetValue)
5788 flexGrow = 1; 5788 flexGrow = 1;
5789 if (flexShrink == unsetValue) 5789 if (flexShrink == unsetValue)
5790 flexShrink = 1; 5790 flexShrink = 1;
5791 if (!flexBasis) 5791 if (!flexBasis)
5792 flexBasis = cssValuePool().createValue(0, CSSPrimitiveValue::CSS_PX); 5792 flexBasis = cssValuePool().createValue(0, CSSPrimitiveValue::CSS_PERCENT AGE);
5793 5793
5794 addProperty(CSSPropertyFlexGrow, cssValuePool().createValue(clampToFloat(fle xGrow), CSSPrimitiveValue::CSS_NUMBER), important); 5794 addProperty(CSSPropertyFlexGrow, cssValuePool().createValue(clampToFloat(fle xGrow), CSSPrimitiveValue::CSS_NUMBER), important);
5795 addProperty(CSSPropertyFlexShrink, cssValuePool().createValue(clampToFloat(f lexShrink), CSSPrimitiveValue::CSS_NUMBER), important); 5795 addProperty(CSSPropertyFlexShrink, cssValuePool().createValue(clampToFloat(f lexShrink), CSSPrimitiveValue::CSS_NUMBER), important);
5796 addProperty(CSSPropertyFlexBasis, flexBasis, important); 5796 addProperty(CSSPropertyFlexBasis, flexBasis, important);
5797 return true; 5797 return true;
5798 } 5798 }
5799 5799
5800 bool CSSPropertyParser::parseObjectPosition(bool important) 5800 bool CSSPropertyParser::parseObjectPosition(bool important)
5801 { 5801 {
5802 RefPtrWillBeRawPtr<CSSValue> xValue = nullptr; 5802 RefPtrWillBeRawPtr<CSSValue> xValue = nullptr;
(...skipping 2631 matching lines...) Expand 10 before | Expand all | Expand 10 after
8434 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); 8434 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill));
8435 if (!seenStroke) 8435 if (!seenStroke)
8436 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke) ); 8436 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke) );
8437 if (!seenMarkers) 8437 if (!seenMarkers)
8438 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers )); 8438 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers ));
8439 8439
8440 return parsedValues.release(); 8440 return parsedValues.release();
8441 } 8441 }
8442 8442
8443 } // namespace blink 8443 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/css3/flexbox/percentage-sizes-quirks.html ('k') | Source/core/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698