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/animation/PathPropertyFunctions.h" | |
| 6 | |
| 7 #include "core/style/ComputedStyle.h" | |
| 8 | |
| 9 namespace blink { | |
| 10 | |
| 11 StylePath* PathPropertyFunctions::getPath(CSSPropertyID property, | |
| 12 const ComputedStyle& style) { | |
| 13 switch (property) { | |
| 14 case CSSPropertyD: | |
| 15 return style.svgStyle().d(); | |
| 16 case CSSPropertyOffsetPath: | |
| 17 return style.offsetPath(); | |
| 18 default: | |
| 19 NOTREACHED(); | |
| 20 return nullptr; | |
| 21 } | |
| 22 } | |
| 23 | |
| 24 void PathPropertyFunctions::setPath(CSSPropertyID property, | |
| 25 ComputedStyle& style, | |
| 26 PassRefPtr<blink::StylePath> path) { | |
|
alancutter (OOO until 2018)
2017/02/27 04:15:17
PassRefPtr is deprecated, use std::move(RefPtr) in
Eric Willigers
2017/02/27 04:30:30
Done.
| |
| 27 switch (property) { | |
| 28 case CSSPropertyD: | |
| 29 style.setD(std::move(path)); | |
| 30 return; | |
| 31 case CSSPropertyOffsetPath: | |
| 32 style.setOffsetPath(std::move(path)); | |
| 33 return; | |
| 34 default: | |
| 35 NOTREACHED(); | |
| 36 return; | |
| 37 } | |
| 38 } | |
| 39 | |
| 40 } // namespace blink | |
| OLD | NEW |