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

Side by Side Diff: Source/core/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: Fixed the change to match the specification 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 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 for (size_t i = 0; i < trackSizes.size(); ++i) 1046 for (size_t i = 0; i < trackSizes.size(); ++i)
1047 list->append(valueForGridTrackSize(trackSizes[i], style, renderView)); 1047 list->append(valueForGridTrackSize(trackSizes[i], style, renderView));
1048 return list.release(); 1048 return list.release();
1049 } 1049 }
1050 1050
1051 static PassRefPtr<CSSValue> valueForGridPosition(const GridPosition& position) 1051 static PassRefPtr<CSSValue> valueForGridPosition(const GridPosition& position)
1052 { 1052 {
1053 if (position.isAuto()) 1053 if (position.isAuto())
1054 return cssValuePool().createIdentifierValue(CSSValueAuto); 1054 return cssValuePool().createIdentifierValue(CSSValueAuto);
1055 1055
1056 return cssValuePool().createValue(position.integerPosition(), CSSPrimitiveVa lue::CSS_NUMBER); 1056 if (position.isInteger())
1057 return cssValuePool().createValue(position.integerPosition(), CSSPrimiti veValue::CSS_NUMBER);
1058
1059 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
1060 list->append(cssValuePool().createIdentifierValue(CSSValueSpan));
1061 list->append(cssValuePool().createValue(position.spanPosition(), CSSPrimitiv eValue::CSS_NUMBER));
1062 return list;
1057 } 1063 }
1058 static PassRefPtr<CSSValue> createTransitionPropertyValue(const Animation* anima tion) 1064 static PassRefPtr<CSSValue> createTransitionPropertyValue(const Animation* anima tion)
1059 { 1065 {
1060 RefPtr<CSSValue> propertyValue; 1066 RefPtr<CSSValue> propertyValue;
1061 if (animation->animationMode() == Animation::AnimateNone) 1067 if (animation->animationMode() == Animation::AnimateNone)
1062 propertyValue = cssValuePool().createIdentifierValue(CSSValueNone); 1068 propertyValue = cssValuePool().createIdentifierValue(CSSValueNone);
1063 else if (animation->animationMode() == Animation::AnimateAll) 1069 else if (animation->animationMode() == Animation::AnimateAll)
1064 propertyValue = cssValuePool().createIdentifierValue(CSSValueAll); 1070 propertyValue = cssValuePool().createIdentifierValue(CSSValueAll);
1065 else 1071 else
1066 propertyValue = cssValuePool().createValue(getPropertyNameString(animati on->property()), CSSPrimitiveValue::CSS_STRING); 1072 propertyValue = cssValuePool().createValue(getPropertyNameString(animati on->property()), CSSPrimitiveValue::CSS_STRING);
(...skipping 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after
3009 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 3015 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
3010 CSSPropertyB ackgroundClip }; 3016 CSSPropertyB ackgroundClip };
3011 3017
3012 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 3018 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
3013 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperat or)))); 3019 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperat or))));
3014 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator )))); 3020 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator ))));
3015 return list.release(); 3021 return list.release();
3016 } 3022 }
3017 3023
3018 } // namespace WebCore 3024 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/css-grid-layout/grid-item-start-before-get-set-expected.txt ('k') | Source/core/css/CSSParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698