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 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1393 break; | 1393 break; |
1394 default: | 1394 default: |
1395 break; | 1395 break; |
1396 } | 1396 } |
1397 } else { | 1397 } else { |
1398 svgStyle->setBaselineShift(BS_LENGTH); | 1398 svgStyle->setBaselineShift(BS_LENGTH); |
1399 svgStyle->setBaselineShiftValue(SVGLength::fromCSSPrimitiveValue(primiti
veValue)); | 1399 svgStyle->setBaselineShiftValue(SVGLength::fromCSSPrimitiveValue(primiti
veValue)); |
1400 } | 1400 } |
1401 } | 1401 } |
1402 | 1402 |
| 1403 void StyleBuilderFunctions::applyValueCSSPropertyGridAutoFlow(StyleResolverState
& state, CSSValue* value) |
| 1404 { |
| 1405 ASSERT(value->isValueList()); |
| 1406 CSSValueList* list = toCSSValueList(value); |
| 1407 |
| 1408 CSSPrimitiveValue* first = list->length() >= 1 ? toCSSPrimitiveValue(list->i
tem(0)) : nullptr; |
| 1409 |
| 1410 if (!first) { |
| 1411 applyInitialCSSPropertyGridAutoFlow(state); |
| 1412 return; |
| 1413 } |
| 1414 |
| 1415 CSSPrimitiveValue* second = list->length() == 2 ? toCSSPrimitiveValue(list->
item(1)) : nullptr; |
| 1416 |
| 1417 GridAutoFlow autoFlow = RenderStyle::initialGridAutoFlow(); |
| 1418 switch (first->getValueID()) { |
| 1419 case CSSValueRow: |
| 1420 if (second) { |
| 1421 if (second->getValueID() == CSSValueDense) |
| 1422 autoFlow = AutoFlowRowDense; |
| 1423 else |
| 1424 autoFlow = AutoFlowStackRow; |
| 1425 } else { |
| 1426 autoFlow = AutoFlowRow; |
| 1427 } |
| 1428 break; |
| 1429 case CSSValueColumn: |
| 1430 if (second) { |
| 1431 if (second->getValueID() == CSSValueDense) |
| 1432 autoFlow = AutoFlowColumnDense; |
| 1433 else |
| 1434 autoFlow = AutoFlowStackColumn; |
| 1435 } else { |
| 1436 autoFlow = AutoFlowColumn; |
| 1437 } |
| 1438 break; |
| 1439 case CSSValueDense: |
| 1440 if (second && second->getValueID() == CSSValueColumn) |
| 1441 autoFlow = AutoFlowColumnDense; |
| 1442 else |
| 1443 autoFlow = AutoFlowRowDense; |
| 1444 break; |
| 1445 case CSSValueStack: |
| 1446 if (second && second->getValueID() == CSSValueColumn) |
| 1447 autoFlow = AutoFlowStackColumn; |
| 1448 else |
| 1449 autoFlow = AutoFlowStackRow; |
| 1450 break; |
| 1451 default: |
| 1452 ASSERT_NOT_REACHED(); |
| 1453 break; |
| 1454 } |
| 1455 |
| 1456 state.style()->setGridAutoFlow(autoFlow); |
| 1457 } |
| 1458 |
1403 } // namespace WebCore | 1459 } // namespace WebCore |
OLD | NEW |