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 2085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2096 break; | 2096 break; |
2097 case RelativePosition: | 2097 case RelativePosition: |
2098 m_value.valueID = CSSValueRelative; | 2098 m_value.valueID = CSSValueRelative; |
2099 break; | 2099 break; |
2100 case AbsolutePosition: | 2100 case AbsolutePosition: |
2101 m_value.valueID = CSSValueAbsolute; | 2101 m_value.valueID = CSSValueAbsolute; |
2102 break; | 2102 break; |
2103 case FixedPosition: | 2103 case FixedPosition: |
2104 m_value.valueID = CSSValueFixed; | 2104 m_value.valueID = CSSValueFixed; |
2105 break; | 2105 break; |
2106 case StickyPosition: | |
2107 m_value.valueID = CSSValueSticky; | |
2108 break; | |
2109 } | 2106 } |
2110 } | 2107 } |
2111 | 2108 |
2112 template<> inline CSSPrimitiveValue::operator EPosition() const | 2109 template<> inline CSSPrimitiveValue::operator EPosition() const |
2113 { | 2110 { |
2114 ASSERT(isValueID()); | 2111 ASSERT(isValueID()); |
2115 switch (m_value.valueID) { | 2112 switch (m_value.valueID) { |
2116 case CSSValueStatic: | 2113 case CSSValueStatic: |
2117 return StaticPosition; | 2114 return StaticPosition; |
2118 case CSSValueRelative: | 2115 case CSSValueRelative: |
2119 return RelativePosition; | 2116 return RelativePosition; |
2120 case CSSValueAbsolute: | 2117 case CSSValueAbsolute: |
2121 return AbsolutePosition; | 2118 return AbsolutePosition; |
2122 case CSSValueFixed: | 2119 case CSSValueFixed: |
2123 return FixedPosition; | 2120 return FixedPosition; |
2124 case CSSValueSticky: | |
2125 return StickyPosition; | |
2126 default: | 2121 default: |
2127 break; | 2122 break; |
2128 } | 2123 } |
2129 | 2124 |
2130 ASSERT_NOT_REACHED(); | 2125 ASSERT_NOT_REACHED(); |
2131 return StaticPosition; | 2126 return StaticPosition; |
2132 } | 2127 } |
2133 | 2128 |
2134 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EResize e) | 2129 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EResize e) |
2135 : CSSValue(PrimitiveClass) | 2130 : CSSValue(PrimitiveClass) |
(...skipping 2755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4891 default: | 4886 default: |
4892 break; | 4887 break; |
4893 } | 4888 } |
4894 ASSERT_NOT_REACHED(); | 4889 ASSERT_NOT_REACHED(); |
4895 return ScrollBehaviorInstant; | 4890 return ScrollBehaviorInstant; |
4896 } | 4891 } |
4897 | 4892 |
4898 } | 4893 } |
4899 | 4894 |
4900 #endif | 4895 #endif |
OLD | NEW |