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

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

Issue 669553002: Remove <marquee> leftovers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 2 months 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
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.cpp ('k') | Source/core/css/CSSProperties.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1885 matching lines...) Expand 10 before | Expand all | Expand 10 after
1896 case CSSValueDiscard: 1896 case CSSValueDiscard:
1897 return MDISCARD; 1897 return MDISCARD;
1898 default: 1898 default:
1899 break; 1899 break;
1900 } 1900 }
1901 1901
1902 ASSERT_NOT_REACHED(); 1902 ASSERT_NOT_REACHED();
1903 return MCOLLAPSE; 1903 return MCOLLAPSE;
1904 } 1904 }
1905 1905
1906 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMarqueeBehavior e)
1907 : CSSValue(PrimitiveClass)
1908 {
1909 m_primitiveUnitType = CSS_VALUE_ID;
1910 switch (e) {
1911 case MNONE:
1912 m_value.valueID = CSSValueNone;
1913 break;
1914 case MSCROLL:
1915 m_value.valueID = CSSValueScroll;
1916 break;
1917 case MSLIDE:
1918 m_value.valueID = CSSValueSlide;
1919 break;
1920 case MALTERNATE:
1921 m_value.valueID = CSSValueAlternate;
1922 break;
1923 }
1924 }
1925
1926 template<> inline CSSPrimitiveValue::operator EMarqueeBehavior() const
1927 {
1928 ASSERT(isValueID());
1929 switch (m_value.valueID) {
1930 case CSSValueNone:
1931 return MNONE;
1932 case CSSValueScroll:
1933 return MSCROLL;
1934 case CSSValueSlide:
1935 return MSLIDE;
1936 case CSSValueAlternate:
1937 return MALTERNATE;
1938 default:
1939 break;
1940 }
1941
1942 ASSERT_NOT_REACHED();
1943 return MNONE;
1944 }
1945
1946 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMarqueeDirection e)
1947 : CSSValue(PrimitiveClass)
1948 {
1949 m_primitiveUnitType = CSS_VALUE_ID;
1950 switch (e) {
1951 case MFORWARD:
1952 m_value.valueID = CSSValueForwards;
1953 break;
1954 case MBACKWARD:
1955 m_value.valueID = CSSValueBackwards;
1956 break;
1957 case MAUTO:
1958 m_value.valueID = CSSValueAuto;
1959 break;
1960 case MUP:
1961 m_value.valueID = CSSValueUp;
1962 break;
1963 case MDOWN:
1964 m_value.valueID = CSSValueDown;
1965 break;
1966 case MLEFT:
1967 m_value.valueID = CSSValueLeft;
1968 break;
1969 case MRIGHT:
1970 m_value.valueID = CSSValueRight;
1971 break;
1972 }
1973 }
1974
1975 template<> inline CSSPrimitiveValue::operator EMarqueeDirection() const
1976 {
1977 ASSERT(isValueID());
1978 switch (m_value.valueID) {
1979 case CSSValueForwards:
1980 return MFORWARD;
1981 case CSSValueBackwards:
1982 return MBACKWARD;
1983 case CSSValueAuto:
1984 return MAUTO;
1985 case CSSValueAhead:
1986 case CSSValueUp: // We don't support vertical languages, so AHEAD just maps to UP.
1987 return MUP;
1988 case CSSValueReverse:
1989 case CSSValueDown: // REVERSE just maps to DOWN, since we don't do vertical text.
1990 return MDOWN;
1991 case CSSValueLeft:
1992 return MLEFT;
1993 case CSSValueRight:
1994 return MRIGHT;
1995 default:
1996 break;
1997 }
1998
1999 ASSERT_NOT_REACHED();
2000 return MAUTO;
2001 }
2002
2003 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EOverflow e) 1906 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EOverflow e)
2004 : CSSValue(PrimitiveClass) 1907 : CSSValue(PrimitiveClass)
2005 { 1908 {
2006 m_primitiveUnitType = CSS_VALUE_ID; 1909 m_primitiveUnitType = CSS_VALUE_ID;
2007 switch (e) { 1910 switch (e) {
2008 case OVISIBLE: 1911 case OVISIBLE:
2009 m_value.valueID = CSSValueVisible; 1912 m_value.valueID = CSSValueVisible;
2010 break; 1913 break;
2011 case OHIDDEN: 1914 case OHIDDEN:
2012 m_value.valueID = CSSValueHidden; 1915 m_value.valueID = CSSValueHidden;
(...skipping 2806 matching lines...) Expand 10 before | Expand all | Expand 10 after
4819 default: 4722 default:
4820 break; 4723 break;
4821 } 4724 }
4822 ASSERT_NOT_REACHED(); 4725 ASSERT_NOT_REACHED();
4823 return ScrollBehaviorInstant; 4726 return ScrollBehaviorInstant;
4824 } 4727 }
4825 4728
4826 } 4729 }
4827 4730
4828 #endif 4731 #endif
OLDNEW
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.cpp ('k') | Source/core/css/CSSProperties.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698