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 4314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4325 } | 4325 } |
4326 | 4326 |
4327 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ItemPosition itemPosition
) | 4327 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ItemPosition itemPosition
) |
4328 : CSSValue(PrimitiveClass) | 4328 : CSSValue(PrimitiveClass) |
4329 { | 4329 { |
4330 init(UnitType::ValueID); | 4330 init(UnitType::ValueID); |
4331 switch (itemPosition) { | 4331 switch (itemPosition) { |
4332 case ItemPositionAuto: | 4332 case ItemPositionAuto: |
4333 m_value.valueID = CSSValueAuto; | 4333 m_value.valueID = CSSValueAuto; |
4334 break; | 4334 break; |
| 4335 case ItemPositionNormal: |
| 4336 m_value.valueID = CSSValueNormal; |
| 4337 break; |
4335 case ItemPositionStretch: | 4338 case ItemPositionStretch: |
4336 m_value.valueID = CSSValueStretch; | 4339 m_value.valueID = CSSValueStretch; |
4337 break; | 4340 break; |
4338 case ItemPositionBaseline: | 4341 case ItemPositionBaseline: |
4339 m_value.valueID = CSSValueBaseline; | 4342 m_value.valueID = CSSValueBaseline; |
4340 break; | 4343 break; |
4341 case ItemPositionLastBaseline: | 4344 case ItemPositionLastBaseline: |
4342 m_value.valueID = CSSValueLastBaseline; | 4345 m_value.valueID = CSSValueLastBaseline; |
4343 break; | 4346 break; |
4344 case ItemPositionCenter: | 4347 case ItemPositionCenter: |
(...skipping 24 matching lines...) Expand all Loading... |
4369 m_value.valueID = CSSValueRight; | 4372 m_value.valueID = CSSValueRight; |
4370 break; | 4373 break; |
4371 } | 4374 } |
4372 } | 4375 } |
4373 | 4376 |
4374 template<> inline ItemPosition CSSPrimitiveValue::convertTo() const | 4377 template<> inline ItemPosition CSSPrimitiveValue::convertTo() const |
4375 { | 4378 { |
4376 switch (m_value.valueID) { | 4379 switch (m_value.valueID) { |
4377 case CSSValueAuto: | 4380 case CSSValueAuto: |
4378 return ItemPositionAuto; | 4381 return ItemPositionAuto; |
| 4382 case CSSValueNormal: |
| 4383 return ItemPositionNormal; |
4379 case CSSValueStretch: | 4384 case CSSValueStretch: |
4380 return ItemPositionStretch; | 4385 return ItemPositionStretch; |
4381 case CSSValueBaseline: | 4386 case CSSValueBaseline: |
4382 return ItemPositionBaseline; | 4387 return ItemPositionBaseline; |
4383 case CSSValueLastBaseline: | 4388 case CSSValueLastBaseline: |
4384 return ItemPositionLastBaseline; | 4389 return ItemPositionLastBaseline; |
4385 case CSSValueCenter: | 4390 case CSSValueCenter: |
4386 return ItemPositionCenter; | 4391 return ItemPositionCenter; |
4387 case CSSValueStart: | 4392 case CSSValueStart: |
4388 return ItemPositionStart; | 4393 return ItemPositionStart; |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4651 default: | 4656 default: |
4652 break; | 4657 break; |
4653 } | 4658 } |
4654 ASSERT_NOT_REACHED(); | 4659 ASSERT_NOT_REACHED(); |
4655 return ContainsNone; | 4660 return ContainsNone; |
4656 } | 4661 } |
4657 | 4662 |
4658 } // namespace blink | 4663 } // namespace blink |
4659 | 4664 |
4660 #endif | 4665 #endif |
OLD | NEW |