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

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

Issue 1709963002: [css-align] New CSS Value 'normal' for Self Alignment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unskipped some repaint tests and rebaselined. Created 4 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
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 4328 matching lines...) Expand 10 before | Expand all | Expand 10 after
4339 } 4339 }
4340 4340
4341 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ItemPosition itemPosition ) 4341 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ItemPosition itemPosition )
4342 : CSSValue(PrimitiveClass) 4342 : CSSValue(PrimitiveClass)
4343 { 4343 {
4344 init(UnitType::ValueID); 4344 init(UnitType::ValueID);
4345 switch (itemPosition) { 4345 switch (itemPosition) {
4346 case ItemPositionAuto: 4346 case ItemPositionAuto:
4347 m_value.valueID = CSSValueAuto; 4347 m_value.valueID = CSSValueAuto;
4348 break; 4348 break;
4349 case ItemPositionNormal:
4350 m_value.valueID = CSSValueNormal;
4351 break;
4349 case ItemPositionStretch: 4352 case ItemPositionStretch:
4350 m_value.valueID = CSSValueStretch; 4353 m_value.valueID = CSSValueStretch;
4351 break; 4354 break;
4352 case ItemPositionBaseline: 4355 case ItemPositionBaseline:
4353 m_value.valueID = CSSValueBaseline; 4356 m_value.valueID = CSSValueBaseline;
4354 break; 4357 break;
4355 case ItemPositionLastBaseline: 4358 case ItemPositionLastBaseline:
4356 m_value.valueID = CSSValueLastBaseline; 4359 m_value.valueID = CSSValueLastBaseline;
4357 break; 4360 break;
4358 case ItemPositionCenter: 4361 case ItemPositionCenter:
(...skipping 24 matching lines...) Expand all
4383 m_value.valueID = CSSValueRight; 4386 m_value.valueID = CSSValueRight;
4384 break; 4387 break;
4385 } 4388 }
4386 } 4389 }
4387 4390
4388 template<> inline ItemPosition CSSPrimitiveValue::convertTo() const 4391 template<> inline ItemPosition CSSPrimitiveValue::convertTo() const
4389 { 4392 {
4390 switch (m_value.valueID) { 4393 switch (m_value.valueID) {
4391 case CSSValueAuto: 4394 case CSSValueAuto:
4392 return ItemPositionAuto; 4395 return ItemPositionAuto;
4396 case CSSValueNormal:
4397 return ItemPositionNormal;
4393 case CSSValueStretch: 4398 case CSSValueStretch:
4394 return ItemPositionStretch; 4399 return ItemPositionStretch;
4395 case CSSValueBaseline: 4400 case CSSValueBaseline:
4396 return ItemPositionBaseline; 4401 return ItemPositionBaseline;
4397 case CSSValueLastBaseline: 4402 case CSSValueLastBaseline:
4398 return ItemPositionLastBaseline; 4403 return ItemPositionLastBaseline;
4399 case CSSValueCenter: 4404 case CSSValueCenter:
4400 return ItemPositionCenter; 4405 return ItemPositionCenter;
4401 case CSSValueStart: 4406 case CSSValueStart:
4402 return ItemPositionStart; 4407 return ItemPositionStart;
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
4675 default: 4680 default:
4676 break; 4681 break;
4677 } 4682 }
4678 ASSERT_NOT_REACHED(); 4683 ASSERT_NOT_REACHED();
4679 return ContainsNone; 4684 return ContainsNone;
4680 } 4685 }
4681 4686
4682 } // namespace blink 4687 } // namespace blink
4683 4688
4684 #endif 4689 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698