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

Unified Diff: Source/core/layout/svg/LayoutSVGEllipse.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/LayoutSVGEllipse.h ('k') | Source/core/layout/svg/LayoutSVGForeignObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/svg/LayoutSVGEllipse.cpp
diff --git a/Source/core/rendering/svg/RenderSVGEllipse.cpp b/Source/core/layout/svg/LayoutSVGEllipse.cpp
similarity index 87%
rename from Source/core/rendering/svg/RenderSVGEllipse.cpp
rename to Source/core/layout/svg/LayoutSVGEllipse.cpp
index d3bfbfcb8b1830c0a1111c4f54fd3c12b1379a23..b7ecc369fdcf3b46f41217f4ebcdd35fc220de0c 100644
--- a/Source/core/rendering/svg/RenderSVGEllipse.cpp
+++ b/Source/core/layout/svg/LayoutSVGEllipse.cpp
@@ -26,7 +26,7 @@
#include "config.h"
-#include "core/rendering/svg/RenderSVGEllipse.h"
+#include "core/layout/svg/LayoutSVGEllipse.h"
#include "core/svg/SVGCircleElement.h"
#include "core/svg/SVGEllipseElement.h"
@@ -35,17 +35,17 @@
namespace blink {
-RenderSVGEllipse::RenderSVGEllipse(SVGGraphicsElement* node)
- : RenderSVGShape(node)
+LayoutSVGEllipse::LayoutSVGEllipse(SVGGraphicsElement* node)
+ : LayoutSVGShape(node)
, m_usePathFallback(false)
{
}
-RenderSVGEllipse::~RenderSVGEllipse()
+LayoutSVGEllipse::~LayoutSVGEllipse()
{
}
-void RenderSVGEllipse::updateShapeFromElement()
+void LayoutSVGEllipse::updateShapeFromElement()
{
// Before creating a new object we need to clear the cached bounding box
// to avoid using garbage.
@@ -62,10 +62,10 @@ void RenderSVGEllipse::updateShapeFromElement()
return;
if (!m_radii.isEmpty()) {
- // Fall back to RenderSVGShape and path-based hit detection if the ellipse
+ // Fall back to LayoutSVGShape and path-based hit detection if the ellipse
// has a non-scaling or discontinuous stroke.
if (hasNonScalingStroke() || !hasContinuousStroke()) {
- RenderSVGShape::updateShapeFromElement();
+ LayoutSVGShape::updateShapeFromElement();
m_usePathFallback = true;
return;
}
@@ -79,7 +79,7 @@ void RenderSVGEllipse::updateShapeFromElement()
m_strokeBoundingBox.inflate(strokeWidth() / 2);
}
-void RenderSVGEllipse::calculateRadiiAndCenter()
+void LayoutSVGEllipse::calculateRadiiAndCenter()
{
ASSERT(element());
if (isSVGCircleElement(*element())) {
@@ -99,7 +99,7 @@ void RenderSVGEllipse::calculateRadiiAndCenter()
m_center = FloatPoint(ellipse.cx()->currentValue()->value(lengthContext), ellipse.cy()->currentValue()->value(lengthContext));
}
-bool RenderSVGEllipse::shapeDependentStrokeContains(const FloatPoint& point)
+bool LayoutSVGEllipse::shapeDependentStrokeContains(const FloatPoint& point)
{
// The optimized check below for circles does not support non-scaling or
// discontinuous strokes.
@@ -108,7 +108,7 @@ bool RenderSVGEllipse::shapeDependentStrokeContains(const FloatPoint& point)
|| m_radii.width() != m_radii.height()) {
if (!hasPath())
createPath();
- return RenderSVGShape::shapeDependentStrokeContains(point);
+ return LayoutSVGShape::shapeDependentStrokeContains(point);
}
const FloatPoint center = FloatPoint(m_center.x() - point.x(), m_center.y() - point.y());
@@ -117,7 +117,7 @@ bool RenderSVGEllipse::shapeDependentStrokeContains(const FloatPoint& point)
return std::abs(center.length() - r) <= halfStrokeWidth;
}
-bool RenderSVGEllipse::shapeDependentFillContains(const FloatPoint& point, const WindRule fillRule) const
+bool LayoutSVGEllipse::shapeDependentFillContains(const FloatPoint& point, const WindRule fillRule) const
{
const FloatPoint center = FloatPoint(m_center.x() - point.x(), m_center.y() - point.y());
@@ -128,7 +128,7 @@ bool RenderSVGEllipse::shapeDependentFillContains(const FloatPoint& point, const
return xrX * xrX + yrY * yrY <= 1.0;
}
-bool RenderSVGEllipse::hasContinuousStroke() const
+bool LayoutSVGEllipse::hasContinuousStroke() const
{
const SVGLayoutStyle& svgStyle = style()->svgStyle();
return svgStyle.strokeDashArray()->isEmpty();
« no previous file with comments | « Source/core/layout/svg/LayoutSVGEllipse.h ('k') | Source/core/layout/svg/LayoutSVGForeignObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698