| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * * Redistributions of source code must retain the above copyright | 4 * * Redistributions of source code must retain the above copyright |
| 5 * notice, this list of conditions and the following disclaimer. | 5 * notice, this list of conditions and the following disclaimer. |
| 6 * * Redistributions in binary form must reproduce the above | 6 * * Redistributions in binary form must reproduce the above |
| 7 * copyright notice, this list of conditions and the following disclaimer | 7 * copyright notice, this list of conditions and the following disclaimer |
| 8 * in the documentation and/or other materials provided with the | 8 * in the documentation and/or other materials provided with the |
| 9 * distribution. | 9 * distribution. |
| 10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 | 548 |
| 549 for (auto& namedGridLineValue : toCSSValueList(value)) { | 549 for (auto& namedGridLineValue : toCSSValueList(value)) { |
| 550 String namedGridLine = toCSSCustomIdentValue(*namedGridLineValue).value(
); | 550 String namedGridLine = toCSSCustomIdentValue(*namedGridLineValue).value(
); |
| 551 NamedGridLinesMap::AddResult result = namedGridLines.add(namedGridLine,
Vector<size_t>()); | 551 NamedGridLinesMap::AddResult result = namedGridLines.add(namedGridLine,
Vector<size_t>()); |
| 552 result.storedValue->value.append(currentNamedGridLine); | 552 result.storedValue->value.append(currentNamedGridLine); |
| 553 OrderedNamedGridLines::AddResult orderedInsertionResult = orderedNamedGr
idLines.add(currentNamedGridLine, Vector<String>()); | 553 OrderedNamedGridLines::AddResult orderedInsertionResult = orderedNamedGr
idLines.add(currentNamedGridLine, Vector<String>()); |
| 554 orderedInsertionResult.storedValue->value.append(namedGridLine); | 554 orderedInsertionResult.storedValue->value.append(namedGridLine); |
| 555 } | 555 } |
| 556 } | 556 } |
| 557 | 557 |
| 558 Vector<GridTrackSize> StyleBuilderConverter::convertGridTrackSizeList(StyleResol
verState& state, const CSSValue& value) |
| 559 { |
| 560 DCHECK(value.isValueList()); |
| 561 Vector<GridTrackSize> trackSizes; |
| 562 for (auto& currValue : toCSSValueList(value)) { |
| 563 DCHECK(!currValue->isGridLineNamesValue()); |
| 564 DCHECK(!currValue->isGridAutoRepeatValue()); |
| 565 trackSizes.append(convertGridTrackSize(state, *currValue)); |
| 566 } |
| 567 return trackSizes; |
| 568 } |
| 569 |
| 558 void StyleBuilderConverter::convertGridTrackList(const CSSValue& value, Vector<G
ridTrackSize>& trackSizes, NamedGridLinesMap& namedGridLines, OrderedNamedGridLi
nes& orderedNamedGridLines, Vector<GridTrackSize>& autoRepeatTrackSizes, NamedGr
idLinesMap& autoRepeatNamedGridLines, OrderedNamedGridLines& autoRepeatOrderedNa
medGridLines, size_t& autoRepeatInsertionPoint, AutoRepeatType &autoRepeatType,
StyleResolverState& state) | 570 void StyleBuilderConverter::convertGridTrackList(const CSSValue& value, Vector<G
ridTrackSize>& trackSizes, NamedGridLinesMap& namedGridLines, OrderedNamedGridLi
nes& orderedNamedGridLines, Vector<GridTrackSize>& autoRepeatTrackSizes, NamedGr
idLinesMap& autoRepeatNamedGridLines, OrderedNamedGridLines& autoRepeatOrderedNa
medGridLines, size_t& autoRepeatInsertionPoint, AutoRepeatType &autoRepeatType,
StyleResolverState& state) |
| 559 { | 571 { |
| 560 if (value.isPrimitiveValue()) { | 572 if (value.isPrimitiveValue()) { |
| 561 ASSERT(toCSSPrimitiveValue(value).getValueID() == CSSValueNone); | 573 ASSERT(toCSSPrimitiveValue(value).getValueID() == CSSValueNone); |
| 562 return; | 574 return; |
| 563 } | 575 } |
| 564 | 576 |
| 565 size_t currentNamedGridLine = 0; | 577 size_t currentNamedGridLine = 0; |
| 566 for (auto currValue : toCSSValueList(value)) { | 578 for (auto currValue : toCSSValueList(value)) { |
| 567 if (currValue->isGridLineNamesValue()) { | 579 if (currValue->isGridLineNamesValue()) { |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 | 1086 |
| 1075 PassRefPtr<StylePath> StyleBuilderConverter::convertPathOrNone(StyleResolverStat
e& state, const CSSValue& value) | 1087 PassRefPtr<StylePath> StyleBuilderConverter::convertPathOrNone(StyleResolverStat
e& state, const CSSValue& value) |
| 1076 { | 1088 { |
| 1077 if (value.isPathValue()) | 1089 if (value.isPathValue()) |
| 1078 return toCSSPathValue(value).stylePath(); | 1090 return toCSSPathValue(value).stylePath(); |
| 1079 ASSERT(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() =
= CSSValueNone); | 1091 ASSERT(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() =
= CSSValueNone); |
| 1080 return nullptr; | 1092 return nullptr; |
| 1081 } | 1093 } |
| 1082 | 1094 |
| 1083 } // namespace blink | 1095 } // namespace blink |
| OLD | NEW |