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 3425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3436 | 3436 |
3437 if (!m_valueList->next()) | 3437 if (!m_valueList->next()) |
3438 return false; | 3438 return false; |
3439 | 3439 |
3440 property = parseGridPosition(); | 3440 property = parseGridPosition(); |
3441 return true; | 3441 return true; |
3442 } | 3442 } |
3443 | 3443 |
3444 void CSSPropertyParser::maybeParseGridLineNames(CSSParserValueList& inputList, C
SSValueList& valueList, CSSGridLineNamesValue* previousNamedAreaTrailingLineName
s) | 3444 void CSSPropertyParser::maybeParseGridLineNames(CSSParserValueList& inputList, C
SSValueList& valueList, CSSGridLineNamesValue* previousNamedAreaTrailingLineName
s) |
3445 { | 3445 { |
3446 if (!inputList.current() || inputList.current()->unit != CSSParserValue::Val
ueList) | 3446 if (!inputList.current() || inputList.current()->unit != CSSParserValue::Ope
rator || inputList.current()->iValue != '[') |
3447 return; | 3447 return; |
3448 | 3448 |
3449 CSSParserValueList* identList = inputList.current()->valueList; | 3449 // Skip '[' |
3450 if (!identList->size()) { | 3450 inputList.next(); |
3451 inputList.next(); | |
3452 return; | |
3453 } | |
3454 | |
3455 // Need to ensure the identList is at the heading index, since the parserLis
t might have been rewound. | |
3456 identList->setCurrentIndex(0); | |
3457 | 3451 |
3458 RefPtrWillBeRawPtr<CSSGridLineNamesValue> lineNames = previousNamedAreaTrail
ingLineNames; | 3452 RefPtrWillBeRawPtr<CSSGridLineNamesValue> lineNames = previousNamedAreaTrail
ingLineNames; |
3459 if (!lineNames) | 3453 if (!lineNames) |
3460 lineNames = CSSGridLineNamesValue::create(); | 3454 lineNames = CSSGridLineNamesValue::create(); |
3461 while (CSSParserValue* identValue = identList->current()) { | 3455 |
| 3456 while (CSSParserValue* identValue = inputList.current()) { |
| 3457 if (identValue->unit == CSSParserValue::Operator && identValue->iValue =
= ']') |
| 3458 break; |
| 3459 |
3462 if (identValue->unit != CSSPrimitiveValue::CSS_IDENT) | 3460 if (identValue->unit != CSSPrimitiveValue::CSS_IDENT) |
3463 return; | 3461 return; |
| 3462 |
3464 RefPtrWillBeRawPtr<CSSPrimitiveValue> lineName = createPrimitiveCustomId
entValue(identValue); | 3463 RefPtrWillBeRawPtr<CSSPrimitiveValue> lineName = createPrimitiveCustomId
entValue(identValue); |
3465 lineNames->append(lineName.release()); | 3464 lineNames->append(lineName.release()); |
3466 identList->next(); | 3465 inputList.next(); |
3467 } | 3466 } |
3468 if (!previousNamedAreaTrailingLineNames) | 3467 if (!previousNamedAreaTrailingLineNames) |
3469 valueList.append(lineNames.release()); | 3468 valueList.append(lineNames.release()); |
3470 | 3469 |
3471 inputList.next(); | 3470 inputList.next(); |
3472 } | 3471 } |
3473 | 3472 |
3474 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTrackList() | 3473 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTrackList() |
3475 { | 3474 { |
3476 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); | 3475 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); |
(...skipping 4908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8385 } | 8384 } |
8386 } | 8385 } |
8387 | 8386 |
8388 if (!list->length()) | 8387 if (!list->length()) |
8389 return nullptr; | 8388 return nullptr; |
8390 | 8389 |
8391 return list.release(); | 8390 return list.release(); |
8392 } | 8391 } |
8393 | 8392 |
8394 } // namespace blink | 8393 } // namespace blink |
OLD | NEW |