| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * * Redistributions of source code must retain the above copyright | 4 * * Redistributions of source code must retain the above copyright |
| 5 * notice, this list of conditions and the following disclaimer. | 5 * notice, this list of conditions and the following disclaimer. |
| 6 * * Redistributions in binary form must reproduce the above | 6 * * Redistributions in binary form must reproduce the above |
| 7 * copyright notice, this list of conditions and the following disclaimer | 7 * copyright notice, this list of conditions and the following disclaimer |
| 8 * in the documentation and/or other materials provided with the | 8 * in the documentation and/or other materials provided with the |
| 9 * distribution. | 9 * distribution. |
| 10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 GridAutoFlow StyleBuilderConverter::convertGridAutoFlow(StyleResolverState&, CSS
Value* value) | 327 GridAutoFlow StyleBuilderConverter::convertGridAutoFlow(StyleResolverState&, CSS
Value* value) |
| 328 { | 328 { |
| 329 CSSValueList* list = toCSSValueList(value); | 329 CSSValueList* list = toCSSValueList(value); |
| 330 | 330 |
| 331 ASSERT(list->length() >= 1); | 331 ASSERT(list->length() >= 1); |
| 332 CSSPrimitiveValue* first = toCSSPrimitiveValue(list->item(0)); | 332 CSSPrimitiveValue* first = toCSSPrimitiveValue(list->item(0)); |
| 333 CSSPrimitiveValue* second = list->length() == 2 ? toCSSPrimitiveValue(list->
item(1)) : nullptr; | 333 CSSPrimitiveValue* second = list->length() == 2 ? toCSSPrimitiveValue(list->
item(1)) : nullptr; |
| 334 | 334 |
| 335 switch (first->getValueID()) { | 335 switch (first->getValueID()) { |
| 336 case CSSValueRow: | 336 case CSSValueRow: |
| 337 if (second) { | 337 if (second && second->getValueID() == CSSValueDense) |
| 338 if (second->getValueID() == CSSValueDense) | 338 return AutoFlowRowDense; |
| 339 return AutoFlowRowDense; | |
| 340 return AutoFlowStackRow; | |
| 341 } | |
| 342 return AutoFlowRow; | 339 return AutoFlowRow; |
| 343 case CSSValueColumn: | 340 case CSSValueColumn: |
| 344 if (second) { | 341 if (second && second->getValueID() == CSSValueDense) |
| 345 if (second->getValueID() == CSSValueDense) | 342 return AutoFlowColumnDense; |
| 346 return AutoFlowColumnDense; | |
| 347 return AutoFlowStackColumn; | |
| 348 } | |
| 349 return AutoFlowColumn; | 343 return AutoFlowColumn; |
| 350 case CSSValueDense: | 344 case CSSValueDense: |
| 351 if (second && second->getValueID() == CSSValueColumn) | 345 if (second && second->getValueID() == CSSValueColumn) |
| 352 return AutoFlowColumnDense; | 346 return AutoFlowColumnDense; |
| 353 return AutoFlowRowDense; | 347 return AutoFlowRowDense; |
| 354 case CSSValueStack: | |
| 355 if (second && second->getValueID() == CSSValueColumn) | |
| 356 return AutoFlowStackColumn; | |
| 357 return AutoFlowStackRow; | |
| 358 default: | 348 default: |
| 359 ASSERT_NOT_REACHED(); | 349 ASSERT_NOT_REACHED(); |
| 360 return RenderStyle::initialGridAutoFlow(); | 350 return RenderStyle::initialGridAutoFlow(); |
| 361 } | 351 } |
| 362 } | 352 } |
| 363 | 353 |
| 364 GridPosition StyleBuilderConverter::convertGridPosition(StyleResolverState&, CSS
Value* value) | 354 GridPosition StyleBuilderConverter::convertGridPosition(StyleResolverState&, CSS
Value* value) |
| 365 { | 355 { |
| 366 // We accept the specification's grammar: | 356 // We accept the specification's grammar: |
| 367 // 'auto' | [ <integer> || <custom-ident> ] | [ span && [ <integer> || <cust
om-ident> ] ] | <custom-ident> | 357 // 'auto' | [ <integer> || <custom-ident> ] | [ span && [ <integer> || <cust
om-ident> ] ] | <custom-ident> |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 CSSPrimitiveValue* primitiveValueZ = toCSSPrimitiveValue(list->item(2)); | 840 CSSPrimitiveValue* primitiveValueZ = toCSSPrimitiveValue(list->item(2)); |
| 851 | 841 |
| 852 return TransformOrigin( | 842 return TransformOrigin( |
| 853 convertOriginLength<CSSValueLeft, CSSValueRight>(state, primitiveValueX)
, | 843 convertOriginLength<CSSValueLeft, CSSValueRight>(state, primitiveValueX)
, |
| 854 convertOriginLength<CSSValueTop, CSSValueBottom>(state, primitiveValueY)
, | 844 convertOriginLength<CSSValueTop, CSSValueBottom>(state, primitiveValueY)
, |
| 855 StyleBuilderConverter::convertComputedLength<float>(state, primitiveValu
eZ) | 845 StyleBuilderConverter::convertComputedLength<float>(state, primitiveValu
eZ) |
| 856 ); | 846 ); |
| 857 } | 847 } |
| 858 | 848 |
| 859 } // namespace blink | 849 } // namespace blink |
| OLD | NEW |