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

Unified Diff: third_party/WebKit/Source/core/style/StylePath.h

Issue 2881673003: CSS Motion Path: Support parsing of ray(<angle>) paths (Closed)
Patch Set: DCHECK_EQ Created 3 years, 7 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/style/StylePath.h
diff --git a/third_party/WebKit/Source/core/style/StylePath.h b/third_party/WebKit/Source/core/style/StylePath.h
index d59d8926c7a524ad2dd030d5e1e6c0e263d05782..ddae84672d66ea851c30cedc9b4251ac6f249c02 100644
--- a/third_party/WebKit/Source/core/style/StylePath.h
+++ b/third_party/WebKit/Source/core/style/StylePath.h
@@ -6,6 +6,7 @@
#define StylePath_h
#include <memory>
+#include "core/style/BasicShapes.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/PassRefPtr.h"
#include "platform/wtf/RefCounted.h"
@@ -17,7 +18,7 @@ class CSSValue;
class Path;
class SVGPathByteStream;
-class StylePath : public RefCounted<StylePath> {
+class StylePath final : public BasicShape {
public:
static PassRefPtr<StylePath> Create(std::unique_ptr<SVGPathByteStream>);
~StylePath();
@@ -32,7 +33,11 @@ class StylePath : public RefCounted<StylePath> {
CSSValue* ComputedCSSValue() const;
- bool operator==(const StylePath&) const;
+ void GetPath(Path&, const FloatRect&) override;
+ PassRefPtr<BasicShape> Blend(const BasicShape*, double) const override;
+ bool operator==(const BasicShape&) const override;
+
+ ShapeType GetType() const override { return kStylePathType; }
private:
explicit StylePath(std::unique_ptr<SVGPathByteStream>);
@@ -42,6 +47,8 @@ class StylePath : public RefCounted<StylePath> {
mutable float path_length_;
};
+DEFINE_BASICSHAPE_TYPE_CASTS(StylePath);
+
} // namespace blink
#endif // StylePath_h

Powered by Google App Engine
This is Rietveld 408576698