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

Unified Diff: Source/core/layout/style/SVGLayoutStyleDefs.h

Issue 983103003: Use Length for the stroke-width property in SVGLayoutStyle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: lengthSetterForProperty Created 5 years, 9 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
« no previous file with comments | « Source/core/layout/style/SVGLayoutStyle.cpp ('k') | Source/core/layout/style/SVGLayoutStyleDefs.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/style/SVGLayoutStyleDefs.h
diff --git a/Source/core/layout/style/SVGLayoutStyleDefs.h b/Source/core/layout/style/SVGLayoutStyleDefs.h
index 3bd1bcbf2aa792cd059e9261cefea8765dbb82ca..b546d03d801711a2a725b0975398bc137526ac6b 100644
--- a/Source/core/layout/style/SVGLayoutStyleDefs.h
+++ b/Source/core/layout/style/SVGLayoutStyleDefs.h
@@ -28,7 +28,6 @@
#ifndef SVGLayoutStyleDefs_h
#define SVGLayoutStyleDefs_h
-#include "core/svg/SVGLength.h"
#include "platform/Length.h"
#include "platform/graphics/Color.h"
#include "wtf/OwnPtr.h"
@@ -143,6 +142,21 @@ private:
StyleFillData(const StyleFillData&);
};
+class UnzoomedLength {
+public:
+ explicit UnzoomedLength(const Length& length) : m_length(length) { }
+
+ bool isZero() const { return m_length.isZero(); }
+
+ bool operator==(const UnzoomedLength& other) const { return m_length == other.m_length; }
+ bool operator!=(const UnzoomedLength& other) const { return !operator==(other); }
+
+ const Length& length() const { return m_length; }
+
+private:
+ Length m_length;
+};
+
class StyleStrokeData : public RefCounted<StyleStrokeData> {
public:
static PassRefPtr<StyleStrokeData> create()
@@ -164,7 +178,7 @@ public:
float opacity;
float miterLimit;
- RefPtrWillBePersistent<SVGLength> width;
+ UnzoomedLength width;
Length dashOffset;
RefPtr<SVGDashArray> dashArray;
« no previous file with comments | « Source/core/layout/style/SVGLayoutStyle.cpp ('k') | Source/core/layout/style/SVGLayoutStyleDefs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698