Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Side by Side Diff: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 2736043002: Re-land Catch up the spec update in CSS Rhythmic Sizing (Closed)
Patch Set: Fix core/BUILD.gn Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2523 matching lines...) Expand 10 before | Expand all | Expand 10 after
2534 case CSSPropertyWebkitLineClamp: 2534 case CSSPropertyWebkitLineClamp:
2535 if (style.lineClamp().isNone()) 2535 if (style.lineClamp().isNone())
2536 return CSSIdentifierValue::create(CSSValueNone); 2536 return CSSIdentifierValue::create(CSSValueNone);
2537 return CSSPrimitiveValue::create( 2537 return CSSPrimitiveValue::create(
2538 style.lineClamp().value(), 2538 style.lineClamp().value(),
2539 style.lineClamp().isPercentage() 2539 style.lineClamp().isPercentage()
2540 ? CSSPrimitiveValue::UnitType::Percentage 2540 ? CSSPrimitiveValue::UnitType::Percentage
2541 : CSSPrimitiveValue::UnitType::Number); 2541 : CSSPrimitiveValue::UnitType::Number);
2542 case CSSPropertyLineHeight: 2542 case CSSPropertyLineHeight:
2543 return valueForLineHeight(style); 2543 return valueForLineHeight(style);
2544 case CSSPropertyLineHeightStep:
2545 return zoomAdjustedPixelValue(style.lineHeightStep(), style);
2544 case CSSPropertyListStyleImage: 2546 case CSSPropertyListStyleImage:
2545 if (style.listStyleImage()) 2547 if (style.listStyleImage())
2546 return style.listStyleImage()->computedCSSValue(); 2548 return style.listStyleImage()->computedCSSValue();
2547 return CSSIdentifierValue::create(CSSValueNone); 2549 return CSSIdentifierValue::create(CSSValueNone);
2548 case CSSPropertyListStylePosition: 2550 case CSSPropertyListStylePosition:
2549 return CSSIdentifierValue::create(style.listStylePosition()); 2551 return CSSIdentifierValue::create(style.listStylePosition());
2550 case CSSPropertyListStyleType: 2552 case CSSPropertyListStyleType:
2551 return CSSIdentifierValue::create(style.listStyleType()); 2553 return CSSIdentifierValue::create(style.listStyleType());
2552 case CSSPropertyWebkitLocale: 2554 case CSSPropertyWebkitLocale:
2553 if (style.locale().isNull()) 2555 if (style.locale().isNull())
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
3647 list->append(*CSSIdentifierValue::create(CSSValueStyle)); 3649 list->append(*CSSIdentifierValue::create(CSSValueStyle));
3648 if (style.contain() & ContainsLayout) 3650 if (style.contain() & ContainsLayout)
3649 list->append(*CSSIdentifierValue::create(CSSValueLayout)); 3651 list->append(*CSSIdentifierValue::create(CSSValueLayout));
3650 if (style.containsPaint()) 3652 if (style.containsPaint())
3651 list->append(*CSSIdentifierValue::create(CSSValuePaint)); 3653 list->append(*CSSIdentifierValue::create(CSSValuePaint));
3652 if (style.containsSize()) 3654 if (style.containsSize())
3653 list->append(*CSSIdentifierValue::create(CSSValueSize)); 3655 list->append(*CSSIdentifierValue::create(CSSValueSize));
3654 ASSERT(list->length()); 3656 ASSERT(list->length());
3655 return list; 3657 return list;
3656 } 3658 }
3657 case CSSPropertySnapHeight: {
3658 if (!style.snapHeightUnit())
3659 return CSSPrimitiveValue::create(0,
3660 CSSPrimitiveValue::UnitType::Pixels);
3661 CSSValueList* list = CSSValueList::createSpaceSeparated();
3662 list->append(*CSSPrimitiveValue::create(
3663 style.snapHeightUnit(), CSSPrimitiveValue::UnitType::Pixels));
3664 if (style.snapHeightPosition())
3665 list->append(*CSSPrimitiveValue::create(
3666 style.snapHeightPosition(), CSSPrimitiveValue::UnitType::Integer));
3667 return list;
3668 }
3669 case CSSPropertyVariable: 3659 case CSSPropertyVariable:
3670 // Variables are retrieved via get(AtomicString). 3660 // Variables are retrieved via get(AtomicString).
3671 ASSERT_NOT_REACHED(); 3661 ASSERT_NOT_REACHED();
3672 return nullptr; 3662 return nullptr;
3673 case CSSPropertyAll: 3663 case CSSPropertyAll:
3674 return nullptr; 3664 return nullptr;
3675 default: 3665 default:
3676 break; 3666 break;
3677 } 3667 }
3678 ASSERT_NOT_REACHED(); 3668 ASSERT_NOT_REACHED();
3679 return nullptr; 3669 return nullptr;
3680 } 3670 }
3681 3671
3682 } // namespace blink 3672 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698