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 4701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 } |
OLD | NEW |