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

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

Issue 766023002: Rename 'instant' value of scroll-behavior CSS property to 'auto' (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
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 4736 matching lines...) Expand 10 before | Expand all | Expand 10 after
4747 } 4747 }
4748 ASSERT_NOT_REACHED(); 4748 ASSERT_NOT_REACHED();
4749 return OverflowAlignmentTrue; 4749 return OverflowAlignmentTrue;
4750 } 4750 }
4751 4751
4752 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ScrollBehavior behavior) 4752 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ScrollBehavior behavior)
4753 : CSSValue(PrimitiveClass) 4753 : CSSValue(PrimitiveClass)
4754 { 4754 {
4755 m_primitiveUnitType = CSS_VALUE_ID; 4755 m_primitiveUnitType = CSS_VALUE_ID;
4756 switch (behavior) { 4756 switch (behavior) {
4757 case ScrollBehaviorInstant: 4757 case ScrollBehaviorAuto:
4758 m_value.valueID = CSSValueInstant; 4758 m_value.valueID = CSSValueAuto;
4759 break; 4759 break;
4760 case ScrollBehaviorSmooth: 4760 case ScrollBehaviorSmooth:
4761 m_value.valueID = CSSValueSmooth; 4761 m_value.valueID = CSSValueSmooth;
4762 break; 4762 break;
4763 case ScrollBehaviorAuto: 4763 case ScrollBehaviorInstant:
4764 // Behavior 'auto' is only allowed in ScrollOptions arguments passed to 4764 // Behavior 'instant' is only allowed in ScrollOptions arguments passed to
4765 // CSSOM scroll APIs. 4765 // CSSOM scroll APIs.
4766 ASSERT_NOT_REACHED(); 4766 ASSERT_NOT_REACHED();
4767 } 4767 }
4768 } 4768 }
4769 4769
4770 template<> inline CSSPrimitiveValue::operator ScrollBehavior() const 4770 template<> inline CSSPrimitiveValue::operator ScrollBehavior() const
4771 { 4771 {
4772 switch (getValueID()) { 4772 switch (getValueID()) {
4773 case CSSValueInstant: 4773 case CSSValueAuto:
4774 return ScrollBehaviorInstant; 4774 return ScrollBehaviorAuto;
4775 case CSSValueSmooth: 4775 case CSSValueSmooth:
4776 return ScrollBehaviorSmooth; 4776 return ScrollBehaviorSmooth;
4777 default: 4777 default:
4778 break; 4778 break;
4779 } 4779 }
4780 ASSERT_NOT_REACHED(); 4780 ASSERT_NOT_REACHED();
4781 return ScrollBehaviorInstant; 4781 return ScrollBehaviorAuto;
4782 } 4782 }
4783 4783
4784 } 4784 }
4785 4785
4786 #endif 4786 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fast/scroll-behavior/subframe-scrollTop.html ('k') | Source/core/css/CSSValueKeywords.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698