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

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

Issue 2950743002: Revert of Generate enum/getters/setters/mappings for flex-direction (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(EFlexDirection e)
635 : CSSValue(kIdentifierClass) {
636 switch (e) {
637 case EFlexDirection::kRow:
638 value_id_ = CSSValueRow;
639 break;
640 case EFlexDirection::kRowReverse:
641 value_id_ = CSSValueRowReverse;
642 break;
643 case EFlexDirection::kColumn:
644 value_id_ = CSSValueColumn;
645 break;
646 case EFlexDirection::kColumnReverse:
647 value_id_ = CSSValueColumnReverse;
648 break;
649 }
650 }
651
652 template <>
653 inline EFlexDirection CSSIdentifierValue::ConvertTo() const {
654 switch (value_id_) {
655 case CSSValueRow:
656 return EFlexDirection::kRow;
657 case CSSValueRowReverse:
658 return EFlexDirection::kRowReverse;
659 case CSSValueColumn:
660 return EFlexDirection::kColumn;
661 case CSSValueColumnReverse:
662 return EFlexDirection::kColumnReverse;
663 default:
664 break;
665 }
666
667 NOTREACHED();
668 return EFlexDirection::kRow;
669 }
670
671 template <>
634 inline CSSIdentifierValue::CSSIdentifierValue(EFlexWrap e) 672 inline CSSIdentifierValue::CSSIdentifierValue(EFlexWrap e)
635 : CSSValue(kIdentifierClass) { 673 : CSSValue(kIdentifierClass) {
636 switch (e) { 674 switch (e) {
637 case EFlexWrap::kNowrap: 675 case EFlexWrap::kNowrap:
638 value_id_ = CSSValueNowrap; 676 value_id_ = CSSValueNowrap;
639 break; 677 break;
640 case EFlexWrap::kWrap: 678 case EFlexWrap::kWrap:
641 value_id_ = CSSValueWrap; 679 value_id_ = CSSValueWrap;
642 break; 680 break;
643 case EFlexWrap::kWrapReverse: 681 case EFlexWrap::kWrapReverse:
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after
2405 default: 2443 default:
2406 break; 2444 break;
2407 } 2445 }
2408 NOTREACHED(); 2446 NOTREACHED();
2409 return kContainsNone; 2447 return kContainsNone;
2410 } 2448 }
2411 2449
2412 } // namespace blink 2450 } // namespace blink
2413 2451
2414 #endif 2452 #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