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); | |
2537 case CSSPropertyListStyleImage: | 2535 case CSSPropertyListStyleImage: |
2538 if (style.listStyleImage()) | 2536 if (style.listStyleImage()) |
2539 return style.listStyleImage()->computedCSSValue(); | 2537 return style.listStyleImage()->computedCSSValue(); |
2540 return CSSIdentifierValue::create(CSSValueNone); | 2538 return CSSIdentifierValue::create(CSSValueNone); |
2541 case CSSPropertyListStylePosition: | 2539 case CSSPropertyListStylePosition: |
2542 return CSSIdentifierValue::create(style.listStylePosition()); | 2540 return CSSIdentifierValue::create(style.listStylePosition()); |
2543 case CSSPropertyListStyleType: | 2541 case CSSPropertyListStyleType: |
2544 return CSSIdentifierValue::create(style.listStyleType()); | 2542 return CSSIdentifierValue::create(style.listStyleType()); |
2545 case CSSPropertyWebkitLocale: | 2543 case CSSPropertyWebkitLocale: |
2546 if (style.locale().isNull()) | 2544 if (style.locale().isNull()) |
(...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3641 list->append(*CSSIdentifierValue::create(CSSValueStyle)); | 3639 list->append(*CSSIdentifierValue::create(CSSValueStyle)); |
3642 if (style.contain() & ContainsLayout) | 3640 if (style.contain() & ContainsLayout) |
3643 list->append(*CSSIdentifierValue::create(CSSValueLayout)); | 3641 list->append(*CSSIdentifierValue::create(CSSValueLayout)); |
3644 if (style.containsPaint()) | 3642 if (style.containsPaint()) |
3645 list->append(*CSSIdentifierValue::create(CSSValuePaint)); | 3643 list->append(*CSSIdentifierValue::create(CSSValuePaint)); |
3646 if (style.containsSize()) | 3644 if (style.containsSize()) |
3647 list->append(*CSSIdentifierValue::create(CSSValueSize)); | 3645 list->append(*CSSIdentifierValue::create(CSSValueSize)); |
3648 ASSERT(list->length()); | 3646 ASSERT(list->length()); |
3649 return list; | 3647 return list; |
3650 } | 3648 } |
| 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 } |
3651 case CSSPropertyVariable: | 3661 case CSSPropertyVariable: |
3652 // Variables are retrieved via get(AtomicString). | 3662 // Variables are retrieved via get(AtomicString). |
3653 ASSERT_NOT_REACHED(); | 3663 ASSERT_NOT_REACHED(); |
3654 return nullptr; | 3664 return nullptr; |
3655 case CSSPropertyAll: | 3665 case CSSPropertyAll: |
3656 return nullptr; | 3666 return nullptr; |
3657 default: | 3667 default: |
3658 break; | 3668 break; |
3659 } | 3669 } |
3660 ASSERT_NOT_REACHED(); | 3670 ASSERT_NOT_REACHED(); |
3661 return nullptr; | 3671 return nullptr; |
3662 } | 3672 } |
3663 | 3673 |
3664 } // namespace blink | 3674 } // namespace blink |
OLD | NEW |