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

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

Issue 17090005: [CSS Grid Layout] Implement 'justify-self' parsing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed a bug in parseColor uncovered by the patch Created 6 years, 11 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 CSSPropertyFloat, 137 CSSPropertyFloat,
138 CSSPropertyFontFamily, 138 CSSPropertyFontFamily,
139 CSSPropertyFontKerning, 139 CSSPropertyFontKerning,
140 CSSPropertyFontSize, 140 CSSPropertyFontSize,
141 CSSPropertyFontStyle, 141 CSSPropertyFontStyle,
142 CSSPropertyFontVariant, 142 CSSPropertyFontVariant,
143 CSSPropertyFontWeight, 143 CSSPropertyFontWeight,
144 CSSPropertyHeight, 144 CSSPropertyHeight,
145 CSSPropertyImageRendering, 145 CSSPropertyImageRendering,
146 CSSPropertyIsolation, 146 CSSPropertyIsolation,
147 CSSPropertyJustifySelf,
147 CSSPropertyLeft, 148 CSSPropertyLeft,
148 CSSPropertyLetterSpacing, 149 CSSPropertyLetterSpacing,
149 CSSPropertyLineHeight, 150 CSSPropertyLineHeight,
150 CSSPropertyListStyleImage, 151 CSSPropertyListStyleImage,
151 CSSPropertyListStylePosition, 152 CSSPropertyListStylePosition,
152 CSSPropertyListStyleType, 153 CSSPropertyListStyleType,
153 CSSPropertyMarginBottom, 154 CSSPropertyMarginBottom,
154 CSSPropertyMarginLeft, 155 CSSPropertyMarginLeft,
155 CSSPropertyMarginRight, 156 CSSPropertyMarginRight,
156 CSSPropertyMarginTop, 157 CSSPropertyMarginTop,
(...skipping 1940 matching lines...) Expand 10 before | Expand all | Expand 10 after
2097 return cssValuePool().createIdentifierValue(CSSValueAuto); 2098 return cssValuePool().createIdentifierValue(CSSValueAuto);
2098 return cssValuePool().createValue(style->hyphenationString(), CSSPri mitiveValue::CSS_STRING); 2099 return cssValuePool().createValue(style->hyphenationString(), CSSPri mitiveValue::CSS_STRING);
2099 case CSSPropertyWebkitBorderFit: 2100 case CSSPropertyWebkitBorderFit:
2100 if (style->borderFit() == BorderFitBorder) 2101 if (style->borderFit() == BorderFitBorder)
2101 return cssValuePool().createIdentifierValue(CSSValueBorder); 2102 return cssValuePool().createIdentifierValue(CSSValueBorder);
2102 return cssValuePool().createIdentifierValue(CSSValueLines); 2103 return cssValuePool().createIdentifierValue(CSSValueLines);
2103 case CSSPropertyImageRendering: 2104 case CSSPropertyImageRendering:
2104 return CSSPrimitiveValue::create(style->imageRendering()); 2105 return CSSPrimitiveValue::create(style->imageRendering());
2105 case CSSPropertyIsolation: 2106 case CSSPropertyIsolation:
2106 return cssValuePool().createValue(style->isolation()); 2107 return cssValuePool().createValue(style->isolation());
2108 case CSSPropertyJustifySelf: {
2109 RefPtr<CSSValueList> result = CSSValueList::createSpaceSeparated();
2110 result->append(CSSPrimitiveValue::create(style->justifySelf()));
2111 if (style->justifySelf() >= JustifySelfCenter && style->justifySelfO verflowAlignment() != JustifySelfOverflowAlignmentDefault)
2112 result->append(CSSPrimitiveValue::create(style->justifySelfOverf lowAlignment()));
2113 return result.release();
2114 }
2107 case CSSPropertyLeft: 2115 case CSSPropertyLeft:
2108 return valueForPositionOffset(*style, CSSPropertyLeft, renderer); 2116 return valueForPositionOffset(*style, CSSPropertyLeft, renderer);
2109 case CSSPropertyLetterSpacing: 2117 case CSSPropertyLetterSpacing:
2110 if (!style->letterSpacing()) 2118 if (!style->letterSpacing())
2111 return cssValuePool().createIdentifierValue(CSSValueNormal); 2119 return cssValuePool().createIdentifierValue(CSSValueNormal);
2112 return zoomAdjustedPixelValue(style->letterSpacing(), *style); 2120 return zoomAdjustedPixelValue(style->letterSpacing(), *style);
2113 case CSSPropertyWebkitLineClamp: 2121 case CSSPropertyWebkitLineClamp:
2114 if (style->lineClamp().isNone()) 2122 if (style->lineClamp().isNone())
2115 return cssValuePool().createIdentifierValue(CSSValueNone); 2123 return cssValuePool().createIdentifierValue(CSSValueNone);
2116 return cssValuePool().createValue(style->lineClamp().value(), style- >lineClamp().isPercentage() ? CSSPrimitiveValue::CSS_PERCENTAGE : CSSPrimitiveVa lue::CSS_NUMBER); 2124 return cssValuePool().createValue(style->lineClamp().value(), style- >lineClamp().isPercentage() ? CSSPrimitiveValue::CSS_PERCENTAGE : CSSPrimitiveVa lue::CSS_NUMBER);
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
3245 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 3253 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
3246 CSSPropertyB ackgroundClip }; 3254 CSSPropertyB ackgroundClip };
3247 3255
3248 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 3256 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
3249 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator)))); 3257 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator))));
3250 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator)))); 3258 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator))));
3251 return list.release(); 3259 return list.release();
3252 } 3260 }
3253 3261
3254 } // namespace WebCore 3262 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/webexposed/css-properties-as-js-properties-expected.txt ('k') | Source/core/css/CSSPrimitiveValueMappings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698