| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 ASSERT(!m_parsedCalculation); | 258 ASSERT(!m_parsedCalculation); |
| 259 | 259 |
| 260 RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr; | 260 RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr; |
| 261 | 261 |
| 262 switch (propId) { | 262 switch (propId) { |
| 263 case CSSPropertyGridAutoFlow: | 263 case CSSPropertyGridAutoFlow: |
| 264 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); | 264 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); |
| 265 parsedValue = parseGridAutoFlow(*m_valueList); | 265 parsedValue = parseGridAutoFlow(*m_valueList); |
| 266 break; | 266 break; |
| 267 | 267 |
| 268 case CSSPropertyGridTemplateColumns: | |
| 269 case CSSPropertyGridTemplateRows: | |
| 270 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); | |
| 271 parsedValue = parseGridTrackList(); | |
| 272 break; | |
| 273 | |
| 274 case CSSPropertyGridTemplateAreas: | 268 case CSSPropertyGridTemplateAreas: |
| 275 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); | 269 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); |
| 276 parsedValue = parseGridTemplateAreas(); | 270 parsedValue = parseGridTemplateAreas(); |
| 277 break; | 271 break; |
| 278 | 272 |
| 279 // Everything else is handled in CSSPropertyParser.cpp | 273 // Everything else is handled in CSSPropertyParser.cpp |
| 280 default: | 274 default: |
| 281 return nullptr; | 275 return nullptr; |
| 282 } | 276 } |
| 283 | 277 |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 return false; | 526 return false; |
| 533 | 527 |
| 534 if (!previousNamedAreaTrailingLineNames) | 528 if (!previousNamedAreaTrailingLineNames) |
| 535 valueList.append(lineNames.release()); | 529 valueList.append(lineNames.release()); |
| 536 | 530 |
| 537 // Consume ']' | 531 // Consume ']' |
| 538 inputList.next(); | 532 inputList.next(); |
| 539 return true; | 533 return true; |
| 540 } | 534 } |
| 541 | 535 |
| 542 static bool allTracksAreFixedSized(CSSValueList& valueList) | 536 bool allTracksAreFixedSized(CSSValueList& valueList) |
| 543 { | 537 { |
| 544 for (auto value : valueList) { | 538 for (auto value : valueList) { |
| 545 if (value->isGridLineNamesValue()) | 539 if (value->isGridLineNamesValue()) |
| 546 continue; | 540 continue; |
| 547 // The auto-repeat value holds a <fixed-size> = <fixed-breadth> | minmax
( <fixed-breadth>, <track-breadth> ) | 541 // The auto-repeat value holds a <fixed-size> = <fixed-breadth> | minmax
( <fixed-breadth>, <track-breadth> ) |
| 548 if (value->isGridAutoRepeatValue()) { | 542 if (value->isGridAutoRepeatValue()) { |
| 549 if (!allTracksAreFixedSized(toCSSValueList(*value))) | 543 if (!allTracksAreFixedSized(toCSSValueList(*value))) |
| 550 return false; | 544 return false; |
| 551 continue; | 545 continue; |
| 552 } | 546 } |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 ASSERT(!m_parsedCalculation); | 900 ASSERT(!m_parsedCalculation); |
| 907 m_parsedCalculation = CSSCalcValue::create(args, range); | 901 m_parsedCalculation = CSSCalcValue::create(args, range); |
| 908 | 902 |
| 909 if (!m_parsedCalculation) | 903 if (!m_parsedCalculation) |
| 910 return false; | 904 return false; |
| 911 | 905 |
| 912 return true; | 906 return true; |
| 913 } | 907 } |
| 914 | 908 |
| 915 } // namespace blink | 909 } // namespace blink |
| OLD | NEW |