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

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

Issue 23528004: [CSS Grid Layout] Update named grid lines syntax to the last version of the specs (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@named
Patch Set: Patch for landing v2 Created 7 years, 1 month 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
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/css/CSSGrammar.y » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 19 matching lines...) Expand all
30 #include "StylePropertyShorthand.h" 30 #include "StylePropertyShorthand.h"
31 #include "bindings/v8/ExceptionState.h" 31 #include "bindings/v8/ExceptionState.h"
32 #include "core/css/BasicShapeFunctions.h" 32 #include "core/css/BasicShapeFunctions.h"
33 #include "core/css/CSSArrayFunctionValue.h" 33 #include "core/css/CSSArrayFunctionValue.h"
34 #include "core/css/CSSAspectRatioValue.h" 34 #include "core/css/CSSAspectRatioValue.h"
35 #include "core/css/CSSBorderImage.h" 35 #include "core/css/CSSBorderImage.h"
36 #include "core/css/CSSFilterValue.h" 36 #include "core/css/CSSFilterValue.h"
37 #include "core/css/CSSFontFeatureValue.h" 37 #include "core/css/CSSFontFeatureValue.h"
38 #include "core/css/CSSFontValue.h" 38 #include "core/css/CSSFontValue.h"
39 #include "core/css/CSSFunctionValue.h" 39 #include "core/css/CSSFunctionValue.h"
40 #include "core/css/CSSGridLineNamesValue.h"
40 #include "core/css/CSSGridTemplateValue.h" 41 #include "core/css/CSSGridTemplateValue.h"
41 #include "core/css/CSSLineBoxContainValue.h" 42 #include "core/css/CSSLineBoxContainValue.h"
42 #include "core/css/CSSMixFunctionValue.h" 43 #include "core/css/CSSMixFunctionValue.h"
43 #include "core/css/CSSParser.h" 44 #include "core/css/CSSParser.h"
44 #include "core/css/CSSPrimitiveValue.h" 45 #include "core/css/CSSPrimitiveValue.h"
45 #include "core/css/CSSPrimitiveValueMappings.h" 46 #include "core/css/CSSPrimitiveValueMappings.h"
46 #include "core/css/CSSReflectValue.h" 47 #include "core/css/CSSReflectValue.h"
47 #include "core/css/CSSSelector.h" 48 #include "core/css/CSSSelector.h"
48 #include "core/css/CSSShadowValue.h" 49 #include "core/css/CSSShadowValue.h"
49 #include "core/css/CSSTimingFunctionValue.h" 50 #include "core/css/CSSTimingFunctionValue.h"
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 minMaxTrackBreadths->append(valueForGridTrackBreadth(trackSize.maxTrackB readth(), style, renderView)); 990 minMaxTrackBreadths->append(valueForGridTrackBreadth(trackSize.maxTrackB readth(), style, renderView));
990 return CSSFunctionValue::create("minmax(", minMaxTrackBreadths); 991 return CSSFunctionValue::create("minmax(", minMaxTrackBreadths);
991 } 992 }
992 ASSERT_NOT_REACHED(); 993 ASSERT_NOT_REACHED();
993 return 0; 994 return 0;
994 } 995 }
995 996
996 static void addValuesForNamedGridLinesAtIndex(const OrderedNamedGridLines& order edNamedGridLines, size_t i, CSSValueList& list) 997 static void addValuesForNamedGridLinesAtIndex(const OrderedNamedGridLines& order edNamedGridLines, size_t i, CSSValueList& list)
997 { 998 {
998 const Vector<String>& namedGridLines = orderedNamedGridLines.get(i); 999 const Vector<String>& namedGridLines = orderedNamedGridLines.get(i);
1000 if (namedGridLines.isEmpty())
1001 return;
1002
1003 RefPtr<CSSGridLineNamesValue> lineNames = CSSGridLineNamesValue::create();
999 for (size_t j = 0; j < namedGridLines.size(); ++j) 1004 for (size_t j = 0; j < namedGridLines.size(); ++j)
1000 list.append(cssValuePool().createValue(namedGridLines[j], CSSPrimitiveVa lue::CSS_STRING)); 1005 lineNames->append(cssValuePool().createValue(namedGridLines[j], CSSPrimi tiveValue::CSS_STRING));
1006 list.append(lineNames.release());
1001 } 1007 }
1002 1008
1003 static PassRefPtr<CSSValue> valueForGridTrackList(GridTrackSizingDirection direc tion, RenderObject* renderer, const RenderStyle& style, RenderView* renderView) 1009 static PassRefPtr<CSSValue> valueForGridTrackList(GridTrackSizingDirection direc tion, RenderObject* renderer, const RenderStyle& style, RenderView* renderView)
1004 { 1010 {
1005 const Vector<GridTrackSize>& trackSizes = direction == ForColumns ? style.gr idDefinitionColumns() : style.gridDefinitionRows(); 1011 const Vector<GridTrackSize>& trackSizes = direction == ForColumns ? style.gr idDefinitionColumns() : style.gridDefinitionRows();
1006 const OrderedNamedGridLines& orderedNamedGridLines = direction == ForColumns ? style.orderedNamedGridColumnLines() : style.orderedNamedGridRowLines(); 1012 const OrderedNamedGridLines& orderedNamedGridLines = direction == ForColumns ? style.orderedNamedGridColumnLines() : style.orderedNamedGridRowLines();
1007 1013
1008 // Handle the 'none' case here. 1014 // Handle the 'none' case here.
1009 if (!trackSizes.size()) { 1015 if (!trackSizes.size()) {
1010 ASSERT(orderedNamedGridLines.isEmpty()); 1016 ASSERT(orderedNamedGridLines.isEmpty());
(...skipping 2206 matching lines...) Expand 10 before | Expand all | Expand 10 after
3217 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 3223 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
3218 CSSPropertyB ackgroundClip }; 3224 CSSPropertyB ackgroundClip };
3219 3225
3220 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 3226 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
3221 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator)))); 3227 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)))); 3228 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator))));
3223 return list.release(); 3229 return list.release();
3224 } 3230 }
3225 3231
3226 } // namespace WebCore 3232 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/css/CSSGrammar.y » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698