OLD | NEW |
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 5717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5728 flexGrow = arg->fValue; | 5728 flexGrow = arg->fValue; |
5729 else if (flexShrink == unsetValue) | 5729 else if (flexShrink == unsetValue) |
5730 flexShrink = arg->fValue; | 5730 flexShrink = arg->fValue; |
5731 else if (!arg->fValue) { | 5731 else if (!arg->fValue) { |
5732 // flex only allows a basis of 0 (sans units) if flex-grow and f
lex-shrink values have already been set. | 5732 // flex only allows a basis of 0 (sans units) if flex-grow and f
lex-shrink values have already been set. |
5733 flexBasis = cssValuePool().createValue(0, CSSPrimitiveValue::CSS
_PX); | 5733 flexBasis = cssValuePool().createValue(0, CSSPrimitiveValue::CSS
_PX); |
5734 } else { | 5734 } else { |
5735 // We only allow 3 numbers without units if the last value is 0.
E.g., flex:1 1 1 is invalid. | 5735 // We only allow 3 numbers without units if the last value is 0.
E.g., flex:1 1 1 is invalid. |
5736 return false; | 5736 return false; |
5737 } | 5737 } |
5738 } else if (!flexBasis && (arg->id == CSSValueAuto || (validUnit(arg, FLe
ngth | FPercent | FNonNeg) && !isFlexBasisMiddleArg(flexGrow, flexShrink, unsetV
alue, args->size())))) | 5738 } else if (!flexBasis && (arg->id == CSSValueAuto || validUnit(arg, FLen
gth | FPercent | FNonNeg)) && !isFlexBasisMiddleArg(flexGrow, flexShrink, unsetV
alue, args->size())) |
5739 flexBasis = parseValidPrimitive(arg->id, arg); | 5739 flexBasis = parseValidPrimitive(arg->id, arg); |
5740 else { | 5740 else { |
5741 // Not a valid arg for flex. | 5741 // Not a valid arg for flex. |
5742 return false; | 5742 return false; |
5743 } | 5743 } |
5744 args->next(); | 5744 args->next(); |
5745 } | 5745 } |
5746 | 5746 |
5747 if (flexGrow == unsetValue) | 5747 if (flexGrow == unsetValue) |
5748 flexGrow = 1; | 5748 flexGrow = 1; |
(...skipping 2753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8502 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); | 8502 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); |
8503 if (!seenStroke) | 8503 if (!seenStroke) |
8504 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke)
); | 8504 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke)
); |
8505 if (!seenMarkers) | 8505 if (!seenMarkers) |
8506 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers
)); | 8506 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers
)); |
8507 | 8507 |
8508 return parsedValues.release(); | 8508 return parsedValues.release(); |
8509 } | 8509 } |
8510 | 8510 |
8511 } // namespace blink | 8511 } // namespace blink |
OLD | NEW |