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

Unified Diff: Source/core/layout/svg/LayoutSVGPath.cpp

Issue 927583002: Moving RenderSVG* files from rendering/ to layout/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/svg/LayoutSVGPath.h ('k') | Source/core/layout/svg/LayoutSVGRect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/svg/LayoutSVGPath.cpp
diff --git a/Source/core/rendering/svg/RenderSVGPath.cpp b/Source/core/layout/svg/LayoutSVGPath.cpp
similarity index 87%
rename from Source/core/rendering/svg/RenderSVGPath.cpp
rename to Source/core/layout/svg/LayoutSVGPath.cpp
index 9e9de5762d2707cc6ca8b5569f2bb4c5e43acdba..9ed5e07d89220b510d82c30c6fa43b9fdb7277bf 100644
--- a/Source/core/rendering/svg/RenderSVGPath.cpp
+++ b/Source/core/layout/svg/LayoutSVGPath.cpp
@@ -27,7 +27,7 @@
#include "config.h"
-#include "core/rendering/svg/RenderSVGPath.h"
+#include "core/layout/svg/LayoutSVGPath.h"
#include "core/layout/svg/LayoutSVGResourceMarker.h"
#include "core/layout/svg/SVGResources.h"
@@ -37,24 +37,24 @@
namespace blink {
-RenderSVGPath::RenderSVGPath(SVGGraphicsElement* node)
- : RenderSVGShape(node)
+LayoutSVGPath::LayoutSVGPath(SVGGraphicsElement* node)
+ : LayoutSVGShape(node)
{
}
-RenderSVGPath::~RenderSVGPath()
+LayoutSVGPath::~LayoutSVGPath()
{
}
-void RenderSVGPath::updateShapeFromElement()
+void LayoutSVGPath::updateShapeFromElement()
{
- RenderSVGShape::updateShapeFromElement();
+ LayoutSVGShape::updateShapeFromElement();
updateZeroLengthSubpaths();
m_strokeBoundingBox = calculateUpdatedStrokeBoundingBox();
}
-FloatRect RenderSVGPath::calculateUpdatedStrokeBoundingBox() const
+FloatRect LayoutSVGPath::calculateUpdatedStrokeBoundingBox() const
{
FloatRect strokeBoundingBox = m_strokeBoundingBox;
@@ -71,9 +71,9 @@ FloatRect RenderSVGPath::calculateUpdatedStrokeBoundingBox() const
return strokeBoundingBox;
}
-bool RenderSVGPath::shapeDependentStrokeContains(const FloatPoint& point)
+bool LayoutSVGPath::shapeDependentStrokeContains(const FloatPoint& point)
{
- if (RenderSVGShape::shapeDependentStrokeContains(point))
+ if (LayoutSVGShape::shapeDependentStrokeContains(point))
return true;
const SVGLayoutStyle& svgStyle = style()->svgStyle();
@@ -93,19 +93,19 @@ bool RenderSVGPath::shapeDependentStrokeContains(const FloatPoint& point)
return false;
}
-bool RenderSVGPath::shouldStrokeZeroLengthSubpath() const
+bool LayoutSVGPath::shouldStrokeZeroLengthSubpath() const
{
// Spec(11.4): Any zero length subpath shall not be stroked if the "stroke-linecap" property has a value of butt
// but shall be stroked if the "stroke-linecap" property has a value of round or square
return style()->svgStyle().hasStroke() && style()->svgStyle().capStyle() != ButtCap;
}
-FloatRect RenderSVGPath::zeroLengthSubpathRect(const FloatPoint& linecapPosition, float strokeWidth)
+FloatRect LayoutSVGPath::zeroLengthSubpathRect(const FloatPoint& linecapPosition, float strokeWidth)
{
return FloatRect(linecapPosition.x() - strokeWidth / 2, linecapPosition.y() - strokeWidth / 2, strokeWidth, strokeWidth);
}
-void RenderSVGPath::updateZeroLengthSubpaths()
+void LayoutSVGPath::updateZeroLengthSubpaths()
{
m_zeroLengthLinecapLocations.clear();
@@ -117,7 +117,7 @@ void RenderSVGPath::updateZeroLengthSubpaths()
subpathData.pathIsDone();
}
-FloatRect RenderSVGPath::markerRect(float strokeWidth) const
+FloatRect LayoutSVGPath::markerRect(float strokeWidth) const
{
ASSERT(!m_markerPositions.isEmpty());
@@ -138,7 +138,7 @@ FloatRect RenderSVGPath::markerRect(float strokeWidth) const
return boundaries;
}
-bool RenderSVGPath::shouldGenerateMarkerPositions() const
+bool LayoutSVGPath::shouldGenerateMarkerPositions() const
{
if (!style()->svgStyle().hasMarkers())
return false;
@@ -153,7 +153,7 @@ bool RenderSVGPath::shouldGenerateMarkerPositions() const
return resources->markerStart() || resources->markerMid() || resources->markerEnd();
}
-void RenderSVGPath::processMarkerPositions()
+void LayoutSVGPath::processMarkerPositions()
{
m_markerPositions.clear();
« no previous file with comments | « Source/core/layout/svg/LayoutSVGPath.h ('k') | Source/core/layout/svg/LayoutSVGRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698