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 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 default: | 958 default: |
959 filterValue = CSSFilterValue::create(CSSFilterValue::UnknownFilterOp
eration); | 959 filterValue = CSSFilterValue::create(CSSFilterValue::UnknownFilterOp
eration); |
960 break; | 960 break; |
961 } | 961 } |
962 list->append(filterValue.release()); | 962 list->append(filterValue.release()); |
963 } | 963 } |
964 | 964 |
965 return list.release(); | 965 return list.release(); |
966 } | 966 } |
967 | 967 |
968 static PassRefPtr<CSSValue> valueForGridTrackBreadth(const GridLength& trackBrea
dth, const RenderStyle& style, RenderView* renderView) | 968 static PassRefPtr<CSSValue> specifiedValueForGridTrackBreadth(const GridLength&
trackBreadth, const RenderStyle& style, RenderView* renderView) |
969 { | 969 { |
970 if (!trackBreadth.isLength()) | 970 if (!trackBreadth.isLength()) |
971 return cssValuePool().createValue(trackBreadth.flex(), CSSPrimitiveValue
::CSS_FR); | 971 return cssValuePool().createValue(trackBreadth.flex(), CSSPrimitiveValue
::CSS_FR); |
972 | 972 |
973 const Length& trackBreadthLength = trackBreadth.length(); | 973 const Length& trackBreadthLength = trackBreadth.length(); |
974 if (trackBreadthLength.isAuto()) | 974 if (trackBreadthLength.isAuto()) |
975 return cssValuePool().createIdentifierValue(CSSValueAuto); | 975 return cssValuePool().createIdentifierValue(CSSValueAuto); |
976 if (trackBreadthLength.isViewportPercentage()) | 976 if (trackBreadthLength.isViewportPercentage()) |
977 return zoomAdjustedPixelValue(valueForLength(trackBreadthLength, 0, rend
erView), style); | 977 return zoomAdjustedPixelValue(valueForLength(trackBreadthLength, 0, rend
erView), style); |
978 return zoomAdjustedPixelValueForLength(trackBreadthLength, style); | 978 return zoomAdjustedPixelValueForLength(trackBreadthLength, style); |
979 } | 979 } |
980 | 980 |
981 static PassRefPtr<CSSValue> specifiedValueForGridTrackSize(const GridTrackSize&
trackSize, const RenderStyle& style, RenderView* renderView) | 981 static PassRefPtr<CSSValue> specifiedValueForGridTrackSize(const GridTrackSize&
trackSize, const RenderStyle& style, RenderView* renderView) |
982 { | 982 { |
983 switch (trackSize.type()) { | 983 switch (trackSize.type()) { |
984 case LengthTrackSizing: | 984 case LengthTrackSizing: |
985 return valueForGridTrackBreadth(trackSize.length(), style, renderView); | 985 return specifiedValueForGridTrackBreadth(trackSize.length(), style, rend
erView); |
986 case MinMaxTrackSizing: | 986 case MinMaxTrackSizing: |
987 RefPtr<CSSValueList> minMaxTrackBreadths = CSSValueList::createCommaSepa
rated(); | 987 RefPtr<CSSValueList> minMaxTrackBreadths = CSSValueList::createCommaSepa
rated(); |
988 minMaxTrackBreadths->append(valueForGridTrackBreadth(trackSize.minTrackB
readth(), style, renderView)); | 988 minMaxTrackBreadths->append(specifiedValueForGridTrackBreadth(trackSize.
minTrackBreadth(), style, renderView)); |
989 minMaxTrackBreadths->append(valueForGridTrackBreadth(trackSize.maxTrackB
readth(), style, renderView)); | 989 minMaxTrackBreadths->append(specifiedValueForGridTrackBreadth(trackSize.
maxTrackBreadth(), style, renderView)); |
990 return CSSFunctionValue::create("minmax(", minMaxTrackBreadths); | 990 return CSSFunctionValue::create("minmax(", minMaxTrackBreadths); |
991 } | 991 } |
992 ASSERT_NOT_REACHED(); | 992 ASSERT_NOT_REACHED(); |
993 return 0; | 993 return 0; |
994 } | 994 } |
995 | 995 |
996 static void addValuesForNamedGridLinesAtIndex(const OrderedNamedGridLines& order
edNamedGridLines, size_t i, CSSValueList& list) | 996 static void addValuesForNamedGridLinesAtIndex(const OrderedNamedGridLines& order
edNamedGridLines, size_t i, CSSValueList& list) |
997 { | 997 { |
998 const Vector<String>& namedGridLines = orderedNamedGridLines.get(i); | 998 const Vector<String>& namedGridLines = orderedNamedGridLines.get(i); |
999 for (size_t j = 0; j < namedGridLines.size(); ++j) | 999 for (size_t j = 0; j < namedGridLines.size(); ++j) |
(...skipping 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3217 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, | 3217 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, |
3218 CSSPropertyB
ackgroundClip }; | 3218 CSSPropertyB
ackgroundClip }; |
3219 | 3219 |
3220 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); | 3220 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); |
3221 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); | 3221 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); |
3222 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); | 3222 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); |
3223 return list.release(); | 3223 return list.release(); |
3224 } | 3224 } |
3225 | 3225 |
3226 } // namespace WebCore | 3226 } // namespace WebCore |
OLD | NEW |