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 4326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4337 } | 4337 } |
4338 | 4338 |
4339 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ItemPosition itemPosition
) | 4339 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ItemPosition itemPosition
) |
4340 : CSSValue(PrimitiveClass) | 4340 : CSSValue(PrimitiveClass) |
4341 { | 4341 { |
4342 init(UnitType::ValueID); | 4342 init(UnitType::ValueID); |
4343 switch (itemPosition) { | 4343 switch (itemPosition) { |
4344 case ItemPositionAuto: | 4344 case ItemPositionAuto: |
4345 m_value.valueID = CSSValueAuto; | 4345 m_value.valueID = CSSValueAuto; |
4346 break; | 4346 break; |
| 4347 case ItemPositionNormal: |
| 4348 m_value.valueID = CSSValueNormal; |
| 4349 break; |
4347 case ItemPositionStretch: | 4350 case ItemPositionStretch: |
4348 m_value.valueID = CSSValueStretch; | 4351 m_value.valueID = CSSValueStretch; |
4349 break; | 4352 break; |
4350 case ItemPositionBaseline: | 4353 case ItemPositionBaseline: |
4351 m_value.valueID = CSSValueBaseline; | 4354 m_value.valueID = CSSValueBaseline; |
4352 break; | 4355 break; |
4353 case ItemPositionLastBaseline: | 4356 case ItemPositionLastBaseline: |
4354 m_value.valueID = CSSValueLastBaseline; | 4357 m_value.valueID = CSSValueLastBaseline; |
4355 break; | 4358 break; |
4356 case ItemPositionCenter: | 4359 case ItemPositionCenter: |
(...skipping 24 matching lines...) Expand all Loading... |
4381 m_value.valueID = CSSValueRight; | 4384 m_value.valueID = CSSValueRight; |
4382 break; | 4385 break; |
4383 } | 4386 } |
4384 } | 4387 } |
4385 | 4388 |
4386 template<> inline ItemPosition CSSPrimitiveValue::convertTo() const | 4389 template<> inline ItemPosition CSSPrimitiveValue::convertTo() const |
4387 { | 4390 { |
4388 switch (m_value.valueID) { | 4391 switch (m_value.valueID) { |
4389 case CSSValueAuto: | 4392 case CSSValueAuto: |
4390 return ItemPositionAuto; | 4393 return ItemPositionAuto; |
| 4394 case CSSValueNormal: |
| 4395 return ItemPositionNormal; |
4391 case CSSValueStretch: | 4396 case CSSValueStretch: |
4392 return ItemPositionStretch; | 4397 return ItemPositionStretch; |
4393 case CSSValueBaseline: | 4398 case CSSValueBaseline: |
4394 return ItemPositionBaseline; | 4399 return ItemPositionBaseline; |
4395 case CSSValueLastBaseline: | 4400 case CSSValueLastBaseline: |
4396 return ItemPositionLastBaseline; | 4401 return ItemPositionLastBaseline; |
4397 case CSSValueCenter: | 4402 case CSSValueCenter: |
4398 return ItemPositionCenter; | 4403 return ItemPositionCenter; |
4399 case CSSValueStart: | 4404 case CSSValueStart: |
4400 return ItemPositionStart; | 4405 return ItemPositionStart; |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4663 default: | 4668 default: |
4664 break; | 4669 break; |
4665 } | 4670 } |
4666 ASSERT_NOT_REACHED(); | 4671 ASSERT_NOT_REACHED(); |
4667 return ContainsNone; | 4672 return ContainsNone; |
4668 } | 4673 } |
4669 | 4674 |
4670 } // namespace blink | 4675 } // namespace blink |
4671 | 4676 |
4672 #endif | 4677 #endif |
OLD | NEW |