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

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

Issue 2635143002: Changed EBoxSizing to an enum class and renamed its members (Closed)
Patch Set: Aded k prefix Created 3 years, 11 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/ComputedStyleCSSValueMapping.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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 } 805 }
806 806
807 ASSERT_NOT_REACHED(); 807 ASSERT_NOT_REACHED();
808 return TopEdge; 808 return TopEdge;
809 } 809 }
810 810
811 template <> 811 template <>
812 inline CSSIdentifierValue::CSSIdentifierValue(EBoxSizing e) 812 inline CSSIdentifierValue::CSSIdentifierValue(EBoxSizing e)
813 : CSSValue(IdentifierClass) { 813 : CSSValue(IdentifierClass) {
814 switch (e) { 814 switch (e) {
815 case BoxSizingBorderBox: 815 case EBoxSizing::kBorderBox:
816 m_valueID = CSSValueBorderBox; 816 m_valueID = CSSValueBorderBox;
817 break; 817 break;
818 case BoxSizingContentBox: 818 case EBoxSizing::kContentBox:
819 m_valueID = CSSValueContentBox; 819 m_valueID = CSSValueContentBox;
820 break; 820 break;
821 } 821 }
822 } 822 }
823 823
824 template <> 824 template <>
825 inline EBoxSizing CSSIdentifierValue::convertTo() const { 825 inline EBoxSizing CSSIdentifierValue::convertTo() const {
826 switch (m_valueID) { 826 switch (m_valueID) {
827 case CSSValueBorderBox: 827 case CSSValueBorderBox:
828 return BoxSizingBorderBox; 828 return EBoxSizing::kBorderBox;
829 case CSSValueContentBox: 829 case CSSValueContentBox:
830 return BoxSizingContentBox; 830 return EBoxSizing::kContentBox;
831 default: 831 default:
832 break; 832 break;
833 } 833 }
834 834
835 ASSERT_NOT_REACHED(); 835 ASSERT_NOT_REACHED();
836 return BoxSizingBorderBox; 836 return EBoxSizing::kBorderBox;
837 } 837 }
838 838
839 template <> 839 template <>
840 inline CSSIdentifierValue::CSSIdentifierValue(EBoxDirection e) 840 inline CSSIdentifierValue::CSSIdentifierValue(EBoxDirection e)
841 : CSSValue(IdentifierClass) { 841 : CSSValue(IdentifierClass) {
842 switch (e) { 842 switch (e) {
843 case EBoxDirection::kNormal: 843 case EBoxDirection::kNormal:
844 m_valueID = CSSValueNormal; 844 m_valueID = CSSValueNormal;
845 break; 845 break;
846 case EBoxDirection::kReverse: 846 case EBoxDirection::kReverse:
(...skipping 3938 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/ComputedStyleCSSValueMapping.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698