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 1917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1928 case CSSValueAlternate: | 1928 case CSSValueAlternate: |
1929 return MALTERNATE; | 1929 return MALTERNATE; |
1930 default: | 1930 default: |
1931 break; | 1931 break; |
1932 } | 1932 } |
1933 | 1933 |
1934 ASSERT_NOT_REACHED(); | 1934 ASSERT_NOT_REACHED(); |
1935 return MNONE; | 1935 return MNONE; |
1936 } | 1936 } |
1937 | 1937 |
1938 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(RegionFragment e) | |
1939 : CSSValue(PrimitiveClass) | |
1940 { | |
1941 m_primitiveUnitType = CSS_VALUE_ID; | |
1942 switch (e) { | |
1943 case AutoRegionFragment: | |
1944 m_value.valueID = CSSValueAuto; | |
1945 break; | |
1946 case BreakRegionFragment: | |
1947 m_value.valueID = CSSValueBreak; | |
1948 break; | |
1949 } | |
1950 } | |
1951 | |
1952 template<> inline CSSPrimitiveValue::operator RegionFragment() const | |
1953 { | |
1954 ASSERT(isValueID()); | |
1955 switch (m_value.valueID) { | |
1956 case CSSValueAuto: | |
1957 return AutoRegionFragment; | |
1958 case CSSValueBreak: | |
1959 return BreakRegionFragment; | |
1960 default: | |
1961 break; | |
1962 } | |
1963 | |
1964 ASSERT_NOT_REACHED(); | |
1965 return AutoRegionFragment; | |
1966 } | |
1967 | |
1968 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMarqueeDirection e) | 1938 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMarqueeDirection e) |
1969 : CSSValue(PrimitiveClass) | 1939 : CSSValue(PrimitiveClass) |
1970 { | 1940 { |
1971 m_primitiveUnitType = CSS_VALUE_ID; | 1941 m_primitiveUnitType = CSS_VALUE_ID; |
1972 switch (e) { | 1942 switch (e) { |
1973 case MFORWARD: | 1943 case MFORWARD: |
1974 m_value.valueID = CSSValueForwards; | 1944 m_value.valueID = CSSValueForwards; |
1975 break; | 1945 break; |
1976 case MBACKWARD: | 1946 case MBACKWARD: |
1977 m_value.valueID = CSSValueBackwards; | 1947 m_value.valueID = CSSValueBackwards; |
(...skipping 3065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5043 default: | 5013 default: |
5044 break; | 5014 break; |
5045 } | 5015 } |
5046 ASSERT_NOT_REACHED(); | 5016 ASSERT_NOT_REACHED(); |
5047 return ScrollBehaviorInstant; | 5017 return ScrollBehaviorInstant; |
5048 } | 5018 } |
5049 | 5019 |
5050 } | 5020 } |
5051 | 5021 |
5052 #endif | 5022 #endif |
OLD | NEW |