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 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2029 case CSSPropertyWebkitMarginStart: | 2029 case CSSPropertyWebkitMarginStart: |
2030 case CSSPropertyWebkitMarginEnd: | 2030 case CSSPropertyWebkitMarginEnd: |
2031 case CSSPropertyWebkitMarginBefore: | 2031 case CSSPropertyWebkitMarginBefore: |
2032 case CSSPropertyWebkitMarginAfter: | 2032 case CSSPropertyWebkitMarginAfter: |
2033 if (id == CSSValueAuto) | 2033 if (id == CSSValueAuto) |
2034 validPrimitive = true; | 2034 validPrimitive = true; |
2035 else | 2035 else |
2036 validPrimitive = (!id && validUnit(value, FLength | FPercent)); | 2036 validPrimitive = (!id && validUnit(value, FLength | FPercent)); |
2037 break; | 2037 break; |
2038 | 2038 |
2039 case CSSPropertyZIndex: // auto | <integer> | inherit | |
2040 if (id == CSSValueAuto) { | |
2041 validPrimitive = true; | |
2042 break; | |
2043 } | |
2044 /* nobreak */ | |
2045 case CSSPropertyOrphans: // <integer> | inherit | auto (We've added support
for auto for backwards compatibility) | 2039 case CSSPropertyOrphans: // <integer> | inherit | auto (We've added support
for auto for backwards compatibility) |
2046 case CSSPropertyWidows: // <integer> | inherit | auto (Ditto) | 2040 case CSSPropertyWidows: // <integer> | inherit | auto (Ditto) |
2047 if (id == CSSValueAuto) | 2041 if (id == CSSValueAuto) |
2048 validPrimitive = true; | 2042 validPrimitive = true; |
2049 else | 2043 else |
| 2044 validPrimitive = (!id && validUnit(value, FPositiveInteger, HTMLQuir
ksMode)); |
| 2045 break; |
| 2046 |
| 2047 case CSSPropertyZIndex: // auto | <integer> | inherit |
| 2048 if (id == CSSValueAuto) |
| 2049 validPrimitive = true; |
| 2050 else |
2050 validPrimitive = (!id && validUnit(value, FInteger, HTMLQuirksMode))
; | 2051 validPrimitive = (!id && validUnit(value, FInteger, HTMLQuirksMode))
; |
2051 break; | 2052 break; |
2052 | 2053 |
2053 case CSSPropertyLineHeight: | 2054 case CSSPropertyLineHeight: |
2054 return parseLineHeight(important); | 2055 return parseLineHeight(important); |
2055 case CSSPropertyCounterIncrement: // [ <identifier> <integer>? ]+ | none
| inherit | 2056 case CSSPropertyCounterIncrement: // [ <identifier> <integer>? ]+ | none
| inherit |
2056 if (id != CSSValueNone) | 2057 if (id != CSSValueNone) |
2057 return parseCounter(propId, 1, important); | 2058 return parseCounter(propId, 1, important); |
2058 validPrimitive = true; | 2059 validPrimitive = true; |
2059 break; | 2060 break; |
(...skipping 8396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10456 { | 10457 { |
10457 // The tokenizer checks for the construct of an+b. | 10458 // The tokenizer checks for the construct of an+b. |
10458 // However, since the {ident} rule precedes the {nth} rule, some of those | 10459 // However, since the {ident} rule precedes the {nth} rule, some of those |
10459 // tokens are identified as string literal. Furthermore we need to accept | 10460 // tokens are identified as string literal. Furthermore we need to accept |
10460 // "odd" and "even" which does not match to an+b. | 10461 // "odd" and "even" which does not match to an+b. |
10461 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") | 10462 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") |
10462 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 10463 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
10463 } | 10464 } |
10464 | 10465 |
10465 } | 10466 } |
OLD | NEW |