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

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

Issue 962763003: Use Length for the stroke-dashoffset property in SVGLayoutStyle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make font-size explicit. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/layout/style/LayoutStyle.h ('k') | Source/core/layout/style/SVGLayoutStyle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/style/SVGLayoutStyle.h
diff --git a/Source/core/layout/style/SVGLayoutStyle.h b/Source/core/layout/style/SVGLayoutStyle.h
index 0d094403147cbc8e23e920153f7ad1071efbf883..271b59f602ce7114615506cf383409b6fab3da4a 100644
--- a/Source/core/layout/style/SVGLayoutStyle.h
+++ b/Source/core/layout/style/SVGLayoutStyle.h
@@ -76,6 +76,7 @@ public:
static Color initialStrokePaintColor() { return Color(); }
static String initialStrokePaintUri() { return String(); }
static PassRefPtrWillBeRawPtr<SVGLengthList> initialStrokeDashArray() { return SVGLengthList::create(); }
+ static Length initialStrokeDashOffset() { return Length(Fixed); }
static float initialStrokeMiterLimit() { return 4; }
static float initialStopOpacity() { return 1; }
static Color initialStopColor() { return Color(0, 0, 0); }
@@ -95,13 +96,6 @@ public:
static Length initialRx() { return Length(Fixed); }
static Length initialRy() { return Length(Fixed); }
- static PassRefPtrWillBeRawPtr<SVGLength> initialStrokeDashOffset()
- {
- RefPtrWillBeRawPtr<SVGLength> length = SVGLength::create();
- length->newValueSpecifiedUnits(LengthTypeNumber, 0);
- return length.release();
- }
-
static PassRefPtrWillBeRawPtr<SVGLength> initialStrokeWidth()
{
RefPtrWillBeRawPtr<SVGLength> length = SVGLength::create();
@@ -219,10 +213,10 @@ public:
stroke.access()->width = obj;
}
- void setStrokeDashOffset(PassRefPtrWillBeRawPtr<SVGLength> obj)
+ void setStrokeDashOffset(const Length& dashOffset)
{
- if (*stroke->dashOffset != *obj)
- stroke.access()->dashOffset = obj;
+ if (!(stroke->dashOffset == dashOffset))
+ stroke.access()->dashOffset = dashOffset;
}
void setStopOpacity(float obj)
@@ -328,7 +322,7 @@ public:
SVGLengthList* strokeDashArray() const { return stroke->dashArray.get(); }
float strokeMiterLimit() const { return stroke->miterLimit; }
SVGLength* strokeWidth() const { return stroke->width.get(); }
- SVGLength* strokeDashOffset() const { return stroke->dashOffset.get(); }
+ const Length& strokeDashOffset() const { return stroke->dashOffset; }
float stopOpacity() const { return stops->opacity; }
const Color& stopColor() const { return stops->color; }
float floodOpacity() const { return misc->floodOpacity; }
« no previous file with comments | « Source/core/layout/style/LayoutStyle.h ('k') | Source/core/layout/style/SVGLayoutStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698