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 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 // Those are the trailing <string>* allowed in the syntax. | 1056 // Those are the trailing <string>* allowed in the syntax. |
1057 addValuesForNamedGridLinesAtIndex(namedGridLines, trackSizes.size(), *list); | 1057 addValuesForNamedGridLinesAtIndex(namedGridLines, trackSizes.size(), *list); |
1058 return list.release(); | 1058 return list.release(); |
1059 } | 1059 } |
1060 | 1060 |
1061 static PassRefPtr<CSSValue> valueForGridPosition(const GridPosition& position) | 1061 static PassRefPtr<CSSValue> valueForGridPosition(const GridPosition& position) |
1062 { | 1062 { |
1063 if (position.isAuto()) | 1063 if (position.isAuto()) |
1064 return cssValuePool().createIdentifierValue(CSSValueAuto); | 1064 return cssValuePool().createIdentifierValue(CSSValueAuto); |
1065 | 1065 |
1066 if (position.isInteger()) | |
1067 return cssValuePool().createValue(position.integerPosition(), CSSPrimiti
veValue::CSS_NUMBER); | |
1068 | |
1069 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); | 1066 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); |
1070 list->append(cssValuePool().createIdentifierValue(CSSValueSpan)); | 1067 if (position.isSpan()) { |
1071 list->append(cssValuePool().createValue(position.spanPosition(), CSSPrimitiv
eValue::CSS_NUMBER)); | 1068 list->append(cssValuePool().createIdentifierValue(CSSValueSpan)); |
| 1069 list->append(cssValuePool().createValue(position.spanPosition(), CSSPrim
itiveValue::CSS_NUMBER)); |
| 1070 } else { |
| 1071 list->append(cssValuePool().createValue(position.integerPosition(), CSSP
rimitiveValue::CSS_NUMBER)); |
| 1072 if (!position.namedGridLine().isNull()) |
| 1073 list->append(cssValuePool().createValue(position.namedGridLine(), CS
SPrimitiveValue::CSS_STRING)); |
| 1074 } |
1072 return list; | 1075 return list; |
1073 } | 1076 } |
1074 static PassRefPtr<CSSValue> createTransitionPropertyValue(const CSSAnimationData
* animation) | 1077 static PassRefPtr<CSSValue> createTransitionPropertyValue(const CSSAnimationData
* animation) |
1075 { | 1078 { |
1076 RefPtr<CSSValue> propertyValue; | 1079 RefPtr<CSSValue> propertyValue; |
1077 if (animation->animationMode() == CSSAnimationData::AnimateNone) | 1080 if (animation->animationMode() == CSSAnimationData::AnimateNone) |
1078 propertyValue = cssValuePool().createIdentifierValue(CSSValueNone); | 1081 propertyValue = cssValuePool().createIdentifierValue(CSSValueNone); |
1079 else if (animation->animationMode() == CSSAnimationData::AnimateAll) | 1082 else if (animation->animationMode() == CSSAnimationData::AnimateAll) |
1080 propertyValue = cssValuePool().createIdentifierValue(CSSValueAll); | 1083 propertyValue = cssValuePool().createIdentifierValue(CSSValueAll); |
1081 else | 1084 else |
(...skipping 1911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2993 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, | 2996 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, |
2994 CSSPropertyB
ackgroundClip }; | 2997 CSSPropertyB
ackgroundClip }; |
2995 | 2998 |
2996 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); | 2999 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); |
2997 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperat
or)))); | 3000 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperat
or)))); |
2998 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator
)))); | 3001 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator
)))); |
2999 return list.release(); | 3002 return list.release(); |
3000 } | 3003 } |
3001 | 3004 |
3002 } // namespace WebCore | 3005 } // namespace WebCore |
OLD | NEW |