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 2514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2525 case CSSPropertyWebkitLineClamp: | 2525 case CSSPropertyWebkitLineClamp: |
2526 if (style.lineClamp().isNone()) | 2526 if (style.lineClamp().isNone()) |
2527 return CSSIdentifierValue::create(CSSValueNone); | 2527 return CSSIdentifierValue::create(CSSValueNone); |
2528 return CSSPrimitiveValue::create( | 2528 return CSSPrimitiveValue::create( |
2529 style.lineClamp().value(), | 2529 style.lineClamp().value(), |
2530 style.lineClamp().isPercentage() | 2530 style.lineClamp().isPercentage() |
2531 ? CSSPrimitiveValue::UnitType::Percentage | 2531 ? CSSPrimitiveValue::UnitType::Percentage |
2532 : CSSPrimitiveValue::UnitType::Number); | 2532 : CSSPrimitiveValue::UnitType::Number); |
2533 case CSSPropertyLineHeight: | 2533 case CSSPropertyLineHeight: |
2534 return valueForLineHeight(style); | 2534 return valueForLineHeight(style); |
| 2535 case CSSPropertyLineHeightStep: |
| 2536 return zoomAdjustedPixelValue(style.lineHeightStep(), style); |
2535 case CSSPropertyListStyleImage: | 2537 case CSSPropertyListStyleImage: |
2536 if (style.listStyleImage()) | 2538 if (style.listStyleImage()) |
2537 return style.listStyleImage()->computedCSSValue(); | 2539 return style.listStyleImage()->computedCSSValue(); |
2538 return CSSIdentifierValue::create(CSSValueNone); | 2540 return CSSIdentifierValue::create(CSSValueNone); |
2539 case CSSPropertyListStylePosition: | 2541 case CSSPropertyListStylePosition: |
2540 return CSSIdentifierValue::create(style.listStylePosition()); | 2542 return CSSIdentifierValue::create(style.listStylePosition()); |
2541 case CSSPropertyListStyleType: | 2543 case CSSPropertyListStyleType: |
2542 return CSSIdentifierValue::create(style.listStyleType()); | 2544 return CSSIdentifierValue::create(style.listStyleType()); |
2543 case CSSPropertyWebkitLocale: | 2545 case CSSPropertyWebkitLocale: |
2544 if (style.locale().isNull()) | 2546 if (style.locale().isNull()) |
(...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3639 list->append(*CSSIdentifierValue::create(CSSValueStyle)); | 3641 list->append(*CSSIdentifierValue::create(CSSValueStyle)); |
3640 if (style.contain() & ContainsLayout) | 3642 if (style.contain() & ContainsLayout) |
3641 list->append(*CSSIdentifierValue::create(CSSValueLayout)); | 3643 list->append(*CSSIdentifierValue::create(CSSValueLayout)); |
3642 if (style.containsPaint()) | 3644 if (style.containsPaint()) |
3643 list->append(*CSSIdentifierValue::create(CSSValuePaint)); | 3645 list->append(*CSSIdentifierValue::create(CSSValuePaint)); |
3644 if (style.containsSize()) | 3646 if (style.containsSize()) |
3645 list->append(*CSSIdentifierValue::create(CSSValueSize)); | 3647 list->append(*CSSIdentifierValue::create(CSSValueSize)); |
3646 ASSERT(list->length()); | 3648 ASSERT(list->length()); |
3647 return list; | 3649 return list; |
3648 } | 3650 } |
3649 case CSSPropertySnapHeight: { | |
3650 if (!style.snapHeightUnit()) | |
3651 return CSSPrimitiveValue::create(0, | |
3652 CSSPrimitiveValue::UnitType::Pixels); | |
3653 CSSValueList* list = CSSValueList::createSpaceSeparated(); | |
3654 list->append(*CSSPrimitiveValue::create( | |
3655 style.snapHeightUnit(), CSSPrimitiveValue::UnitType::Pixels)); | |
3656 if (style.snapHeightPosition()) | |
3657 list->append(*CSSPrimitiveValue::create( | |
3658 style.snapHeightPosition(), CSSPrimitiveValue::UnitType::Integer)); | |
3659 return list; | |
3660 } | |
3661 case CSSPropertyVariable: | 3651 case CSSPropertyVariable: |
3662 // Variables are retrieved via get(AtomicString). | 3652 // Variables are retrieved via get(AtomicString). |
3663 ASSERT_NOT_REACHED(); | 3653 ASSERT_NOT_REACHED(); |
3664 return nullptr; | 3654 return nullptr; |
3665 case CSSPropertyAll: | 3655 case CSSPropertyAll: |
3666 return nullptr; | 3656 return nullptr; |
3667 default: | 3657 default: |
3668 break; | 3658 break; |
3669 } | 3659 } |
3670 ASSERT_NOT_REACHED(); | 3660 ASSERT_NOT_REACHED(); |
3671 return nullptr; | 3661 return nullptr; |
3672 } | 3662 } |
3673 | 3663 |
3674 } // namespace blink | 3664 } // namespace blink |
OLD | NEW |