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 2491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2502 | 2502 |
2503 ASSERT_NOT_REACHED(); | 2503 ASSERT_NOT_REACHED(); |
2504 return VerticalAlignTop; | 2504 return VerticalAlignTop; |
2505 } | 2505 } |
2506 | 2506 |
2507 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EVisibility e) | 2507 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EVisibility e) |
2508 : CSSValue(PrimitiveClass) | 2508 : CSSValue(PrimitiveClass) |
2509 { | 2509 { |
2510 init(UnitType::ValueID); | 2510 init(UnitType::ValueID); |
2511 switch (e) { | 2511 switch (e) { |
2512 case VISIBLE: | 2512 case EVisibility::Visible: |
2513 m_value.valueID = CSSValueVisible; | 2513 m_value.valueID = CSSValueVisible; |
2514 break; | 2514 break; |
2515 case HIDDEN: | 2515 case EVisibility::Hidden: |
2516 m_value.valueID = CSSValueHidden; | 2516 m_value.valueID = CSSValueHidden; |
2517 break; | 2517 break; |
2518 case COLLAPSE: | 2518 case EVisibility::Collapse: |
2519 m_value.valueID = CSSValueCollapse; | 2519 m_value.valueID = CSSValueCollapse; |
2520 break; | 2520 break; |
2521 } | 2521 } |
2522 } | 2522 } |
2523 | 2523 |
2524 template<> inline EVisibility CSSPrimitiveValue::convertTo() const | 2524 template<> inline EVisibility CSSPrimitiveValue::convertTo() const |
2525 { | 2525 { |
2526 ASSERT(isValueID()); | 2526 ASSERT(isValueID()); |
2527 switch (m_value.valueID) { | 2527 switch (m_value.valueID) { |
2528 case CSSValueHidden: | 2528 case CSSValueHidden: |
2529 return HIDDEN; | 2529 return EVisibility::Hidden; |
2530 case CSSValueVisible: | 2530 case CSSValueVisible: |
2531 return VISIBLE; | 2531 return EVisibility::Visible; |
2532 case CSSValueCollapse: | 2532 case CSSValueCollapse: |
2533 return COLLAPSE; | 2533 return EVisibility::Collapse; |
2534 default: | 2534 default: |
2535 break; | 2535 break; |
2536 } | 2536 } |
2537 | 2537 |
2538 ASSERT_NOT_REACHED(); | 2538 ASSERT_NOT_REACHED(); |
2539 return VISIBLE; | 2539 return EVisibility::Visible; |
2540 } | 2540 } |
2541 | 2541 |
2542 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EWhiteSpace e) | 2542 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EWhiteSpace e) |
2543 : CSSValue(PrimitiveClass) | 2543 : CSSValue(PrimitiveClass) |
2544 { | 2544 { |
2545 init(UnitType::ValueID); | 2545 init(UnitType::ValueID); |
2546 switch (e) { | 2546 switch (e) { |
2547 case NORMAL: | 2547 case NORMAL: |
2548 m_value.valueID = CSSValueNormal; | 2548 m_value.valueID = CSSValueNormal; |
2549 break; | 2549 break; |
(...skipping 2154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4704 default: | 4704 default: |
4705 break; | 4705 break; |
4706 } | 4706 } |
4707 ASSERT_NOT_REACHED(); | 4707 ASSERT_NOT_REACHED(); |
4708 return ContainsNone; | 4708 return ContainsNone; |
4709 } | 4709 } |
4710 | 4710 |
4711 } // namespace blink | 4711 } // namespace blink |
4712 | 4712 |
4713 #endif | 4713 #endif |
OLD | NEW |