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

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: Getting back the FullScreen fix, missed during the rebase. Created 4 years, 4 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 4355 matching lines...) Expand 10 before | Expand all | Expand 10 after
4366 ASSERT_NOT_REACHED(); 4366 ASSERT_NOT_REACHED();
4367 return ContentBox; 4367 return ContentBox;
4368 } 4368 }
4369 4369
4370 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ItemPosition itemPosition ) 4370 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ItemPosition itemPosition )
4371 : CSSValue(PrimitiveClass) 4371 : CSSValue(PrimitiveClass)
4372 { 4372 {
4373 init(UnitType::ValueID); 4373 init(UnitType::ValueID);
4374 switch (itemPosition) { 4374 switch (itemPosition) {
4375 case ItemPositionAuto: 4375 case ItemPositionAuto:
4376 m_value.valueID = CSSValueAuto; 4376 // The 'auto' values might have been already resolved.
4377 NOTREACHED();
4378 m_value.valueID = CSSValueNormal;
4379 break;
4380 case ItemPositionNormal:
4381 m_value.valueID = CSSValueNormal;
4377 break; 4382 break;
4378 case ItemPositionStretch: 4383 case ItemPositionStretch:
4379 m_value.valueID = CSSValueStretch; 4384 m_value.valueID = CSSValueStretch;
4380 break; 4385 break;
4381 case ItemPositionBaseline: 4386 case ItemPositionBaseline:
4382 m_value.valueID = CSSValueBaseline; 4387 m_value.valueID = CSSValueBaseline;
4383 break; 4388 break;
4384 case ItemPositionLastBaseline: 4389 case ItemPositionLastBaseline:
4385 m_value.valueID = CSSValueLastBaseline; 4390 m_value.valueID = CSSValueLastBaseline;
4386 break; 4391 break;
(...skipping 25 matching lines...) Expand all
4412 m_value.valueID = CSSValueRight; 4417 m_value.valueID = CSSValueRight;
4413 break; 4418 break;
4414 } 4419 }
4415 } 4420 }
4416 4421
4417 template<> inline ItemPosition CSSPrimitiveValue::convertTo() const 4422 template<> inline ItemPosition CSSPrimitiveValue::convertTo() const
4418 { 4423 {
4419 switch (m_value.valueID) { 4424 switch (m_value.valueID) {
4420 case CSSValueAuto: 4425 case CSSValueAuto:
4421 return ItemPositionAuto; 4426 return ItemPositionAuto;
4427 case CSSValueNormal:
4428 return ItemPositionNormal;
4422 case CSSValueStretch: 4429 case CSSValueStretch:
4423 return ItemPositionStretch; 4430 return ItemPositionStretch;
4424 case CSSValueBaseline: 4431 case CSSValueBaseline:
4425 return ItemPositionBaseline; 4432 return ItemPositionBaseline;
4426 case CSSValueLastBaseline: 4433 case CSSValueLastBaseline:
4427 return ItemPositionLastBaseline; 4434 return ItemPositionLastBaseline;
4428 case CSSValueCenter: 4435 case CSSValueCenter:
4429 return ItemPositionCenter; 4436 return ItemPositionCenter;
4430 case CSSValueStart: 4437 case CSSValueStart:
4431 return ItemPositionStart; 4438 return ItemPositionStart;
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
4704 default: 4711 default:
4705 break; 4712 break;
4706 } 4713 }
4707 ASSERT_NOT_REACHED(); 4714 ASSERT_NOT_REACHED();
4708 return ContainsNone; 4715 return ContainsNone;
4709 } 4716 }
4710 4717
4711 } // namespace blink 4718 } // namespace blink
4712 4719
4713 #endif 4720 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698