| // 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 "third_party/blink/renderer/core/css/properties/longhands/d.h" |
| |
| #include "third_party/blink/renderer/core/css/properties/css_parsing_utils.h" |
| #include "third_party/blink/renderer/core/style/computed_style.h" |
| |
| namespace blink { |
| namespace css_longhand { |
| |
| const CSSValue* D::ParseSingleValue(CSSParserTokenRange& range, |
| const CSSParserContext&, |
| const CSSParserLocalContext&) const { |
| return css_parsing_utils::ConsumePathOrNone(range); |
| } |
| |
| const CSSValue* D::CSSValueFromComputedStyleInternal( |
| const ComputedStyle& style, |
| const SVGComputedStyle& svg_style, |
| const LayoutObject*, |
| Node* styled_node, |
| bool allow_visited_style) const { |
| if (const StylePath* style_path = svg_style.D()) |
| return style_path->ComputedCSSValue(); |
| return CSSIdentifierValue::Create(CSSValueID::kNone); |
| } |
| |
| } // namespace css_longhand |
| } // namespace blink |