Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h

Issue 2555923002: Changed TextDirection to an enum class and renamed its members (Closed)
Patch Set: Rebase after reopen Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSProperty.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2834 matching lines...) Expand 10 before | Expand all | Expand 10 after
2845 } 2845 }
2846 2846
2847 ASSERT_NOT_REACHED(); 2847 ASSERT_NOT_REACHED();
2848 return NormalOverflowWrap; 2848 return NormalOverflowWrap;
2849 } 2849 }
2850 2850
2851 template <> 2851 template <>
2852 inline CSSIdentifierValue::CSSIdentifierValue(TextDirection e) 2852 inline CSSIdentifierValue::CSSIdentifierValue(TextDirection e)
2853 : CSSValue(IdentifierClass) { 2853 : CSSValue(IdentifierClass) {
2854 switch (e) { 2854 switch (e) {
2855 case LTR: 2855 case TextDirection::Ltr:
2856 m_valueID = CSSValueLtr; 2856 m_valueID = CSSValueLtr;
2857 break; 2857 break;
2858 case RTL: 2858 case TextDirection::Rtl:
2859 m_valueID = CSSValueRtl; 2859 m_valueID = CSSValueRtl;
2860 break; 2860 break;
2861 } 2861 }
2862 } 2862 }
2863 2863
2864 template <> 2864 template <>
2865 inline TextDirection CSSIdentifierValue::convertTo() const { 2865 inline TextDirection CSSIdentifierValue::convertTo() const {
2866 switch (m_valueID) { 2866 switch (m_valueID) {
2867 case CSSValueLtr: 2867 case CSSValueLtr:
2868 return LTR; 2868 return TextDirection::Ltr;
2869 case CSSValueRtl: 2869 case CSSValueRtl:
2870 return RTL; 2870 return TextDirection::Rtl;
2871 default: 2871 default:
2872 break; 2872 break;
2873 } 2873 }
2874 2874
2875 ASSERT_NOT_REACHED(); 2875 ASSERT_NOT_REACHED();
2876 return LTR; 2876 return TextDirection::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 TopToBottomWritingMode:
2884 m_valueID = CSSValueHorizontalTb; 2884 m_valueID = CSSValueHorizontalTb;
2885 break; 2885 break;
2886 case RightToLeftWritingMode: 2886 case RightToLeftWritingMode:
(...skipping 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSProperty.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698