Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "core/css/properties/CSSPropertyAPIGridGap.h" | |
| 6 | |
| 7 namespace blink { | |
| 8 | |
| 9 class CSSParserContext; | |
| 10 class CSSParserLocalContext; | |
| 11 class CSSParserTokenRange; | |
| 12 class CSSValue; | |
| 13 | |
| 14 const CSSValue* CSSPropertyAPIGridGap::parseSingleValue( | |
|
Jia
2017/06/08 22:07:14
This is a shorthand, it should impl parseShorthand
| |
| 15 CSSParserTokenRange& range, | |
| 16 const CSSParserContext& context, | |
| 17 const CSSParserLocalContext&) { | |
| 18 DCHECK(RuntimeEnabledFeatures::CSSGridLayoutEnabled()); | |
| 19 DCHECK_EQ(shorthandForProperty(CSSPropertyGridGap).length(), 2u); | |
| 20 CSSValue* row_gap = ConsumeLengthOrPercent(range, context->Mode(), | |
| 21 kValueRangeNonNegative); | |
| 22 CSSValue* column_gap = ConsumeLengthOrPercent(range, context->Mode(), | |
| 23 kValueRangeNonNegative); | |
| 24 if (!row_gap || !range.AtEnd()) | |
| 25 return false; | |
| 26 if (!column_gap) | |
| 27 column_gap = row_gap; | |
| 28 AddParsedProperty(CSSPropertyGridRowGap, CSSPropertyGridGap, *row_gap, | |
| 29 important); | |
|
Jia
2017/06/08 22:07:14
AddParsedProperty is a wrapper function private to
Bugs Nash
2017/06/09 00:00:17
no this code certainly doesn't compile! as I menti
Jia
2017/06/09 00:10:07
Ok, so I don't need to lgtm for now. Thanks for th
| |
| 30 AddParsedProperty(CSSPropertyGridColumnGap, CSSPropertyGridGap, | |
| 31 *column_gap, important); | |
| 32 return true; | |
| 33 } | |
| 34 } | |
| 35 | |
| 36 } // namespace blink | |
| OLD | NEW |