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 2564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2575 else | 2575 else |
2576 validPrimitive = validUnit(value, FNumber | FNonNeg) && value->fValu
e == 1; | 2576 validPrimitive = validUnit(value, FNumber | FNonNeg) && value->fValu
e == 1; |
2577 break; | 2577 break; |
2578 case CSSPropertyWebkitColumnWidth: // auto | <length> | 2578 case CSSPropertyWebkitColumnWidth: // auto | <length> |
2579 parsedValue = parseColumnWidth(); | 2579 parsedValue = parseColumnWidth(); |
2580 break; | 2580 break; |
2581 // End of CSS3 properties | 2581 // End of CSS3 properties |
2582 | 2582 |
2583 // Apple specific properties. These will never be standardized and are pure
ly to | 2583 // Apple specific properties. These will never be standardized and are pure
ly to |
2584 // support custom WebKit-based Apple applications. | 2584 // support custom WebKit-based Apple applications. |
2585 case CSSPropertyWebkitLineClamp: | |
2586 // When specifying number of lines, don't allow 0 as a valid value | |
2587 // When specifying either type of unit, require non-negative integers | |
2588 validPrimitive = (!id && (value->unit == CSSPrimitiveValue::CSS_PERCENTA
GE || value->fValue) && validUnit(value, FInteger | FPercent | FNonNeg, CSSQuirk
sMode)); | |
2589 break; | |
2590 | |
2591 case CSSPropertyWebkitFontSizeDelta: // <length> | 2585 case CSSPropertyWebkitFontSizeDelta: // <length> |
2592 validPrimitive = validUnit(value, FLength); | 2586 validPrimitive = validUnit(value, FLength); |
2593 break; | 2587 break; |
2594 | 2588 |
2595 case CSSPropertyWebkitHighlight: | 2589 case CSSPropertyWebkitHighlight: |
2596 if (id == CSSValueNone || value->unit == CSSPrimitiveValue::CSS_STRING) | 2590 if (id == CSSValueNone || value->unit == CSSPrimitiveValue::CSS_STRING) |
2597 validPrimitive = true; | 2591 validPrimitive = true; |
2598 break; | 2592 break; |
2599 | 2593 |
2600 case CSSPropertyWebkitHyphenateCharacter: | 2594 case CSSPropertyWebkitHyphenateCharacter: |
(...skipping 9428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12029 { | 12023 { |
12030 // The tokenizer checks for the construct of an+b. | 12024 // The tokenizer checks for the construct of an+b. |
12031 // However, since the {ident} rule precedes the {nth} rule, some of those | 12025 // However, since the {ident} rule precedes the {nth} rule, some of those |
12032 // tokens are identified as string literal. Furthermore we need to accept | 12026 // tokens are identified as string literal. Furthermore we need to accept |
12033 // "odd" and "even" which does not match to an+b. | 12027 // "odd" and "even" which does not match to an+b. |
12034 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") | 12028 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") |
12035 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 12029 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
12036 } | 12030 } |
12037 | 12031 |
12038 } | 12032 } |
OLD | NEW |