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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMarker.cpp

Issue 1914133002: Out-of-line some methods on LayoutSVGResourceMarker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMarker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMarker.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMarker.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMarker.cpp
index 5ffed88d1cd3ecdcfb804db9997f4aec3358b969..e438f87512c69112b0367d96b9a2246e7e8440c9 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMarker.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMarker.cpp
@@ -21,8 +21,6 @@
#include "core/layout/svg/LayoutSVGResourceMarker.h"
-#include "core/layout/svg/LayoutSVGContainer.h"
-#include "core/layout/svg/SVGLayoutSupport.h"
#include "wtf/TemporaryChange.h"
namespace blink {
@@ -92,23 +90,29 @@ FloatPoint LayoutSVGResourceMarker::referencePoint() const
float LayoutSVGResourceMarker::angle() const
{
- SVGMarkerElement* marker = toSVGMarkerElement(element());
- ASSERT(marker);
+ ASSERT(element());
float angle = -1;
- if (marker->orientType()->currentValue()->enumValue() == SVGMarkerOrientAngle)
- angle = marker->orientAngle()->currentValue()->value();
+ if (orientType() == SVGMarkerOrientAngle)
+ angle = toSVGMarkerElement(*element()).orientAngle()->currentValue()->value();
return angle;
}
-AffineTransform LayoutSVGResourceMarker::markerTransformation(const FloatPoint& origin, float autoAngle, float strokeWidth) const
+SVGMarkerUnitsType LayoutSVGResourceMarker::markerUnits() const
{
- SVGMarkerElement* marker = toSVGMarkerElement(element());
- ASSERT(marker);
+ return toSVGMarkerElement(element())->markerUnits()->currentValue()->enumValue();
+}
+SVGMarkerOrientType LayoutSVGResourceMarker::orientType() const
+{
+ return toSVGMarkerElement(element())->orientType()->currentValue()->enumValue();
+}
+
+AffineTransform LayoutSVGResourceMarker::markerTransformation(const FloatPoint& origin, float autoAngle, float strokeWidth) const
+{
float markerAngle = angle();
- bool useStrokeWidth = marker->markerUnits()->currentValue()->enumValue() == SVGMarkerUnitsStrokeWidth;
+ bool useStrokeWidth = markerUnits() == SVGMarkerUnitsStrokeWidth;
AffineTransform transform;
transform.translate(origin.x(), origin.y());
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMarker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698