| 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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 StyleSelfAlignmentData StyleBuilderConverter::convertSelfOrDefaultAlignmentData( | 502 StyleSelfAlignmentData StyleBuilderConverter::convertSelfOrDefaultAlignmentData( |
| 503 StyleResolverState&, | 503 StyleResolverState&, |
| 504 const CSSValue& value) { | 504 const CSSValue& value) { |
| 505 StyleSelfAlignmentData alignmentData = ComputedStyle::initialSelfAlignment(); | 505 StyleSelfAlignmentData alignmentData = ComputedStyle::initialSelfAlignment(); |
| 506 if (value.isValuePair()) { | 506 if (value.isValuePair()) { |
| 507 const CSSValuePair& pair = toCSSValuePair(value); | 507 const CSSValuePair& pair = toCSSValuePair(value); |
| 508 if (toCSSIdentifierValue(pair.first()).getValueID() == CSSValueLegacy) { | 508 if (toCSSIdentifierValue(pair.first()).getValueID() == CSSValueLegacy) { |
| 509 alignmentData.setPositionType(LegacyPosition); | 509 alignmentData.setPositionType(LegacyPosition); |
| 510 alignmentData.setPosition( | 510 alignmentData.setPosition( |
| 511 toCSSIdentifierValue(pair.second()).convertTo<ItemPosition>()); | 511 toCSSIdentifierValue(pair.second()).convertTo<ItemPosition>()); |
| 512 } else if (toCSSIdentifierValue(pair.first()).getValueID() == |
| 513 CSSValueFirst) { |
| 514 alignmentData.setPosition(ItemPositionBaseline); |
| 515 } else if (toCSSIdentifierValue(pair.first()).getValueID() == |
| 516 CSSValueLast) { |
| 517 alignmentData.setPosition(ItemPositionLastBaseline); |
| 512 } else { | 518 } else { |
| 513 alignmentData.setPosition( | 519 alignmentData.setPosition( |
| 514 toCSSIdentifierValue(pair.first()).convertTo<ItemPosition>()); | 520 toCSSIdentifierValue(pair.first()).convertTo<ItemPosition>()); |
| 515 alignmentData.setOverflow( | 521 alignmentData.setOverflow( |
| 516 toCSSIdentifierValue(pair.second()).convertTo<OverflowAlignment>()); | 522 toCSSIdentifierValue(pair.second()).convertTo<OverflowAlignment>()); |
| 517 } | 523 } |
| 518 } else { | 524 } else { |
| 519 alignmentData.setPosition( | 525 alignmentData.setPosition( |
| 520 toCSSIdentifierValue(value).convertTo<ItemPosition>()); | 526 toCSSIdentifierValue(value).convertTo<ItemPosition>()); |
| 521 } | 527 } |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1395 } | 1401 } |
| 1396 | 1402 |
| 1397 const CSSValue& StyleBuilderConverter::convertRegisteredPropertyValue( | 1403 const CSSValue& StyleBuilderConverter::convertRegisteredPropertyValue( |
| 1398 const StyleResolverState& state, | 1404 const StyleResolverState& state, |
| 1399 const CSSValue& value) { | 1405 const CSSValue& value) { |
| 1400 return computeRegisteredPropertyValue(state.cssToLengthConversionData(), | 1406 return computeRegisteredPropertyValue(state.cssToLengthConversionData(), |
| 1401 value); | 1407 value); |
| 1402 } | 1408 } |
| 1403 | 1409 |
| 1404 } // namespace blink | 1410 } // namespace blink |
| OLD | NEW |