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 1946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1957 case CSSValueAlternate: | 1957 case CSSValueAlternate: |
1958 return MALTERNATE; | 1958 return MALTERNATE; |
1959 default: | 1959 default: |
1960 break; | 1960 break; |
1961 } | 1961 } |
1962 | 1962 |
1963 ASSERT_NOT_REACHED(); | 1963 ASSERT_NOT_REACHED(); |
1964 return MNONE; | 1964 return MNONE; |
1965 } | 1965 } |
1966 | 1966 |
1967 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(RegionFragment e) | |
1968 : CSSValue(PrimitiveClass) | |
1969 { | |
1970 m_primitiveUnitType = CSS_VALUE_ID; | |
1971 switch (e) { | |
1972 case AutoRegionFragment: | |
1973 m_value.valueID = CSSValueAuto; | |
1974 break; | |
1975 case BreakRegionFragment: | |
1976 m_value.valueID = CSSValueBreak; | |
1977 break; | |
1978 } | |
1979 } | |
1980 | |
1981 template<> inline CSSPrimitiveValue::operator RegionFragment() const | |
1982 { | |
1983 ASSERT(isValueID()); | |
1984 switch (m_value.valueID) { | |
1985 case CSSValueAuto: | |
1986 return AutoRegionFragment; | |
1987 case CSSValueBreak: | |
1988 return BreakRegionFragment; | |
1989 default: | |
1990 break; | |
1991 } | |
1992 | |
1993 ASSERT_NOT_REACHED(); | |
1994 return AutoRegionFragment; | |
1995 } | |
1996 | |
1997 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMarqueeDirection e) | 1967 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMarqueeDirection e) |
1998 : CSSValue(PrimitiveClass) | 1968 : CSSValue(PrimitiveClass) |
1999 { | 1969 { |
2000 m_primitiveUnitType = CSS_VALUE_ID; | 1970 m_primitiveUnitType = CSS_VALUE_ID; |
2001 switch (e) { | 1971 switch (e) { |
2002 case MFORWARD: | 1972 case MFORWARD: |
2003 m_value.valueID = CSSValueForwards; | 1973 m_value.valueID = CSSValueForwards; |
2004 break; | 1974 break; |
2005 case MBACKWARD: | 1975 case MBACKWARD: |
2006 m_value.valueID = CSSValueBackwards; | 1976 m_value.valueID = CSSValueBackwards; |
(...skipping 3033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5040 default: | 5010 default: |
5041 break; | 5011 break; |
5042 } | 5012 } |
5043 ASSERT_NOT_REACHED(); | 5013 ASSERT_NOT_REACHED(); |
5044 return OverflowAlignmentTrue; | 5014 return OverflowAlignmentTrue; |
5045 } | 5015 } |
5046 | 5016 |
5047 } | 5017 } |
5048 | 5018 |
5049 #endif | 5019 #endif |
OLD | NEW |