| 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 std::sort(gridLineIndexes.begin(), gridLineIndexes.end()); | 514 std::sort(gridLineIndexes.begin(), gridLineIndexes.end()); |
| 515 } | 515 } |
| 516 } | 516 } |
| 517 | 517 |
| 518 void StyleBuilderConverter::createImplicitNamedGridLinesFromGridArea(const Named
GridAreaMap& namedGridAreas, NamedGridLinesMap& namedGridLines, GridTrackSizingD
irection direction) | 518 void StyleBuilderConverter::createImplicitNamedGridLinesFromGridArea(const Named
GridAreaMap& namedGridAreas, NamedGridLinesMap& namedGridLines, GridTrackSizingD
irection direction) |
| 519 { | 519 { |
| 520 for (const auto& namedGridAreaEntry : namedGridAreas) { | 520 for (const auto& namedGridAreaEntry : namedGridAreas) { |
| 521 GridSpan areaSpan = direction == ForRows ? namedGridAreaEntry.value.rows
: namedGridAreaEntry.value.columns; | 521 GridSpan areaSpan = direction == ForRows ? namedGridAreaEntry.value.rows
: namedGridAreaEntry.value.columns; |
| 522 { | 522 { |
| 523 NamedGridLinesMap::AddResult startResult = namedGridLines.add(namedG
ridAreaEntry.key + "-start", Vector<size_t>()); | 523 NamedGridLinesMap::AddResult startResult = namedGridLines.add(namedG
ridAreaEntry.key + "-start", Vector<size_t>()); |
| 524 startResult.storedValue->value.append(areaSpan.resolvedInitialPositi
on().toInt()); | 524 startResult.storedValue->value.append(areaSpan.resolvedInitialPositi
on()); |
| 525 std::sort(startResult.storedValue->value.begin(), startResult.stored
Value->value.end()); | 525 std::sort(startResult.storedValue->value.begin(), startResult.stored
Value->value.end()); |
| 526 } | 526 } |
| 527 { | 527 { |
| 528 NamedGridLinesMap::AddResult endResult = namedGridLines.add(namedGri
dAreaEntry.key + "-end", Vector<size_t>()); | 528 NamedGridLinesMap::AddResult endResult = namedGridLines.add(namedGri
dAreaEntry.key + "-end", Vector<size_t>()); |
| 529 endResult.storedValue->value.append(areaSpan.resolvedFinalPosition()
.toInt()); | 529 endResult.storedValue->value.append(areaSpan.resolvedFinalPosition()
); |
| 530 std::sort(endResult.storedValue->value.begin(), endResult.storedValu
e->value.end()); | 530 std::sort(endResult.storedValue->value.begin(), endResult.storedValu
e->value.end()); |
| 531 } | 531 } |
| 532 } | 532 } |
| 533 } | 533 } |
| 534 | 534 |
| 535 Length StyleBuilderConverter::convertLength(const StyleResolverState& state, con
st CSSValue& value) | 535 Length StyleBuilderConverter::convertLength(const StyleResolverState& state, con
st CSSValue& value) |
| 536 { | 536 { |
| 537 return toCSSPrimitiveValue(value).convertToLength(state.cssToLengthConversio
nData()); | 537 return toCSSPrimitiveValue(value).convertToLength(state.cssToLengthConversio
nData()); |
| 538 } | 538 } |
| 539 | 539 |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 947 return ScaleTransformOperation::create(sx, sy, sz, TransformOperation::Scale
3D); | 947 return ScaleTransformOperation::create(sx, sy, sz, TransformOperation::Scale
3D); |
| 948 } | 948 } |
| 949 | 949 |
| 950 RespectImageOrientationEnum StyleBuilderConverter::convertImageOrientation(Style
ResolverState& state, const CSSValue& value) | 950 RespectImageOrientationEnum StyleBuilderConverter::convertImageOrientation(Style
ResolverState& state, const CSSValue& value) |
| 951 { | 951 { |
| 952 const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(value); | 952 const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(value); |
| 953 return primitiveValue.getValueID() == CSSValueFromImage ? RespectImageOrient
ation : DoNotRespectImageOrientation; | 953 return primitiveValue.getValueID() == CSSValueFromImage ? RespectImageOrient
ation : DoNotRespectImageOrientation; |
| 954 } | 954 } |
| 955 | 955 |
| 956 } // namespace blink | 956 } // namespace blink |
| OLD | NEW |