| 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 4290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4301 } | 4301 } |
| 4302 | 4302 |
| 4303 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ItemPosition itemPosition
) | 4303 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ItemPosition itemPosition
) |
| 4304 : CSSValue(PrimitiveClass) | 4304 : CSSValue(PrimitiveClass) |
| 4305 { | 4305 { |
| 4306 init(UnitType::ValueID); | 4306 init(UnitType::ValueID); |
| 4307 switch (itemPosition) { | 4307 switch (itemPosition) { |
| 4308 case ItemPositionAuto: | 4308 case ItemPositionAuto: |
| 4309 m_value.valueID = CSSValueAuto; | 4309 m_value.valueID = CSSValueAuto; |
| 4310 break; | 4310 break; |
| 4311 case ItemPositionNormal: |
| 4312 m_value.valueID = CSSValueNormal; |
| 4313 break; |
| 4311 case ItemPositionStretch: | 4314 case ItemPositionStretch: |
| 4312 m_value.valueID = CSSValueStretch; | 4315 m_value.valueID = CSSValueStretch; |
| 4313 break; | 4316 break; |
| 4314 case ItemPositionBaseline: | 4317 case ItemPositionBaseline: |
| 4315 m_value.valueID = CSSValueBaseline; | 4318 m_value.valueID = CSSValueBaseline; |
| 4316 break; | 4319 break; |
| 4317 case ItemPositionLastBaseline: | 4320 case ItemPositionLastBaseline: |
| 4318 m_value.valueID = CSSValueLastBaseline; | 4321 m_value.valueID = CSSValueLastBaseline; |
| 4319 break; | 4322 break; |
| 4320 case ItemPositionCenter: | 4323 case ItemPositionCenter: |
| (...skipping 24 matching lines...) Expand all Loading... |
| 4345 m_value.valueID = CSSValueRight; | 4348 m_value.valueID = CSSValueRight; |
| 4346 break; | 4349 break; |
| 4347 } | 4350 } |
| 4348 } | 4351 } |
| 4349 | 4352 |
| 4350 template<> inline ItemPosition CSSPrimitiveValue::convertTo() const | 4353 template<> inline ItemPosition CSSPrimitiveValue::convertTo() const |
| 4351 { | 4354 { |
| 4352 switch (m_value.valueID) { | 4355 switch (m_value.valueID) { |
| 4353 case CSSValueAuto: | 4356 case CSSValueAuto: |
| 4354 return ItemPositionAuto; | 4357 return ItemPositionAuto; |
| 4358 case CSSValueNormal: |
| 4359 return ItemPositionNormal; |
| 4355 case CSSValueStretch: | 4360 case CSSValueStretch: |
| 4356 return ItemPositionStretch; | 4361 return ItemPositionStretch; |
| 4357 case CSSValueBaseline: | 4362 case CSSValueBaseline: |
| 4358 return ItemPositionBaseline; | 4363 return ItemPositionBaseline; |
| 4359 case CSSValueLastBaseline: | 4364 case CSSValueLastBaseline: |
| 4360 return ItemPositionLastBaseline; | 4365 return ItemPositionLastBaseline; |
| 4361 case CSSValueCenter: | 4366 case CSSValueCenter: |
| 4362 return ItemPositionCenter; | 4367 return ItemPositionCenter; |
| 4363 case CSSValueStart: | 4368 case CSSValueStart: |
| 4364 return ItemPositionStart; | 4369 return ItemPositionStart; |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4627 default: | 4632 default: |
| 4628 break; | 4633 break; |
| 4629 } | 4634 } |
| 4630 ASSERT_NOT_REACHED(); | 4635 ASSERT_NOT_REACHED(); |
| 4631 return ContainsNone; | 4636 return ContainsNone; |
| 4632 } | 4637 } |
| 4633 | 4638 |
| 4634 } // namespace blink | 4639 } // namespace blink |
| 4635 | 4640 |
| 4636 #endif | 4641 #endif |
| OLD | NEW |