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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/CSSPathValue.h
diff --git a/third_party/WebKit/Source/core/css/CSSPathValue.h b/third_party/WebKit/Source/core/css/CSSPathValue.h
index 21d6a361415c4d347cea150a9b83bdd56e04739e..e2fa6994c201416f2db14a0cc2902d3281eb65b8 100644
--- a/third_party/WebKit/Source/core/css/CSSPathValue.h
+++ b/third_party/WebKit/Source/core/css/CSSPathValue.h
@@ -7,23 +7,22 @@
#include "core/css/CSSValue.h"
#include "core/svg/SVGPathByteStream.h"
-#include "platform/graphics/Path.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
namespace blink {
+class StylePath;
+
class CSSPathValue : public CSSValue {
public:
- static PassRefPtrWillBeRawPtr<CSSPathValue> create(PassOwnPtr<SVGPathByteStream> pathByteStream)
- {
- return adoptRefWillBeNoop(new CSSPathValue(pathByteStream));
- }
-
+ static PassRefPtrWillBeRawPtr<CSSPathValue> create(PassRefPtr<SVGPathByteStream>, StylePath* = nullptr);
static PassRefPtrWillBeRawPtr<CSSPathValue> create(const String&);
+ ~CSSPathValue();
static CSSPathValue* emptyPathValue();
+ StylePath* cachedPath();
String customCSSText() const;
bool equals(const CSSPathValue&) const;
@@ -32,13 +31,12 @@ public:
const SVGPathByteStream& byteStream() const { return *m_pathByteStream; }
String pathString() const;
- const Path& path() const { return m_path; }
private:
- CSSPathValue(PassOwnPtr<SVGPathByteStream>);
+ 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.
- OwnPtr<SVGPathByteStream> m_pathByteStream;
- Path m_path;
+ RefPtr<SVGPathByteStream> m_pathByteStream;
+ RefPtr<StylePath> m_cachedPath;
};
DEFINE_CSS_VALUE_TYPE_CASTS(CSSPathValue, isPathValue());

Powered by Google App Engine
This is Rietveld 408576698