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 4322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4333 } | 4333 } |
4334 | 4334 |
4335 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ItemPosition itemPosition
) | 4335 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ItemPosition itemPosition
) |
4336 : CSSValue(PrimitiveClass) | 4336 : CSSValue(PrimitiveClass) |
4337 { | 4337 { |
4338 init(UnitType::ValueID); | 4338 init(UnitType::ValueID); |
4339 switch (itemPosition) { | 4339 switch (itemPosition) { |
4340 case ItemPositionAuto: | 4340 case ItemPositionAuto: |
4341 m_value.valueID = CSSValueAuto; | 4341 m_value.valueID = CSSValueAuto; |
4342 break; | 4342 break; |
| 4343 case ItemPositionNormal: |
| 4344 m_value.valueID = CSSValueNormal; |
| 4345 break; |
4343 case ItemPositionStretch: | 4346 case ItemPositionStretch: |
4344 m_value.valueID = CSSValueStretch; | 4347 m_value.valueID = CSSValueStretch; |
4345 break; | 4348 break; |
4346 case ItemPositionBaseline: | 4349 case ItemPositionBaseline: |
4347 m_value.valueID = CSSValueBaseline; | 4350 m_value.valueID = CSSValueBaseline; |
4348 break; | 4351 break; |
4349 case ItemPositionLastBaseline: | 4352 case ItemPositionLastBaseline: |
4350 m_value.valueID = CSSValueLastBaseline; | 4353 m_value.valueID = CSSValueLastBaseline; |
4351 break; | 4354 break; |
4352 case ItemPositionCenter: | 4355 case ItemPositionCenter: |
(...skipping 24 matching lines...) Expand all Loading... |
4377 m_value.valueID = CSSValueRight; | 4380 m_value.valueID = CSSValueRight; |
4378 break; | 4381 break; |
4379 } | 4382 } |
4380 } | 4383 } |
4381 | 4384 |
4382 template<> inline ItemPosition CSSPrimitiveValue::convertTo() const | 4385 template<> inline ItemPosition CSSPrimitiveValue::convertTo() const |
4383 { | 4386 { |
4384 switch (m_value.valueID) { | 4387 switch (m_value.valueID) { |
4385 case CSSValueAuto: | 4388 case CSSValueAuto: |
4386 return ItemPositionAuto; | 4389 return ItemPositionAuto; |
| 4390 case CSSValueNormal: |
| 4391 return ItemPositionNormal; |
4387 case CSSValueStretch: | 4392 case CSSValueStretch: |
4388 return ItemPositionStretch; | 4393 return ItemPositionStretch; |
4389 case CSSValueBaseline: | 4394 case CSSValueBaseline: |
4390 return ItemPositionBaseline; | 4395 return ItemPositionBaseline; |
4391 case CSSValueLastBaseline: | 4396 case CSSValueLastBaseline: |
4392 return ItemPositionLastBaseline; | 4397 return ItemPositionLastBaseline; |
4393 case CSSValueCenter: | 4398 case CSSValueCenter: |
4394 return ItemPositionCenter; | 4399 return ItemPositionCenter; |
4395 case CSSValueStart: | 4400 case CSSValueStart: |
4396 return ItemPositionStart; | 4401 return ItemPositionStart; |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4669 default: | 4674 default: |
4670 break; | 4675 break; |
4671 } | 4676 } |
4672 ASSERT_NOT_REACHED(); | 4677 ASSERT_NOT_REACHED(); |
4673 return ContainsNone; | 4678 return ContainsNone; |
4674 } | 4679 } |
4675 | 4680 |
4676 } // namespace blink | 4681 } // namespace blink |
4677 | 4682 |
4678 #endif | 4683 #endif |
OLD | NEW |