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

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

Issue 220023003: Rename LayoutBox to CSSBoxType (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 4688 matching lines...) Expand 10 before | Expand all | Expand 10 after
4699 case CSSValueScript: 4699 case CSSValueScript:
4700 return TouchActionDelayScript; 4700 return TouchActionDelayScript;
4701 default: 4701 default:
4702 break; 4702 break;
4703 } 4703 }
4704 4704
4705 ASSERT_NOT_REACHED(); 4705 ASSERT_NOT_REACHED();
4706 return TouchActionDelayNone; 4706 return TouchActionDelayNone;
4707 } 4707 }
4708 4708
4709 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LayoutBox layoutBox) 4709 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(CSSBoxType cssBox)
4710 : CSSValue(PrimitiveClass) 4710 : CSSValue(PrimitiveClass)
4711 { 4711 {
4712 m_primitiveUnitType = CSS_VALUE_ID; 4712 m_primitiveUnitType = CSS_VALUE_ID;
4713 switch (layoutBox) { 4713 switch (cssBox) {
4714 case MarginBox: 4714 case MarginBox:
4715 m_value.valueID = CSSValueMarginBox; 4715 m_value.valueID = CSSValueMarginBox;
4716 break; 4716 break;
4717 case BorderBox: 4717 case BorderBox:
4718 m_value.valueID = CSSValueBorderBox; 4718 m_value.valueID = CSSValueBorderBox;
4719 break; 4719 break;
4720 case PaddingBox: 4720 case PaddingBox:
4721 m_value.valueID = CSSValuePaddingBox; 4721 m_value.valueID = CSSValuePaddingBox;
4722 break; 4722 break;
4723 case ContentBox: 4723 case ContentBox:
4724 m_value.valueID = CSSValueContentBox; 4724 m_value.valueID = CSSValueContentBox;
4725 break; 4725 break;
4726 case BoxMissing: 4726 case BoxMissing:
4727 // The missing box should convert to a null primitive value. 4727 // The missing box should convert to a null primitive value.
4728 ASSERT_NOT_REACHED(); 4728 ASSERT_NOT_REACHED();
4729 } 4729 }
4730 } 4730 }
4731 4731
4732 template<> inline CSSPrimitiveValue::operator LayoutBox() const 4732 template<> inline CSSPrimitiveValue::operator CSSBoxType() const
4733 { 4733 {
4734 switch (getValueID()) { 4734 switch (getValueID()) {
4735 case CSSValueMarginBox: 4735 case CSSValueMarginBox:
4736 return MarginBox; 4736 return MarginBox;
4737 case CSSValueBorderBox: 4737 case CSSValueBorderBox:
4738 return BorderBox; 4738 return BorderBox;
4739 case CSSValuePaddingBox: 4739 case CSSValuePaddingBox:
4740 return PaddingBox; 4740 return PaddingBox;
4741 case CSSValueContentBox: 4741 case CSSValueContentBox:
4742 return ContentBox; 4742 return ContentBox;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
4884 default: 4884 default:
4885 break; 4885 break;
4886 } 4886 }
4887 ASSERT_NOT_REACHED(); 4887 ASSERT_NOT_REACHED();
4888 return ScrollBehaviorInstant; 4888 return ScrollBehaviorInstant;
4889 } 4889 }
4890 4890
4891 } 4891 }
4892 4892
4893 #endif 4893 #endif
OLDNEW
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.cpp ('k') | Source/core/rendering/shapes/BoxShapeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698