| // Copyright 2017 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| #include "core/css/properties/longhands/GridRowGap.h" |
| |
| #include "core/css/parser/CSSParserContext.h" |
| #include "core/css/parser/CSSPropertyParserHelpers.h" |
| #include "core/css/properties/ComputedStyleUtils.h" |
| #include "platform/Length.h" |
| |
| namespace blink { |
| namespace CSSLonghand { |
| |
| const CSSValue* GridRowGap::ParseSingleValue( |
| CSSParserTokenRange& range, |
| const CSSParserContext& context, |
| const CSSParserLocalContext&) const { |
| return CSSPropertyParserHelpers::ConsumeLengthOrPercent( |
| range, context.Mode(), kValueRangeNonNegative); |
| } |
| |
| const CSSValue* GridRowGap::CSSValueFromComputedStyleInternal( |
| const ComputedStyle& style, |
| const SVGComputedStyle&, |
| const LayoutObject*, |
| Node*, |
| bool allow_visited_style) const { |
| return ComputedStyleUtils::ZoomAdjustedPixelValueForLength(style.GridRowGap(), |
| style); |
| } |
| |
| } // namespace CSSLonghand |
| } // namespace blink |