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

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

Issue 2519813002: Removed ordering dependencies for ETextAlign (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/css/CSSValueKeywords.in » ('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 2046 matching lines...) Expand 10 before | Expand all | Expand 10 after
2057 } 2057 }
2058 2058
2059 template <> 2059 template <>
2060 inline ETextAlign CSSIdentifierValue::convertTo() const { 2060 inline ETextAlign CSSIdentifierValue::convertTo() const {
2061 switch (m_valueID) { 2061 switch (m_valueID) {
2062 case CSSValueWebkitAuto: // Legacy -webkit-auto. Eqiuvalent to start. 2062 case CSSValueWebkitAuto: // Legacy -webkit-auto. Eqiuvalent to start.
2063 case CSSValueStart: 2063 case CSSValueStart:
2064 return ETextAlign::Start; 2064 return ETextAlign::Start;
2065 case CSSValueEnd: 2065 case CSSValueEnd:
2066 return ETextAlign::End; 2066 return ETextAlign::End;
2067 case CSSValueCenter:
2067 case CSSValueInternalCenter: 2068 case CSSValueInternalCenter:
2068 return ETextAlign::Center; 2069 return ETextAlign::Center;
2070 case CSSValueLeft:
2071 return ETextAlign::Left;
2072 case CSSValueRight:
2073 return ETextAlign::Right;
2074 case CSSValueJustify:
2075 return ETextAlign::Justify;
2076 case CSSValueWebkitLeft:
2077 return ETextAlign::WebkitLeft;
2078 case CSSValueWebkitRight:
2079 return ETextAlign::WebkitRight;
2080 case CSSValueWebkitCenter:
2081 return ETextAlign::WebkitCenter;
2069 default: 2082 default:
2070 return static_cast<ETextAlign>(m_valueID - CSSValueLeft); 2083 NOTREACHED();
2084 return ETextAlign::Left;
2071 } 2085 }
2072 } 2086 }
2073 2087
2074 template <> 2088 template <>
2075 inline CSSIdentifierValue::CSSIdentifierValue(TextAlignLast e) 2089 inline CSSIdentifierValue::CSSIdentifierValue(TextAlignLast e)
2076 : CSSValue(IdentifierClass) { 2090 : CSSValue(IdentifierClass) {
2077 switch (e) { 2091 switch (e) {
2078 case TextAlignLastStart: 2092 case TextAlignLastStart:
2079 m_valueID = CSSValueStart; 2093 m_valueID = CSSValueStart;
2080 break; 2094 break;
(...skipping 2582 matching lines...) Expand 10 before | Expand all | Expand 10 after
4663 default: 4677 default:
4664 break; 4678 break;
4665 } 4679 }
4666 ASSERT_NOT_REACHED(); 4680 ASSERT_NOT_REACHED();
4667 return ContainsNone; 4681 return ContainsNone;
4668 } 4682 }
4669 4683
4670 } // namespace blink 4684 } // namespace blink
4671 4685
4672 #endif 4686 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSValueKeywords.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698