| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Alexey Proskuryakov <ap@nypop.com>. | 2 * Copyright (C) 2007 Alexey Proskuryakov <ap@nypop.com>. |
| 3 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 5 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> | 5 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * | 7 * |
| 8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
| 9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
| 10 * are met: | 10 * are met: |
| (...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1339 case CSSValueHide: | 1339 case CSSValueHide: |
| 1340 return HIDE; | 1340 return HIDE; |
| 1341 default: | 1341 default: |
| 1342 break; | 1342 break; |
| 1343 } | 1343 } |
| 1344 | 1344 |
| 1345 ASSERT_NOT_REACHED(); | 1345 ASSERT_NOT_REACHED(); |
| 1346 return SHOW; | 1346 return SHOW; |
| 1347 } | 1347 } |
| 1348 | 1348 |
| 1349 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EAlignItems e) | |
| 1350 : CSSValue(PrimitiveClass) | |
| 1351 { | |
| 1352 m_primitiveUnitType = CSS_VALUE_ID; | |
| 1353 switch (e) { | |
| 1354 case AlignAuto: | |
| 1355 m_value.valueID = CSSValueAuto; | |
| 1356 break; | |
| 1357 case AlignFlexStart: | |
| 1358 m_value.valueID = CSSValueFlexStart; | |
| 1359 break; | |
| 1360 case AlignFlexEnd: | |
| 1361 m_value.valueID = CSSValueFlexEnd; | |
| 1362 break; | |
| 1363 case AlignCenter: | |
| 1364 m_value.valueID = CSSValueCenter; | |
| 1365 break; | |
| 1366 case AlignStretch: | |
| 1367 m_value.valueID = CSSValueStretch; | |
| 1368 break; | |
| 1369 case AlignBaseline: | |
| 1370 m_value.valueID = CSSValueBaseline; | |
| 1371 break; | |
| 1372 } | |
| 1373 } | |
| 1374 | |
| 1375 template<> inline CSSPrimitiveValue::operator EAlignItems() const | |
| 1376 { | |
| 1377 ASSERT(isValueID()); | |
| 1378 switch (m_value.valueID) { | |
| 1379 case CSSValueAuto: | |
| 1380 return AlignAuto; | |
| 1381 case CSSValueFlexStart: | |
| 1382 return AlignFlexStart; | |
| 1383 case CSSValueFlexEnd: | |
| 1384 return AlignFlexEnd; | |
| 1385 case CSSValueCenter: | |
| 1386 return AlignCenter; | |
| 1387 case CSSValueStretch: | |
| 1388 return AlignStretch; | |
| 1389 case CSSValueBaseline: | |
| 1390 return AlignBaseline; | |
| 1391 default: | |
| 1392 break; | |
| 1393 } | |
| 1394 | |
| 1395 ASSERT_NOT_REACHED(); | |
| 1396 return AlignFlexStart; | |
| 1397 } | |
| 1398 | |
| 1399 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EJustifyContent e) | 1349 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EJustifyContent e) |
| 1400 : CSSValue(PrimitiveClass) | 1350 : CSSValue(PrimitiveClass) |
| 1401 { | 1351 { |
| 1402 m_primitiveUnitType = CSS_VALUE_ID; | 1352 m_primitiveUnitType = CSS_VALUE_ID; |
| 1403 switch (e) { | 1353 switch (e) { |
| 1404 case JustifyFlexStart: | 1354 case JustifyFlexStart: |
| 1405 m_value.valueID = CSSValueFlexStart; | 1355 m_value.valueID = CSSValueFlexStart; |
| 1406 break; | 1356 break; |
| 1407 case JustifyFlexEnd: | 1357 case JustifyFlexEnd: |
| 1408 m_value.valueID = CSSValueFlexEnd; | 1358 m_value.valueID = CSSValueFlexEnd; |
| (...skipping 3681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5090 default: | 5040 default: |
| 5091 break; | 5041 break; |
| 5092 } | 5042 } |
| 5093 ASSERT_NOT_REACHED(); | 5043 ASSERT_NOT_REACHED(); |
| 5094 return OverflowAlignmentTrue; | 5044 return OverflowAlignmentTrue; |
| 5095 } | 5045 } |
| 5096 | 5046 |
| 5097 } | 5047 } |
| 5098 | 5048 |
| 5099 #endif | 5049 #endif |
| OLD | NEW |