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

Side by Side Diff: Source/core/css/resolver/StyleBuilderCustom.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/css/CSSValue.cpp ('k') | no next file » | 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "CSSPropertyNames.h" 42 #include "CSSPropertyNames.h"
43 #include "CSSValueKeywords.h" 43 #include "CSSValueKeywords.h"
44 #include "StyleBuilderFunctions.h" 44 #include "StyleBuilderFunctions.h"
45 #include "StylePropertyShorthand.h" 45 #include "StylePropertyShorthand.h"
46 #include "core/css/BasicShapeFunctions.h" 46 #include "core/css/BasicShapeFunctions.h"
47 #include "core/css/CSSAspectRatioValue.h" 47 #include "core/css/CSSAspectRatioValue.h"
48 #include "core/css/CSSCursorImageValue.h" 48 #include "core/css/CSSCursorImageValue.h"
49 #include "core/css/CSSFontValue.h" 49 #include "core/css/CSSFontValue.h"
50 #include "core/css/CSSFunctionValue.h" 50 #include "core/css/CSSFunctionValue.h"
51 #include "core/css/CSSGradientValue.h" 51 #include "core/css/CSSGradientValue.h"
52 #include "core/css/CSSGridLineNamesValue.h"
52 #include "core/css/CSSGridTemplateValue.h" 53 #include "core/css/CSSGridTemplateValue.h"
53 #include "core/css/CSSImageSetValue.h" 54 #include "core/css/CSSImageSetValue.h"
54 #include "core/css/CSSLineBoxContainValue.h" 55 #include "core/css/CSSLineBoxContainValue.h"
55 #include "core/css/CSSParser.h" 56 #include "core/css/CSSParser.h"
56 #include "core/css/CSSPrimitiveValueMappings.h" 57 #include "core/css/CSSPrimitiveValueMappings.h"
57 #include "core/css/CSSProperty.h" 58 #include "core/css/CSSProperty.h"
58 #include "core/css/CSSReflectValue.h" 59 #include "core/css/CSSReflectValue.h"
59 #include "core/css/CSSShadowValue.h" 60 #include "core/css/CSSShadowValue.h"
60 #include "core/css/CSSVariableValue.h" 61 #include "core/css/CSSVariableValue.h"
61 #include "core/css/Counter.h" 62 #include "core/css/Counter.h"
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 1047 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
1047 return primitiveValue->getValueID() == CSSValueNone; 1048 return primitiveValue->getValueID() == CSSValueNone;
1048 } 1049 }
1049 1050
1050 if (!value->isValueList()) 1051 if (!value->isValueList())
1051 return false; 1052 return false;
1052 1053
1053 size_t currentNamedGridLine = 0; 1054 size_t currentNamedGridLine = 0;
1054 for (CSSValueListIterator i = value; i.hasMore(); i.advance()) { 1055 for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
1055 CSSValue* currValue = i.value(); 1056 CSSValue* currValue = i.value();
1056 if (currValue->isPrimitiveValue()) { 1057 if (currValue->isGridLineNamesValue()) {
1057 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(currValue); 1058 CSSGridLineNamesValue* lineNamesValue = toCSSGridLineNamesValue(curr Value);
1058 if (primitiveValue->isString()) { 1059 for (CSSValueListIterator j = lineNamesValue; j.hasMore(); j.advance ()) {
1059 String namedGridLine = primitiveValue->getStringValue(); 1060 String namedGridLine = toCSSPrimitiveValue(j.value())->getString Value();
1060 NamedGridLinesMap::AddResult result = namedGridLines.add(namedGr idLine, Vector<size_t>()); 1061 NamedGridLinesMap::AddResult result = namedGridLines.add(namedGr idLine, Vector<size_t>());
1061 result.iterator->value.append(currentNamedGridLine); 1062 result.iterator->value.append(currentNamedGridLine);
1062 OrderedNamedGridLines::AddResult orderedInsertionResult = ordere dNamedGridLines.add(currentNamedGridLine, Vector<String>()); 1063 OrderedNamedGridLines::AddResult orderedInsertionResult = ordere dNamedGridLines.add(currentNamedGridLine, Vector<String>());
1063 orderedInsertionResult.iterator->value.append(namedGridLine); 1064 orderedInsertionResult.iterator->value.append(namedGridLine);
1064 continue;
1065 } 1065 }
1066 continue;
1066 } 1067 }
1067 1068
1068 ++currentNamedGridLine; 1069 ++currentNamedGridLine;
1069 GridTrackSize trackSize; 1070 GridTrackSize trackSize;
1070 if (!createGridTrackSize(currValue, trackSize, state)) 1071 if (!createGridTrackSize(currValue, trackSize, state))
1071 return false; 1072 return false;
1072 1073
1073 trackSizes.append(trackSize); 1074 trackSizes.append(trackSize);
1074 } 1075 }
1075 1076
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after
2306 break; 2307 break;
2307 } 2308 }
2308 case CSSPropertyEnableBackground: 2309 case CSSPropertyEnableBackground:
2309 // Silently ignoring this property for now 2310 // Silently ignoring this property for now
2310 // http://bugs.webkit.org/show_bug.cgi?id=6022 2311 // http://bugs.webkit.org/show_bug.cgi?id=6022
2311 break; 2312 break;
2312 } 2313 }
2313 } 2314 }
2314 2315
2315 } // namespace WebCore 2316 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/CSSValue.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698