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

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

Issue 768893002: Remove border-collapse (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years 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 3158 matching lines...) Expand 10 before | Expand all | Expand 10 after
3169 case CSSValueEvenodd: 3169 case CSSValueEvenodd:
3170 return RULE_EVENODD; 3170 return RULE_EVENODD;
3171 default: 3171 default:
3172 break; 3172 break;
3173 } 3173 }
3174 3174
3175 ASSERT_NOT_REACHED(); 3175 ASSERT_NOT_REACHED();
3176 return RULE_NONZERO; 3176 return RULE_NONZERO;
3177 } 3177 }
3178 3178
3179
3180 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBorderCollapse e)
3181 : CSSValue(PrimitiveClass)
3182 {
3183 m_primitiveUnitType = CSS_VALUE_ID;
3184 switch (e) {
3185 case BSEPARATE:
3186 m_value.valueID = CSSValueSeparate;
3187 break;
3188 case BCOLLAPSE:
3189 m_value.valueID = CSSValueCollapse;
3190 break;
3191 }
3192 }
3193
3194 template<> inline CSSPrimitiveValue::operator EBorderCollapse() const
3195 {
3196 ASSERT(isValueID());
3197 switch (m_value.valueID) {
3198 case CSSValueSeparate:
3199 return BSEPARATE;
3200 case CSSValueCollapse:
3201 return BCOLLAPSE;
3202 default:
3203 break;
3204 }
3205
3206 ASSERT_NOT_REACHED();
3207 return BSEPARATE;
3208 }
3209
3210 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EImageRendering e) 3179 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EImageRendering e)
3211 : CSSValue(PrimitiveClass) 3180 : CSSValue(PrimitiveClass)
3212 { 3181 {
3213 m_primitiveUnitType = CSS_VALUE_ID; 3182 m_primitiveUnitType = CSS_VALUE_ID;
3214 switch (e) { 3183 switch (e) {
3215 case ImageRenderingAuto: 3184 case ImageRenderingAuto:
3216 m_value.valueID = CSSValueAuto; 3185 m_value.valueID = CSSValueAuto;
3217 break; 3186 break;
3218 case ImageRenderingOptimizeSpeed: 3187 case ImageRenderingOptimizeSpeed:
3219 m_value.valueID = CSSValueOptimizespeed; 3188 m_value.valueID = CSSValueOptimizespeed;
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
3537 default: 3506 default:
3538 break; 3507 break;
3539 } 3508 }
3540 ASSERT_NOT_REACHED(); 3509 ASSERT_NOT_REACHED();
3541 return ScrollBehaviorInstant; 3510 return ScrollBehaviorInstant;
3542 } 3511 }
3543 3512
3544 } 3513 }
3545 3514
3546 #endif // SKY_ENGINE_CORE_CSS_CSSPRIMITIVEVALUEMAPPINGS_H_ 3515 #endif // SKY_ENGINE_CORE_CSS_CSSPRIMITIVEVALUEMAPPINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698