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

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

Issue 2542843002: Changed EPointerEvents to an enum class and renamed its members to keywords (Closed)
Patch Set: Created 4 years 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/layout/LayoutObject.h » ('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 3087 matching lines...) Expand 10 before | Expand all | Expand 10 after
3098 } 3098 }
3099 3099
3100 ASSERT_NOT_REACHED(); 3100 ASSERT_NOT_REACHED();
3101 return TextOrientationMixed; 3101 return TextOrientationMixed;
3102 } 3102 }
3103 3103
3104 template <> 3104 template <>
3105 inline CSSIdentifierValue::CSSIdentifierValue(EPointerEvents e) 3105 inline CSSIdentifierValue::CSSIdentifierValue(EPointerEvents e)
3106 : CSSValue(IdentifierClass) { 3106 : CSSValue(IdentifierClass) {
3107 switch (e) { 3107 switch (e) {
3108 case PE_NONE: 3108 case EPointerEvents::PE_NONE:
3109 m_valueID = CSSValueNone; 3109 m_valueID = CSSValueNone;
3110 break; 3110 break;
3111 case PE_STROKE: 3111 case EPointerEvents::PE_STROKE:
3112 m_valueID = CSSValueStroke; 3112 m_valueID = CSSValueStroke;
3113 break; 3113 break;
3114 case PE_FILL: 3114 case EPointerEvents::PE_FILL:
3115 m_valueID = CSSValueFill; 3115 m_valueID = CSSValueFill;
3116 break; 3116 break;
3117 case PE_PAINTED: 3117 case EPointerEvents::PE_PAINTED:
3118 m_valueID = CSSValuePainted; 3118 m_valueID = CSSValuePainted;
3119 break; 3119 break;
3120 case PE_VISIBLE: 3120 case EPointerEvents::PE_VISIBLE:
3121 m_valueID = CSSValueVisible; 3121 m_valueID = CSSValueVisible;
3122 break; 3122 break;
3123 case PE_VISIBLE_STROKE: 3123 case EPointerEvents::PE_VISIBLE_STROKE:
3124 m_valueID = CSSValueVisibleStroke; 3124 m_valueID = CSSValueVisibleStroke;
3125 break; 3125 break;
3126 case PE_VISIBLE_FILL: 3126 case EPointerEvents::PE_VISIBLE_FILL:
3127 m_valueID = CSSValueVisibleFill; 3127 m_valueID = CSSValueVisibleFill;
3128 break; 3128 break;
3129 case PE_VISIBLE_PAINTED: 3129 case EPointerEvents::PE_VISIBLE_PAINTED:
3130 m_valueID = CSSValueVisiblePainted; 3130 m_valueID = CSSValueVisiblePainted;
3131 break; 3131 break;
3132 case PE_AUTO: 3132 case EPointerEvents::PE_AUTO:
3133 m_valueID = CSSValueAuto; 3133 m_valueID = CSSValueAuto;
3134 break; 3134 break;
3135 case PE_ALL: 3135 case EPointerEvents::PE_ALL:
3136 m_valueID = CSSValueAll; 3136 m_valueID = CSSValueAll;
3137 break; 3137 break;
3138 case PE_BOUNDINGBOX: 3138 case EPointerEvents::PE_BOUNDINGBOX:
3139 m_valueID = CSSValueBoundingBox; 3139 m_valueID = CSSValueBoundingBox;
3140 break; 3140 break;
3141 } 3141 }
3142 } 3142 }
3143 3143
3144 template <> 3144 template <>
3145 inline EPointerEvents CSSIdentifierValue::convertTo() const { 3145 inline EPointerEvents CSSIdentifierValue::convertTo() const {
3146 switch (m_valueID) { 3146 switch (m_valueID) {
3147 case CSSValueAll: 3147 case CSSValueAll:
3148 return PE_ALL; 3148 return EPointerEvents::PE_ALL;
3149 case CSSValueAuto: 3149 case CSSValueAuto:
3150 return PE_AUTO; 3150 return EPointerEvents::PE_AUTO;
3151 case CSSValueNone: 3151 case CSSValueNone:
3152 return PE_NONE; 3152 return EPointerEvents::PE_NONE;
3153 case CSSValueVisiblePainted: 3153 case CSSValueVisiblePainted:
3154 return PE_VISIBLE_PAINTED; 3154 return EPointerEvents::PE_VISIBLE_PAINTED;
3155 case CSSValueVisibleFill: 3155 case CSSValueVisibleFill:
3156 return PE_VISIBLE_FILL; 3156 return EPointerEvents::PE_VISIBLE_FILL;
3157 case CSSValueVisibleStroke: 3157 case CSSValueVisibleStroke:
3158 return PE_VISIBLE_STROKE; 3158 return EPointerEvents::PE_VISIBLE_STROKE;
3159 case CSSValueVisible: 3159 case CSSValueVisible:
3160 return PE_VISIBLE; 3160 return EPointerEvents::PE_VISIBLE;
3161 case CSSValuePainted: 3161 case CSSValuePainted:
3162 return PE_PAINTED; 3162 return EPointerEvents::PE_PAINTED;
3163 case CSSValueFill: 3163 case CSSValueFill:
3164 return PE_FILL; 3164 return EPointerEvents::PE_FILL;
3165 case CSSValueStroke: 3165 case CSSValueStroke:
3166 return PE_STROKE; 3166 return EPointerEvents::PE_STROKE;
3167 case CSSValueBoundingBox: 3167 case CSSValueBoundingBox:
3168 return PE_BOUNDINGBOX; 3168 return EPointerEvents::PE_BOUNDINGBOX;
3169 default: 3169 default:
3170 break; 3170 break;
3171 } 3171 }
3172 3172
3173 ASSERT_NOT_REACHED(); 3173 ASSERT_NOT_REACHED();
3174 return PE_ALL; 3174 return EPointerEvents::PE_ALL;
3175 } 3175 }
3176 3176
3177 template <> 3177 template <>
3178 inline CSSIdentifierValue::CSSIdentifierValue(FontDescription::Kerning kerning) 3178 inline CSSIdentifierValue::CSSIdentifierValue(FontDescription::Kerning kerning)
3179 : CSSValue(IdentifierClass) { 3179 : CSSValue(IdentifierClass) {
3180 switch (kerning) { 3180 switch (kerning) {
3181 case FontDescription::AutoKerning: 3181 case FontDescription::AutoKerning:
3182 m_valueID = CSSValueAuto; 3182 m_valueID = CSSValueAuto;
3183 return; 3183 return;
3184 case FontDescription::NormalKerning: 3184 case FontDescription::NormalKerning:
(...skipping 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after
4744 default: 4744 default:
4745 break; 4745 break;
4746 } 4746 }
4747 ASSERT_NOT_REACHED(); 4747 ASSERT_NOT_REACHED();
4748 return ContainsNone; 4748 return ContainsNone;
4749 } 4749 }
4750 4750
4751 } // namespace blink 4751 } // namespace blink
4752 4752
4753 #endif 4753 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698