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

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

Issue 2944193002: Generate enum/getters/setters/mappings for flex-wrap (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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 return kLeftEdge; 624 return kLeftEdge;
625 default: 625 default:
626 break; 626 break;
627 } 627 }
628 628
629 NOTREACHED(); 629 NOTREACHED();
630 return kTopEdge; 630 return kTopEdge;
631 } 631 }
632 632
633 template <> 633 template <>
634 inline CSSIdentifierValue::CSSIdentifierValue(EFlexWrap e)
635 : CSSValue(kIdentifierClass) {
636 switch (e) {
637 case EFlexWrap::kNowrap:
638 value_id_ = CSSValueNowrap;
639 break;
640 case EFlexWrap::kWrap:
641 value_id_ = CSSValueWrap;
642 break;
643 case EFlexWrap::kWrapReverse:
644 value_id_ = CSSValueWrapReverse;
645 break;
646 }
647 }
648
649 template <>
650 inline EFlexWrap CSSIdentifierValue::ConvertTo() const {
651 switch (value_id_) {
652 case CSSValueNowrap:
653 return EFlexWrap::kNowrap;
654 case CSSValueWrap:
655 return EFlexWrap::kWrap;
656 case CSSValueWrapReverse:
657 return EFlexWrap::kWrapReverse;
658 default:
659 break;
660 }
661
662 NOTREACHED();
663 return EFlexWrap::kNowrap;
664 }
665
666 template <>
667 inline CSSIdentifierValue::CSSIdentifierValue(EFloat e) 634 inline CSSIdentifierValue::CSSIdentifierValue(EFloat e)
668 : CSSValue(kIdentifierClass) { 635 : CSSValue(kIdentifierClass) {
669 switch (e) { 636 switch (e) {
670 case EFloat::kNone: 637 case EFloat::kNone:
671 value_id_ = CSSValueNone; 638 value_id_ = CSSValueNone;
672 break; 639 break;
673 case EFloat::kLeft: 640 case EFloat::kLeft:
674 value_id_ = CSSValueLeft; 641 value_id_ = CSSValueLeft;
675 break; 642 break;
676 case EFloat::kRight: 643 case EFloat::kRight:
(...skipping 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after
2405 default: 2372 default:
2406 break; 2373 break;
2407 } 2374 }
2408 NOTREACHED(); 2375 NOTREACHED();
2409 return kContainsNone; 2376 return kContainsNone;
2410 } 2377 }
2411 2378
2412 } // namespace blink 2379 } // namespace blink
2413 2380
2414 #endif 2381 #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