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. | 4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
5 * (http://www.torchmobile.com/) | 5 * (http://www.torchmobile.com/) |
6 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> | 6 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> |
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
8 * | 8 * |
9 * Redistribution and use in source and binary forms, with or without | 9 * Redistribution and use in source and binary forms, with or without |
10 * modification, are permitted provided that the following conditions | 10 * modification, are permitted provided that the following conditions |
(...skipping 2589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2600 } | 2600 } |
2601 | 2601 |
2602 ASSERT_NOT_REACHED(); | 2602 ASSERT_NOT_REACHED(); |
2603 return SELECT_TEXT; | 2603 return SELECT_TEXT; |
2604 } | 2604 } |
2605 | 2605 |
2606 template <> | 2606 template <> |
2607 inline CSSIdentifierValue::CSSIdentifierValue(EVerticalAlign a) | 2607 inline CSSIdentifierValue::CSSIdentifierValue(EVerticalAlign a) |
2608 : CSSValue(IdentifierClass) { | 2608 : CSSValue(IdentifierClass) { |
2609 switch (a) { | 2609 switch (a) { |
2610 case VerticalAlignTop: | 2610 case EVerticalAlign::Top: |
2611 m_valueID = CSSValueTop; | 2611 m_valueID = CSSValueTop; |
2612 break; | 2612 break; |
2613 case VerticalAlignBottom: | 2613 case EVerticalAlign::Bottom: |
2614 m_valueID = CSSValueBottom; | 2614 m_valueID = CSSValueBottom; |
2615 break; | 2615 break; |
2616 case VerticalAlignMiddle: | 2616 case EVerticalAlign::Middle: |
2617 m_valueID = CSSValueMiddle; | 2617 m_valueID = CSSValueMiddle; |
2618 break; | 2618 break; |
2619 case VerticalAlignBaseline: | 2619 case EVerticalAlign::Baseline: |
2620 m_valueID = CSSValueBaseline; | 2620 m_valueID = CSSValueBaseline; |
2621 break; | 2621 break; |
2622 case VerticalAlignTextBottom: | 2622 case EVerticalAlign::TextBottom: |
2623 m_valueID = CSSValueTextBottom; | 2623 m_valueID = CSSValueTextBottom; |
2624 break; | 2624 break; |
2625 case VerticalAlignTextTop: | 2625 case EVerticalAlign::TextTop: |
2626 m_valueID = CSSValueTextTop; | 2626 m_valueID = CSSValueTextTop; |
2627 break; | 2627 break; |
2628 case VerticalAlignSub: | 2628 case EVerticalAlign::Sub: |
2629 m_valueID = CSSValueSub; | 2629 m_valueID = CSSValueSub; |
2630 break; | 2630 break; |
2631 case VerticalAlignSuper: | 2631 case EVerticalAlign::Super: |
2632 m_valueID = CSSValueSuper; | 2632 m_valueID = CSSValueSuper; |
2633 break; | 2633 break; |
2634 case VerticalAlignBaselineMiddle: | 2634 case EVerticalAlign::BaselineMiddle: |
2635 m_valueID = CSSValueWebkitBaselineMiddle; | 2635 m_valueID = CSSValueWebkitBaselineMiddle; |
2636 break; | 2636 break; |
2637 case VerticalAlignLength: | 2637 case EVerticalAlign::Length: |
2638 m_valueID = CSSValueInvalid; | 2638 m_valueID = CSSValueInvalid; |
2639 } | 2639 } |
2640 } | 2640 } |
2641 | 2641 |
2642 template <> | 2642 template <> |
2643 inline EVerticalAlign CSSIdentifierValue::convertTo() const { | 2643 inline EVerticalAlign CSSIdentifierValue::convertTo() const { |
2644 switch (m_valueID) { | 2644 switch (m_valueID) { |
2645 case CSSValueTop: | 2645 case CSSValueTop: |
2646 return VerticalAlignTop; | 2646 return EVerticalAlign::Top; |
2647 case CSSValueBottom: | 2647 case CSSValueBottom: |
2648 return VerticalAlignBottom; | 2648 return EVerticalAlign::Bottom; |
2649 case CSSValueMiddle: | 2649 case CSSValueMiddle: |
2650 return VerticalAlignMiddle; | 2650 return EVerticalAlign::Middle; |
2651 case CSSValueBaseline: | 2651 case CSSValueBaseline: |
2652 return VerticalAlignBaseline; | 2652 return EVerticalAlign::Baseline; |
2653 case CSSValueTextBottom: | 2653 case CSSValueTextBottom: |
2654 return VerticalAlignTextBottom; | 2654 return EVerticalAlign::TextBottom; |
2655 case CSSValueTextTop: | 2655 case CSSValueTextTop: |
2656 return VerticalAlignTextTop; | 2656 return EVerticalAlign::TextTop; |
2657 case CSSValueSub: | 2657 case CSSValueSub: |
2658 return VerticalAlignSub; | 2658 return EVerticalAlign::Sub; |
2659 case CSSValueSuper: | 2659 case CSSValueSuper: |
2660 return VerticalAlignSuper; | 2660 return EVerticalAlign::Super; |
2661 case CSSValueWebkitBaselineMiddle: | 2661 case CSSValueWebkitBaselineMiddle: |
2662 return VerticalAlignBaselineMiddle; | 2662 return EVerticalAlign::BaselineMiddle; |
2663 default: | 2663 default: |
2664 break; | 2664 break; |
2665 } | 2665 } |
2666 | 2666 |
2667 ASSERT_NOT_REACHED(); | 2667 ASSERT_NOT_REACHED(); |
2668 return VerticalAlignTop; | 2668 return EVerticalAlign::Top; |
2669 } | 2669 } |
2670 | 2670 |
2671 template <> | 2671 template <> |
2672 inline CSSIdentifierValue::CSSIdentifierValue(EVisibility e) | 2672 inline CSSIdentifierValue::CSSIdentifierValue(EVisibility e) |
2673 : CSSValue(IdentifierClass) { | 2673 : CSSValue(IdentifierClass) { |
2674 switch (e) { | 2674 switch (e) { |
2675 case EVisibility::Visible: | 2675 case EVisibility::Visible: |
2676 m_valueID = CSSValueVisible; | 2676 m_valueID = CSSValueVisible; |
2677 break; | 2677 break; |
2678 case EVisibility::Hidden: | 2678 case EVisibility::Hidden: |
(...skipping 2106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4785 default: | 4785 default: |
4786 break; | 4786 break; |
4787 } | 4787 } |
4788 ASSERT_NOT_REACHED(); | 4788 ASSERT_NOT_REACHED(); |
4789 return ContainsNone; | 4789 return ContainsNone; |
4790 } | 4790 } |
4791 | 4791 |
4792 } // namespace blink | 4792 } // namespace blink |
4793 | 4793 |
4794 #endif | 4794 #endif |
OLD | NEW |