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 2862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2873 } | 2873 } |
2874 | 2874 |
2875 ASSERT_NOT_REACHED(); | 2875 ASSERT_NOT_REACHED(); |
2876 return LTR; | 2876 return LTR; |
2877 } | 2877 } |
2878 | 2878 |
2879 template <> | 2879 template <> |
2880 inline CSSIdentifierValue::CSSIdentifierValue(WritingMode e) | 2880 inline CSSIdentifierValue::CSSIdentifierValue(WritingMode e) |
2881 : CSSValue(IdentifierClass) { | 2881 : CSSValue(IdentifierClass) { |
2882 switch (e) { | 2882 switch (e) { |
2883 case TopToBottomWritingMode: | 2883 case WritingMode::HorizontalTb: |
2884 m_valueID = CSSValueHorizontalTb; | 2884 m_valueID = CSSValueHorizontalTb; |
2885 break; | 2885 break; |
2886 case RightToLeftWritingMode: | 2886 case WritingMode::VerticalRl: |
2887 m_valueID = CSSValueVerticalRl; | 2887 m_valueID = CSSValueVerticalRl; |
2888 break; | 2888 break; |
2889 case LeftToRightWritingMode: | 2889 case WritingMode::VerticalLr: |
2890 m_valueID = CSSValueVerticalLr; | 2890 m_valueID = CSSValueVerticalLr; |
2891 break; | 2891 break; |
2892 } | 2892 } |
2893 } | 2893 } |
2894 | 2894 |
2895 template <> | 2895 template <> |
2896 inline WritingMode CSSIdentifierValue::convertTo() const { | 2896 inline WritingMode CSSIdentifierValue::convertTo() const { |
2897 switch (m_valueID) { | 2897 switch (m_valueID) { |
2898 case CSSValueHorizontalTb: | 2898 case CSSValueHorizontalTb: |
2899 case CSSValueLr: | 2899 case CSSValueLr: |
2900 case CSSValueLrTb: | 2900 case CSSValueLrTb: |
2901 case CSSValueRl: | 2901 case CSSValueRl: |
2902 case CSSValueRlTb: | 2902 case CSSValueRlTb: |
2903 return TopToBottomWritingMode; | 2903 return WritingMode::HorizontalTb; |
2904 case CSSValueVerticalRl: | 2904 case CSSValueVerticalRl: |
2905 case CSSValueTb: | 2905 case CSSValueTb: |
2906 case CSSValueTbRl: | 2906 case CSSValueTbRl: |
2907 return RightToLeftWritingMode; | 2907 return WritingMode::VerticalRl; |
2908 case CSSValueVerticalLr: | 2908 case CSSValueVerticalLr: |
2909 return LeftToRightWritingMode; | 2909 return WritingMode::VerticalLr; |
2910 default: | 2910 default: |
2911 break; | 2911 break; |
2912 } | 2912 } |
2913 | 2913 |
2914 ASSERT_NOT_REACHED(); | 2914 ASSERT_NOT_REACHED(); |
2915 return TopToBottomWritingMode; | 2915 return WritingMode::HorizontalTb; |
2916 } | 2916 } |
2917 | 2917 |
2918 template <> | 2918 template <> |
2919 inline CSSIdentifierValue::CSSIdentifierValue(TextCombine e) | 2919 inline CSSIdentifierValue::CSSIdentifierValue(TextCombine e) |
2920 : CSSValue(IdentifierClass) { | 2920 : CSSValue(IdentifierClass) { |
2921 switch (e) { | 2921 switch (e) { |
2922 case TextCombineNone: | 2922 case TextCombineNone: |
2923 m_valueID = CSSValueNone; | 2923 m_valueID = CSSValueNone; |
2924 break; | 2924 break; |
2925 case TextCombineAll: | 2925 case TextCombineAll: |
(...skipping 1859 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 |