OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 } | 938 } |
939 | 939 |
940 // The parser should have rejected any <track-list> without any <track-size>
as | 940 // The parser should have rejected any <track-list> without any <track-size>
as |
941 // this is not conformant to the syntax. | 941 // this is not conformant to the syntax. |
942 ASSERT(!trackSizes.isEmpty()); | 942 ASSERT(!trackSizes.isEmpty()); |
943 return true; | 943 return true; |
944 } | 944 } |
945 | 945 |
946 static bool createGridPosition(CSSValue* value, GridPosition& position) | 946 static bool createGridPosition(CSSValue* value, GridPosition& position) |
947 { | 947 { |
948 // For now, we only accept: 'auto' | [ <integer> || <string> ] | span && <in
teger>? | 948 // We accept the specification's grammar: |
| 949 // 'auto' | [ <integer> || <string> ] | [ span && [ <integer> || string ] ]
| <ident> |
949 | 950 |
950 if (value->isPrimitiveValue()) { | 951 if (value->isPrimitiveValue()) { |
951 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 952 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 953 // We translate <ident> to <string> during parsing as it |
| 954 // makes handling it more simple. |
| 955 if (primitiveValue->isString()) { |
| 956 position.setNamedGridArea(primitiveValue->getStringValue()); |
| 957 return true; |
| 958 } |
| 959 |
952 ASSERT(primitiveValue->getValueID() == CSSValueAuto); | 960 ASSERT(primitiveValue->getValueID() == CSSValueAuto); |
953 return true; | 961 return true; |
954 } | 962 } |
955 | 963 |
956 CSSValueList* values = toCSSValueList(value); | 964 CSSValueList* values = toCSSValueList(value); |
957 ASSERT(values->length()); | 965 ASSERT(values->length()); |
958 | 966 |
959 bool isSpanPosition = false; | 967 bool isSpanPosition = false; |
960 // The specification makes the <integer> optional, in which case it default
to '1'. | 968 // The specification makes the <integer> optional, in which case it default
to '1'. |
961 int gridLineNumber = 1; | 969 int gridLineNumber = 1; |
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2245 break; | 2253 break; |
2246 } | 2254 } |
2247 case CSSPropertyEnableBackground: | 2255 case CSSPropertyEnableBackground: |
2248 // Silently ignoring this property for now | 2256 // Silently ignoring this property for now |
2249 // http://bugs.webkit.org/show_bug.cgi?id=6022 | 2257 // http://bugs.webkit.org/show_bug.cgi?id=6022 |
2250 break; | 2258 break; |
2251 } | 2259 } |
2252 } | 2260 } |
2253 | 2261 |
2254 } // namespace WebCore | 2262 } // namespace WebCore |
OLD | NEW |