OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 1940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1951 if (!featureSettings || !featureSettings->size()) | 1951 if (!featureSettings || !featureSettings->size()) |
1952 return cssValuePool().createIdentifierValue(CSSValueNormal); | 1952 return cssValuePool().createIdentifierValue(CSSValueNormal); |
1953 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSep
arated(); | 1953 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSep
arated(); |
1954 for (unsigned i = 0; i < featureSettings->size(); ++i) { | 1954 for (unsigned i = 0; i < featureSettings->size(); ++i) { |
1955 const FontFeature& feature = featureSettings->at(i); | 1955 const FontFeature& feature = featureSettings->at(i); |
1956 RefPtrWillBeRawPtr<CSSFontFeatureValue> featureValue = CSSFontFe
atureValue::create(feature.tag(), feature.value()); | 1956 RefPtrWillBeRawPtr<CSSFontFeatureValue> featureValue = CSSFontFe
atureValue::create(feature.tag(), feature.value()); |
1957 list->append(featureValue.release()); | 1957 list->append(featureValue.release()); |
1958 } | 1958 } |
1959 return list.release(); | 1959 return list.release(); |
1960 } | 1960 } |
1961 case CSSPropertyGridAutoFlow: | 1961 case CSSPropertyGridAutoFlow: { |
1962 return cssValuePool().createValue(style->gridAutoFlow()); | 1962 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSep
arated(); |
| 1963 switch (style->gridAutoFlow()) { |
| 1964 case AutoFlowRow: |
| 1965 case AutoFlowRowDense: |
| 1966 list->append(cssValuePool().createIdentifierValue(CSSValueRow)); |
| 1967 break; |
| 1968 case AutoFlowColumn: |
| 1969 case AutoFlowColumnDense: |
| 1970 list->append(cssValuePool().createIdentifierValue(CSSValueColumn
)); |
| 1971 break; |
| 1972 case AutoFlowStackRow: |
| 1973 case AutoFlowStackColumn: |
| 1974 list->append(cssValuePool().createIdentifierValue(CSSValueStack)
); |
| 1975 break; |
| 1976 default: |
| 1977 ASSERT_NOT_REACHED(); |
| 1978 } |
1963 | 1979 |
| 1980 switch (style->gridAutoFlow()) { |
| 1981 case AutoFlowRowDense: |
| 1982 case AutoFlowColumnDense: |
| 1983 list->append(cssValuePool().createIdentifierValue(CSSValueDense)
); |
| 1984 break; |
| 1985 case AutoFlowStackRow: |
| 1986 list->append(cssValuePool().createIdentifierValue(CSSValueRow)); |
| 1987 break; |
| 1988 case AutoFlowStackColumn: |
| 1989 list->append(cssValuePool().createIdentifierValue(CSSValueColumn
)); |
| 1990 break; |
| 1991 default: |
| 1992 // Do nothing. |
| 1993 break; |
| 1994 } |
| 1995 |
| 1996 return list.release(); |
| 1997 } |
1964 // Specs mention that getComputedStyle() should return the used value of
the property instead of the computed | 1998 // Specs mention that getComputedStyle() should return the used value of
the property instead of the computed |
1965 // one for grid-definition-{rows|columns} but not for the grid-auto-{row
s|columns} as things like | 1999 // one for grid-definition-{rows|columns} but not for the grid-auto-{row
s|columns} as things like |
1966 // grid-auto-columns: 2fr; cannot be resolved to a value in pixels as th
e '2fr' means very different things | 2000 // grid-auto-columns: 2fr; cannot be resolved to a value in pixels as th
e '2fr' means very different things |
1967 // depending on the size of the explicit grid or the number of implicit
tracks added to the grid. See | 2001 // depending on the size of the explicit grid or the number of implicit
tracks added to the grid. See |
1968 // http://lists.w3.org/Archives/Public/www-style/2013Nov/0014.html | 2002 // http://lists.w3.org/Archives/Public/www-style/2013Nov/0014.html |
1969 case CSSPropertyGridAutoColumns: | 2003 case CSSPropertyGridAutoColumns: |
1970 return specifiedValueForGridTrackSize(style->gridAutoColumns(), *sty
le); | 2004 return specifiedValueForGridTrackSize(style->gridAutoColumns(), *sty
le); |
1971 case CSSPropertyGridAutoRows: | 2005 case CSSPropertyGridAutoRows: |
1972 return specifiedValueForGridTrackSize(style->gridAutoRows(), *style)
; | 2006 return specifiedValueForGridTrackSize(style->gridAutoRows(), *style)
; |
1973 | 2007 |
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3056 return list.release(); | 3090 return list.release(); |
3057 } | 3091 } |
3058 | 3092 |
3059 void CSSComputedStyleDeclaration::trace(Visitor* visitor) | 3093 void CSSComputedStyleDeclaration::trace(Visitor* visitor) |
3060 { | 3094 { |
3061 visitor->trace(m_node); | 3095 visitor->trace(m_node); |
3062 CSSStyleDeclaration::trace(visitor); | 3096 CSSStyleDeclaration::trace(visitor); |
3063 } | 3097 } |
3064 | 3098 |
3065 } // namespace WebCore | 3099 } // namespace WebCore |
OLD | NEW |