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

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

Issue 2853433003: Generate enum/getters/setters/mappings for box-sizing. (Closed)
Patch Set: Rebase Created 3 years, 7 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 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 return kLeftEdge; 770 return kLeftEdge;
771 default: 771 default:
772 break; 772 break;
773 } 773 }
774 774
775 NOTREACHED(); 775 NOTREACHED();
776 return kTopEdge; 776 return kTopEdge;
777 } 777 }
778 778
779 template <> 779 template <>
780 inline CSSIdentifierValue::CSSIdentifierValue(EBoxSizing e)
781 : CSSValue(kIdentifierClass) {
782 switch (e) {
783 case EBoxSizing::kBorderBox:
784 value_id_ = CSSValueBorderBox;
785 break;
786 case EBoxSizing::kContentBox:
787 value_id_ = CSSValueContentBox;
788 break;
789 }
790 }
791
792 template <>
793 inline EBoxSizing CSSIdentifierValue::ConvertTo() const {
794 switch (value_id_) {
795 case CSSValueBorderBox:
796 return EBoxSizing::kBorderBox;
797 case CSSValueContentBox:
798 return EBoxSizing::kContentBox;
799 default:
800 break;
801 }
802
803 NOTREACHED();
804 return EBoxSizing::kBorderBox;
805 }
806
807 template <>
808 inline CSSIdentifierValue::CSSIdentifierValue(EBoxLines e) 780 inline CSSIdentifierValue::CSSIdentifierValue(EBoxLines e)
809 : CSSValue(kIdentifierClass) { 781 : CSSValue(kIdentifierClass) {
810 switch (e) { 782 switch (e) {
811 case SINGLE: 783 case SINGLE:
812 value_id_ = CSSValueSingle; 784 value_id_ = CSSValueSingle;
813 break; 785 break;
814 case MULTIPLE: 786 case MULTIPLE:
815 value_id_ = CSSValueMultiple; 787 value_id_ = CSSValueMultiple;
816 break; 788 break;
817 } 789 }
(...skipping 2595 matching lines...) Expand 10 before | Expand all | Expand 10 after
3413 default: 3385 default:
3414 break; 3386 break;
3415 } 3387 }
3416 NOTREACHED(); 3388 NOTREACHED();
3417 return kContainsNone; 3389 return kContainsNone;
3418 } 3390 }
3419 3391
3420 } // namespace blink 3392 } // namespace blink
3421 3393
3422 #endif 3394 #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