| 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 4370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4381 } | 4381 } |
| 4382 ASSERT_NOT_REACHED(); | 4382 ASSERT_NOT_REACHED(); |
| 4383 return ItemPositionAuto; | 4383 return ItemPositionAuto; |
| 4384 } | 4384 } |
| 4385 | 4385 |
| 4386 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ContentPosition contentPo
sition) | 4386 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ContentPosition contentPo
sition) |
| 4387 : CSSValue(PrimitiveClass) | 4387 : CSSValue(PrimitiveClass) |
| 4388 { | 4388 { |
| 4389 init(UnitType::ValueID); | 4389 init(UnitType::ValueID); |
| 4390 switch (contentPosition) { | 4390 switch (contentPosition) { |
| 4391 case ContentPositionAuto: | 4391 case ContentPositionNormal: |
| 4392 m_value.valueID = CSSValueAuto; | 4392 m_value.valueID = CSSValueNormal; |
| 4393 break; | 4393 break; |
| 4394 case ContentPositionBaseline: | 4394 case ContentPositionBaseline: |
| 4395 m_value.valueID = CSSValueBaseline; | 4395 m_value.valueID = CSSValueBaseline; |
| 4396 break; | 4396 break; |
| 4397 case ContentPositionLastBaseline: | 4397 case ContentPositionLastBaseline: |
| 4398 m_value.valueID = CSSValueLastBaseline; | 4398 m_value.valueID = CSSValueLastBaseline; |
| 4399 break; | 4399 break; |
| 4400 case ContentPositionCenter: | 4400 case ContentPositionCenter: |
| 4401 m_value.valueID = CSSValueCenter; | 4401 m_value.valueID = CSSValueCenter; |
| 4402 break; | 4402 break; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 4417 break; | 4417 break; |
| 4418 case ContentPositionRight: | 4418 case ContentPositionRight: |
| 4419 m_value.valueID = CSSValueRight; | 4419 m_value.valueID = CSSValueRight; |
| 4420 break; | 4420 break; |
| 4421 } | 4421 } |
| 4422 } | 4422 } |
| 4423 | 4423 |
| 4424 template<> inline ContentPosition CSSPrimitiveValue::convertTo() const | 4424 template<> inline ContentPosition CSSPrimitiveValue::convertTo() const |
| 4425 { | 4425 { |
| 4426 switch (m_value.valueID) { | 4426 switch (m_value.valueID) { |
| 4427 case CSSValueAuto: | 4427 case CSSValueNormal: |
| 4428 return ContentPositionAuto; | 4428 return ContentPositionNormal; |
| 4429 case CSSValueBaseline: | 4429 case CSSValueBaseline: |
| 4430 return ContentPositionBaseline; | 4430 return ContentPositionBaseline; |
| 4431 case CSSValueLastBaseline: | 4431 case CSSValueLastBaseline: |
| 4432 return ContentPositionLastBaseline; | 4432 return ContentPositionLastBaseline; |
| 4433 case CSSValueCenter: | 4433 case CSSValueCenter: |
| 4434 return ContentPositionCenter; | 4434 return ContentPositionCenter; |
| 4435 case CSSValueStart: | 4435 case CSSValueStart: |
| 4436 return ContentPositionStart; | 4436 return ContentPositionStart; |
| 4437 case CSSValueEnd: | 4437 case CSSValueEnd: |
| 4438 return ContentPositionEnd; | 4438 return ContentPositionEnd; |
| 4439 case CSSValueFlexStart: | 4439 case CSSValueFlexStart: |
| 4440 return ContentPositionFlexStart; | 4440 return ContentPositionFlexStart; |
| 4441 case CSSValueFlexEnd: | 4441 case CSSValueFlexEnd: |
| 4442 return ContentPositionFlexEnd; | 4442 return ContentPositionFlexEnd; |
| 4443 case CSSValueLeft: | 4443 case CSSValueLeft: |
| 4444 return ContentPositionLeft; | 4444 return ContentPositionLeft; |
| 4445 case CSSValueRight: | 4445 case CSSValueRight: |
| 4446 return ContentPositionRight; | 4446 return ContentPositionRight; |
| 4447 default: | 4447 default: |
| 4448 break; | 4448 break; |
| 4449 } | 4449 } |
| 4450 ASSERT_NOT_REACHED(); | 4450 ASSERT_NOT_REACHED(); |
| 4451 return ContentPositionAuto; | 4451 return ContentPositionNormal; |
| 4452 } | 4452 } |
| 4453 | 4453 |
| 4454 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ContentDistributionType c
ontentDistribution) | 4454 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ContentDistributionType c
ontentDistribution) |
| 4455 : CSSValue(PrimitiveClass) | 4455 : CSSValue(PrimitiveClass) |
| 4456 { | 4456 { |
| 4457 init(UnitType::ValueID); | 4457 init(UnitType::ValueID); |
| 4458 switch (contentDistribution) { | 4458 switch (contentDistribution) { |
| 4459 case ContentDistributionDefault: | 4459 case ContentDistributionDefault: |
| 4460 m_value.valueID = CSSValueDefault; | 4460 m_value.valueID = CSSValueDefault; |
| 4461 break; | 4461 break; |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4627 default: | 4627 default: |
| 4628 break; | 4628 break; |
| 4629 } | 4629 } |
| 4630 ASSERT_NOT_REACHED(); | 4630 ASSERT_NOT_REACHED(); |
| 4631 return ContainsNone; | 4631 return ContainsNone; |
| 4632 } | 4632 } |
| 4633 | 4633 |
| 4634 } // namespace blink | 4634 } // namespace blink |
| 4635 | 4635 |
| 4636 #endif | 4636 #endif |
| OLD | NEW |