| 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 3598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3609 | 3609 |
| 3610 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseGridBreadth(CS
SParserValue* currentValue) | 3610 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseGridBreadth(CS
SParserValue* currentValue) |
| 3611 { | 3611 { |
| 3612 if (currentValue->id == CSSValueMinContent || currentValue->id == CSSValueMa
xContent || currentValue->id == CSSValueAuto) | 3612 if (currentValue->id == CSSValueMinContent || currentValue->id == CSSValueMa
xContent || currentValue->id == CSSValueAuto) |
| 3613 return cssValuePool().createIdentifierValue(currentValue->id); | 3613 return cssValuePool().createIdentifierValue(currentValue->id); |
| 3614 | 3614 |
| 3615 if (currentValue->unit() == CSSPrimitiveValue::UnitType::Fraction) { | 3615 if (currentValue->unit() == CSSPrimitiveValue::UnitType::Fraction) { |
| 3616 double flexValue = currentValue->fValue; | 3616 double flexValue = currentValue->fValue; |
| 3617 | 3617 |
| 3618 // Fractional unit is a non-negative dimension. | 3618 // Fractional unit is a non-negative dimension. |
| 3619 if (flexValue <= 0) | 3619 if (flexValue < 0) |
| 3620 return nullptr; | 3620 return nullptr; |
| 3621 | 3621 |
| 3622 return cssValuePool().createValue(flexValue, CSSPrimitiveValue::UnitType
::Fraction); | 3622 return cssValuePool().createValue(flexValue, CSSPrimitiveValue::UnitType
::Fraction); |
| 3623 } | 3623 } |
| 3624 | 3624 |
| 3625 if (!validUnit(currentValue, FNonNeg | FLength | FPercent)) | 3625 if (!validUnit(currentValue, FNonNeg | FLength | FPercent)) |
| 3626 return nullptr; | 3626 return nullptr; |
| 3627 | 3627 |
| 3628 return createPrimitiveNumericValue(currentValue); | 3628 return createPrimitiveNumericValue(currentValue); |
| 3629 } | 3629 } |
| (...skipping 4097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7727 } | 7727 } |
| 7728 } | 7728 } |
| 7729 | 7729 |
| 7730 if (!list->length()) | 7730 if (!list->length()) |
| 7731 return nullptr; | 7731 return nullptr; |
| 7732 | 7732 |
| 7733 return list.release(); | 7733 return list.release(); |
| 7734 } | 7734 } |
| 7735 | 7735 |
| 7736 } // namespace blink | 7736 } // namespace blink |
| OLD | NEW |