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

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

Issue 1649003002: Use StylePath instead of (Path)StyleMotionPath (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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/CSSPathValue.h" 5 #include "core/css/CSSPathValue.h"
6 6
7 #include "core/style/StylePath.h" 7 #include "core/style/StylePath.h"
8 #include "core/svg/SVGPathUtilities.h" 8 #include "core/svg/SVGPathUtilities.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 } // namespace 47 } // namespace
48 48
49 CSSPathValue* CSSPathValue::emptyPathValue() 49 CSSPathValue* CSSPathValue::emptyPathValue()
50 { 50 {
51 DEFINE_STATIC_LOCAL(RefPtrWillBePersistent<CSSPathValue>, empty, (createPath Value())); 51 DEFINE_STATIC_LOCAL(RefPtrWillBePersistent<CSSPathValue>, empty, (createPath Value()));
52 return empty.get(); 52 return empty.get();
53 } 53 }
54 54
55 StylePath* CSSPathValue::cachedPath() 55 StylePath* CSSPathValue::cachedPath() const
56 { 56 {
57 if (!m_cachedPath) 57 if (!m_cachedPath)
58 m_cachedPath = StylePath::create(m_pathByteStream); 58 m_cachedPath = StylePath::create(m_pathByteStream);
59 return m_cachedPath.get(); 59 return m_cachedPath.get();
60 } 60 }
61 61
62 String CSSPathValue::customCSSText() const 62 String CSSPathValue::customCSSText() const
63 { 63 {
64 return "path('" + pathString() + "')"; 64 return "path('" + pathString() + "')";
65 } 65 }
66 66
67 bool CSSPathValue::equals(const CSSPathValue& other) const 67 bool CSSPathValue::equals(const CSSPathValue& other) const
68 { 68 {
69 return *m_pathByteStream == *other.m_pathByteStream; 69 return *m_pathByteStream == *other.m_pathByteStream;
70 } 70 }
71 71
72 DEFINE_TRACE_AFTER_DISPATCH(CSSPathValue) 72 DEFINE_TRACE_AFTER_DISPATCH(CSSPathValue)
73 { 73 {
74 CSSValue::traceAfterDispatch(visitor); 74 CSSValue::traceAfterDispatch(visitor);
75 } 75 }
76 76
77 String CSSPathValue::pathString() const 77 String CSSPathValue::pathString() const
78 { 78 {
79 return buildStringFromByteStream(*m_pathByteStream); 79 return buildStringFromByteStream(*m_pathByteStream);
80 } 80 }
81 81
82 } // namespace blink 82 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPathValue.h ('k') | third_party/WebKit/Source/core/css/CSSProperties.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698