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

Side by Side Diff: Source/WebCore/css/CSSComputedStyleDeclaration.cpp

Issue 13992003: Add support for parsing <grid-line> that includes a 'span' (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
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 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 for (size_t i = 0; i < trackSizes.size(); ++i) 1047 for (size_t i = 0; i < trackSizes.size(); ++i)
1048 list->append(valueForGridTrackSize(trackSizes[i], style, renderView)); 1048 list->append(valueForGridTrackSize(trackSizes[i], style, renderView));
1049 return list.release(); 1049 return list.release();
1050 } 1050 }
1051 1051
1052 static PassRefPtr<CSSValue> valueForGridPosition(const GridPosition& position) 1052 static PassRefPtr<CSSValue> valueForGridPosition(const GridPosition& position)
1053 { 1053 {
1054 if (position.isAuto()) 1054 if (position.isAuto())
1055 return cssValuePool().createIdentifierValue(CSSValueAuto); 1055 return cssValuePool().createIdentifierValue(CSSValueAuto);
1056 1056
1057 return cssValuePool().createValue(position.integerPosition(), CSSPrimitiveVa lue::CSS_NUMBER); 1057 if (position.isInteger())
1058 return cssValuePool().createValue(position.integerPosition(), CSSPrimiti veValue::CSS_NUMBER);
1059
1060 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
1061 list->append(cssValuePool().createIdentifierValue(CSSValueSpan));
1062 list->append(cssValuePool().createValue(position.spanPosition(), CSSPrimitiv eValue::CSS_NUMBER));
1063 return list;
1058 } 1064 }
1059 static PassRefPtr<CSSValue> createTransitionPropertyValue(const Animation* anima tion) 1065 static PassRefPtr<CSSValue> createTransitionPropertyValue(const Animation* anima tion)
1060 { 1066 {
1061 RefPtr<CSSValue> propertyValue; 1067 RefPtr<CSSValue> propertyValue;
1062 if (animation->animationMode() == Animation::AnimateNone) 1068 if (animation->animationMode() == Animation::AnimateNone)
1063 propertyValue = cssValuePool().createIdentifierValue(CSSValueNone); 1069 propertyValue = cssValuePool().createIdentifierValue(CSSValueNone);
1064 else if (animation->animationMode() == Animation::AnimateAll) 1070 else if (animation->animationMode() == Animation::AnimateAll)
1065 propertyValue = cssValuePool().createIdentifierValue(CSSValueAll); 1071 propertyValue = cssValuePool().createIdentifierValue(CSSValueAll);
1066 else 1072 else
1067 propertyValue = cssValuePool().createValue(getPropertyNameString(animati on->property()), CSSPrimitiveValue::CSS_STRING); 1073 propertyValue = cssValuePool().createValue(getPropertyNameString(animati on->property()), CSSPrimitiveValue::CSS_STRING);
(...skipping 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after
3012 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 3018 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
3013 CSSPropertyB ackgroundClip }; 3019 CSSPropertyB ackgroundClip };
3014 3020
3015 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 3021 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
3016 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperat or)))); 3022 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperat or))));
3017 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator )))); 3023 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator ))));
3018 return list.release(); 3024 return list.release();
3019 } 3025 }
3020 3026
3021 } // namespace WebCore 3027 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698