| OLD | NEW |
| 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. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. |
| 4 * All rights reserved. | 4 * All rights reserved. |
| 5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
| 7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
| 8 * Copyright (C) 2015 Google Inc. All rights reserved. | 8 * Copyright (C) 2015 Google Inc. All rights reserved. |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 | 490 |
| 491 return CSSReflectValue::create( | 491 return CSSReflectValue::create( |
| 492 direction, offset, valueForNinePieceImage(reflection->mask(), style)); | 492 direction, offset, valueForNinePieceImage(reflection->mask(), style)); |
| 493 } | 493 } |
| 494 | 494 |
| 495 static CSSValueList* valueForItemPositionWithOverflowAlignment( | 495 static CSSValueList* valueForItemPositionWithOverflowAlignment( |
| 496 const StyleSelfAlignmentData& data) { | 496 const StyleSelfAlignmentData& data) { |
| 497 CSSValueList* result = CSSValueList::createSpaceSeparated(); | 497 CSSValueList* result = CSSValueList::createSpaceSeparated(); |
| 498 if (data.positionType() == LegacyPosition) | 498 if (data.positionType() == LegacyPosition) |
| 499 result->append(*CSSIdentifierValue::create(CSSValueLegacy)); | 499 result->append(*CSSIdentifierValue::create(CSSValueLegacy)); |
| 500 // To avoid needing to copy the RareNonInheritedData, we repurpose the 'auto' | 500 if (data.position() == ItemPositionAuto) { |
| 501 // flag to not just mean 'auto' prior to running the StyleAdjuster but also | 501 // To avoid needing to copy the RareNonInheritedData, we repurpose the |
| 502 // mean 'normal' after running it. | 502 // 'auto' flag to not just mean 'auto' prior to running the StyleAdjuster |
| 503 result->append(*CSSIdentifierValue::create( | 503 // but also mean 'normal' after running it. |
| 504 data.position() == ItemPositionAuto | 504 result->append(*CSSIdentifierValue::create( |
| 505 ? ComputedStyle::initialDefaultAlignment().position() | 505 ComputedStyle::initialDefaultAlignment().position())); |
| 506 : data.position())); | 506 } else if (data.position() == ItemPositionBaseline) { |
| 507 result->append( |
| 508 *CSSValuePair::create(CSSIdentifierValue::create(CSSValueBaseline), |
| 509 CSSIdentifierValue::create(CSSValueBaseline), |
| 510 CSSValuePair::DropIdenticalValues)); |
| 511 } else if (data.position() == ItemPositionLastBaseline) { |
| 512 result->append( |
| 513 *CSSValuePair::create(CSSIdentifierValue::create(CSSValueLast), |
| 514 CSSIdentifierValue::create(CSSValueBaseline), |
| 515 CSSValuePair::DropIdenticalValues)); |
| 516 } else { |
| 517 result->append(*CSSIdentifierValue::create(data.position())); |
| 518 } |
| 507 if (data.position() >= ItemPositionCenter && | 519 if (data.position() >= ItemPositionCenter && |
| 508 data.overflow() != OverflowAlignmentDefault) | 520 data.overflow() != OverflowAlignmentDefault) |
| 509 result->append(*CSSIdentifierValue::create(data.overflow())); | 521 result->append(*CSSIdentifierValue::create(data.overflow())); |
| 510 ASSERT(result->length() <= 2); | 522 ASSERT(result->length() <= 2); |
| 511 return result; | 523 return result; |
| 512 } | 524 } |
| 513 | 525 |
| 514 static CSSValueList* valuesForGridShorthand( | 526 static CSSValueList* valuesForGridShorthand( |
| 515 const StylePropertyShorthand& shorthand, | 527 const StylePropertyShorthand& shorthand, |
| 516 const ComputedStyle& style, | 528 const ComputedStyle& style, |
| (...skipping 3156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3673 case CSSPropertyAll: | 3685 case CSSPropertyAll: |
| 3674 return nullptr; | 3686 return nullptr; |
| 3675 default: | 3687 default: |
| 3676 break; | 3688 break; |
| 3677 } | 3689 } |
| 3678 ASSERT_NOT_REACHED(); | 3690 ASSERT_NOT_REACHED(); |
| 3679 return nullptr; | 3691 return nullptr; |
| 3680 } | 3692 } |
| 3681 | 3693 |
| 3682 } // namespace blink | 3694 } // namespace blink |
| OLD | NEW |