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

Side by Side Diff: sky/engine/core/css/CSSPrimitiveValueMappings.h

Issue 1074953004: Remove empty-cells (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 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
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. (http://www.torchmo bile.com/) 4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
5 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> 5 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com>
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 { 710 {
711 ASSERT(isValueID()); 711 ASSERT(isValueID());
712 if (m_value.valueID == CSSValueNone) 712 if (m_value.valueID == CSSValueNone)
713 return NONE; 713 return NONE;
714 714
715 EDisplay display = static_cast<EDisplay>(m_value.valueID - CSSValueInline); 715 EDisplay display = static_cast<EDisplay>(m_value.valueID - CSSValueInline);
716 ASSERT(display >= INLINE && display <= NONE); 716 ASSERT(display >= INLINE && display <= NONE);
717 return display; 717 return display;
718 } 718 }
719 719
720 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EEmptyCell e)
721 : CSSValue(PrimitiveClass)
722 {
723 m_primitiveUnitType = CSS_VALUE_ID;
724 switch (e) {
725 case SHOW:
726 m_value.valueID = CSSValueShow;
727 break;
728 case HIDE:
729 m_value.valueID = CSSValueHide;
730 break;
731 }
732 }
733
734 template<> inline CSSPrimitiveValue::operator EEmptyCell() const
735 {
736 ASSERT(isValueID());
737 switch (m_value.valueID) {
738 case CSSValueShow:
739 return SHOW;
740 case CSSValueHide:
741 return HIDE;
742 default:
743 break;
744 }
745
746 ASSERT_NOT_REACHED();
747 return SHOW;
748 }
749
750 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EJustifyContent e) 720 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EJustifyContent e)
751 : CSSValue(PrimitiveClass) 721 : CSSValue(PrimitiveClass)
752 { 722 {
753 m_primitiveUnitType = CSS_VALUE_ID; 723 m_primitiveUnitType = CSS_VALUE_ID;
754 switch (e) { 724 switch (e) {
755 case JustifyFlexStart: 725 case JustifyFlexStart:
756 m_value.valueID = CSSValueFlexStart; 726 m_value.valueID = CSSValueFlexStart;
757 break; 727 break;
758 case JustifyFlexEnd: 728 case JustifyFlexEnd:
759 m_value.valueID = CSSValueFlexEnd; 729 m_value.valueID = CSSValueFlexEnd;
(...skipping 2074 matching lines...) Expand 10 before | Expand all | Expand 10 after
2834 default: 2804 default:
2835 break; 2805 break;
2836 } 2806 }
2837 ASSERT_NOT_REACHED(); 2807 ASSERT_NOT_REACHED();
2838 return OverflowAlignmentTrue; 2808 return OverflowAlignmentTrue;
2839 } 2809 }
2840 2810
2841 } 2811 }
2842 2812
2843 #endif // SKY_ENGINE_CORE_CSS_CSSPRIMITIVEVALUEMAPPINGS_H_ 2813 #endif // SKY_ENGINE_CORE_CSS_CSSPRIMITIVEVALUEMAPPINGS_H_
OLDNEW
« no previous file with comments | « sky/engine/core/css/CSSComputedStyleDeclaration.cpp ('k') | sky/engine/core/css/CSSProperties.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698