| OLD | NEW |
| 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 4701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4712 return ScrollBehaviorAuto; | 4712 return ScrollBehaviorAuto; |
| 4713 case CSSValueSmooth: | 4713 case CSSValueSmooth: |
| 4714 return ScrollBehaviorSmooth; | 4714 return ScrollBehaviorSmooth; |
| 4715 default: | 4715 default: |
| 4716 break; | 4716 break; |
| 4717 } | 4717 } |
| 4718 ASSERT_NOT_REACHED(); | 4718 ASSERT_NOT_REACHED(); |
| 4719 return ScrollBehaviorAuto; | 4719 return ScrollBehaviorAuto; |
| 4720 } | 4720 } |
| 4721 | 4721 |
| 4722 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ScrollSnapType snapType) |
| 4723 : CSSValue(PrimitiveClass) |
| 4724 { |
| 4725 m_primitiveUnitType = CSS_VALUE_ID; |
| 4726 switch (snapType) { |
| 4727 case ScrollSnapTypeNone: |
| 4728 m_value.valueID = CSSValueNone; |
| 4729 break; |
| 4730 case ScrollSnapTypeMandatory: |
| 4731 m_value.valueID = CSSValueMandatory; |
| 4732 break; |
| 4733 case ScrollSnapTypeProximity: |
| 4734 m_value.valueID = CSSValueProximity; |
| 4735 break; |
| 4736 } |
| 4737 } |
| 4738 |
| 4739 template<> inline CSSPrimitiveValue::operator ScrollSnapType() const |
| 4740 { |
| 4741 switch (getValueID()) { |
| 4742 case CSSValueNone: |
| 4743 return ScrollSnapTypeNone; |
| 4744 case CSSValueMandatory: |
| 4745 return ScrollSnapTypeMandatory; |
| 4746 case CSSValueProximity: |
| 4747 return ScrollSnapTypeProximity; |
| 4748 default: |
| 4749 break; |
| 4750 } |
| 4751 ASSERT_NOT_REACHED(); |
| 4752 return ScrollSnapTypeNone; |
| 4753 } |
| 4754 |
| 4722 } // namespace blink | 4755 } // namespace blink |
| 4723 | 4756 |
| 4724 #endif | 4757 #endif |
| OLD | NEW |