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

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

Issue 1545713003: Add StylePath and use it to store 'd' in ComputedStyle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore CSSPathValue::equals. Created 4 years, 11 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 #ifndef CSSPathValue_h 5 #ifndef CSSPathValue_h
6 #define CSSPathValue_h 6 #define CSSPathValue_h
7 7
8 #include "core/css/CSSValue.h" 8 #include "core/css/CSSValue.h"
9 #include "core/svg/SVGPathByteStream.h" 9 #include "core/svg/SVGPathByteStream.h"
10 #include "platform/graphics/Path.h"
11 #include "wtf/PassRefPtr.h" 10 #include "wtf/PassRefPtr.h"
12 #include "wtf/RefPtr.h" 11 #include "wtf/RefPtr.h"
13 12
14 namespace blink { 13 namespace blink {
15 14
15 class StylePath;
16
16 class CSSPathValue : public CSSValue { 17 class CSSPathValue : public CSSValue {
17 public: 18 public:
18 static PassRefPtrWillBeRawPtr<CSSPathValue> create(PassOwnPtr<SVGPathByteStr eam> pathByteStream) 19 static PassRefPtrWillBeRawPtr<CSSPathValue> create(PassRefPtr<SVGPathByteStr eam>, StylePath* = nullptr);
19 {
20 return adoptRefWillBeNoop(new CSSPathValue(pathByteStream));
21 }
22
23 static PassRefPtrWillBeRawPtr<CSSPathValue> create(const String&); 20 static PassRefPtrWillBeRawPtr<CSSPathValue> create(const String&);
21 ~CSSPathValue();
24 22
25 static CSSPathValue* emptyPathValue(); 23 static CSSPathValue* emptyPathValue();
26 24
25 StylePath* cachedPath();
27 String customCSSText() const; 26 String customCSSText() const;
28 27
29 bool equals(const CSSPathValue&) const; 28 bool equals(const CSSPathValue&) const;
30 29
31 DECLARE_TRACE_AFTER_DISPATCH(); 30 DECLARE_TRACE_AFTER_DISPATCH();
32 31
33 const SVGPathByteStream& byteStream() const { return *m_pathByteStream; } 32 const SVGPathByteStream& byteStream() const { return *m_pathByteStream; }
34 String pathString() const; 33 String pathString() const;
35 const Path& path() const { return m_path; }
36 34
37 private: 35 private:
38 CSSPathValue(PassOwnPtr<SVGPathByteStream>); 36 explicit CSSPathValue(PassRefPtr<SVGPathByteStream>, StylePath*);
Eric Willigers 2016/01/08 11:58:58 No need for explicit as we have more than one argu
fs 2016/01/08 12:14:27 Removed.
39 37
40 OwnPtr<SVGPathByteStream> m_pathByteStream; 38 RefPtr<SVGPathByteStream> m_pathByteStream;
41 Path m_path; 39 RefPtr<StylePath> m_cachedPath;
42 }; 40 };
43 41
44 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPathValue, isPathValue()); 42 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPathValue, isPathValue());
45 43
46 } // namespace blink 44 } // namespace blink
47 45
48 #endif // CSSPathValue_h 46 #endif // CSSPathValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698