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

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

Issue 2912683002: Generate methods for Hyphens and HyphenationString in ComputedStyleBase. (Closed)
Patch Set: Created 3 years, 6 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/CSSProperties.json5 » ('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 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 return EFloat::kNone; 867 return EFloat::kNone;
868 default: 868 default:
869 break; 869 break;
870 } 870 }
871 871
872 NOTREACHED(); 872 NOTREACHED();
873 return EFloat::kNone; 873 return EFloat::kNone;
874 } 874 }
875 875
876 template <> 876 template <>
877 inline CSSIdentifierValue::CSSIdentifierValue(Hyphens e)
878 : CSSValue(kIdentifierClass) {
879 switch (e) {
880 case Hyphens::kAuto:
881 value_id_ = CSSValueAuto;
882 break;
883 case Hyphens::kManual:
884 value_id_ = CSSValueManual;
885 break;
886 case Hyphens::kNone:
887 value_id_ = CSSValueNone;
888 break;
889 }
890 }
891
892 template <>
893 inline Hyphens CSSIdentifierValue::ConvertTo() const {
894 switch (value_id_) {
895 case CSSValueAuto:
896 return Hyphens::kAuto;
897 case CSSValueManual:
898 return Hyphens::kManual;
899 case CSSValueNone:
900 return Hyphens::kNone;
901 default:
902 break;
903 }
904
905 NOTREACHED();
906 return Hyphens::kManual;
907 }
908
909 template <>
910 inline CSSIdentifierValue::CSSIdentifierValue(LineBreak e) 877 inline CSSIdentifierValue::CSSIdentifierValue(LineBreak e)
911 : CSSValue(kIdentifierClass) { 878 : CSSValue(kIdentifierClass) {
912 switch (e) { 879 switch (e) {
913 case LineBreak::kAuto: 880 case LineBreak::kAuto:
914 value_id_ = CSSValueAuto; 881 value_id_ = CSSValueAuto;
915 break; 882 break;
916 case LineBreak::kLoose: 883 case LineBreak::kLoose:
917 value_id_ = CSSValueLoose; 884 value_id_ = CSSValueLoose;
918 break; 885 break;
919 case LineBreak::kNormal: 886 case LineBreak::kNormal:
(...skipping 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after
3168 default: 3135 default:
3169 break; 3136 break;
3170 } 3137 }
3171 NOTREACHED(); 3138 NOTREACHED();
3172 return kContainsNone; 3139 return kContainsNone;
3173 } 3140 }
3174 3141
3175 } // namespace blink 3142 } // namespace blink
3176 3143
3177 #endif 3144 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSProperties.json5 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698