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

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

Issue 1696373003: Add CSS parser support for the snap-height property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
7 * Copyright (C) 2015 Google Inc. All rights reserved. 7 * Copyright (C) 2015 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public 10 * modify it under the terms of the GNU Lesser General Public
(...skipping 2679 matching lines...) Expand 10 before | Expand all | Expand 10 after
2690 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat ed(); 2690 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat ed();
2691 if (style.containsStyle()) 2691 if (style.containsStyle())
2692 list->append(cssValuePool().createIdentifierValue(CSSValueStyle)); 2692 list->append(cssValuePool().createIdentifierValue(CSSValueStyle));
2693 if (style.contain() & ContainsLayout) 2693 if (style.contain() & ContainsLayout)
2694 list->append(cssValuePool().createIdentifierValue(CSSValueLayout)); 2694 list->append(cssValuePool().createIdentifierValue(CSSValueLayout));
2695 if (style.containsPaint()) 2695 if (style.containsPaint())
2696 list->append(cssValuePool().createIdentifierValue(CSSValuePaint)); 2696 list->append(cssValuePool().createIdentifierValue(CSSValuePaint));
2697 ASSERT(list->length()); 2697 ASSERT(list->length());
2698 return list.release(); 2698 return list.release();
2699 } 2699 }
2700 case CSSPropertySnapHeight: {
2701 if (!style.snapHeightUnit())
2702 return cssValuePool().createValue(0, CSSPrimitiveValue::UnitType::Pi xels);
2703 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat ed();
2704 list->append(cssValuePool().createValue(style.snapHeightUnit(), CSSPrimi tiveValue::UnitType::Pixels));
2705 if (style.snapHeightPosition())
2706 list->append(cssValuePool().createValue(style.snapHeightPosition(), CSSPrimitiveValue::UnitType::Integer));
2707 return list.release();
2708 }
2700 case CSSPropertyVariable: 2709 case CSSPropertyVariable:
2701 // Variables are retrieved via get(AtomicString). 2710 // Variables are retrieved via get(AtomicString).
2702 ASSERT_NOT_REACHED(); 2711 ASSERT_NOT_REACHED();
2703 return nullptr; 2712 return nullptr;
2704 case CSSPropertyAll: 2713 case CSSPropertyAll:
2705 return nullptr; 2714 return nullptr;
2706 default: 2715 default:
2707 break; 2716 break;
2708 } 2717 }
2709 ASSERT_NOT_REACHED(); 2718 ASSERT_NOT_REACHED();
2710 return nullptr; 2719 return nullptr;
2711 } 2720 }
2712 2721
2713 } // namespace blink 2722 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSProperties.in ('k') | third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698