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

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

Issue 966923003: Make SVGLengthMode an enum class (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
Index: Source/core/layout/svg/LayoutSVGRect.cpp
diff --git a/Source/core/layout/svg/LayoutSVGRect.cpp b/Source/core/layout/svg/LayoutSVGRect.cpp
index 28f461212b682b07a8963077c84525472dfe9e52..a04e79fb99c2dca6bb1a5ae4cd1368b01f0574c3 100644
--- a/Source/core/layout/svg/LayoutSVGRect.cpp
+++ b/Source/core/layout/svg/LayoutSVGRect.cpp
@@ -64,8 +64,8 @@ void LayoutSVGRect::updateShapeFromElement()
if (!boundingBoxSize.isEmpty()) {
// Fallback to LayoutSVGShape and path-based hit detection if the rect
// has rounded corners or a non-scaling or non-simple stroke.
- if (lengthContext.valueForLength(style()->svgStyle().rx(), styleRef(), LengthModeWidth) > 0
- || lengthContext.valueForLength(style()->svgStyle().ry(), styleRef(), LengthModeHeight) > 0
+ if (lengthContext.valueForLength(style()->svgStyle().rx(), styleRef(), SVGLengthMode::Width) > 0
+ || lengthContext.valueForLength(style()->svgStyle().ry(), styleRef(), SVGLengthMode::Height) > 0
|| hasNonScalingStroke()
|| !definitelyHasSimpleStroke()) {
LayoutSVGShape::updateShapeFromElement();
@@ -76,8 +76,8 @@ void LayoutSVGRect::updateShapeFromElement()
m_fillBoundingBox = FloatRect(
FloatPoint(
- lengthContext.valueForLength(styleRef().svgStyle().x(), styleRef(), LengthModeWidth),
- lengthContext.valueForLength(styleRef().svgStyle().y(), styleRef(), LengthModeHeight)),
+ lengthContext.valueForLength(styleRef().svgStyle().x(), styleRef(), SVGLengthMode::Width),
+ lengthContext.valueForLength(styleRef().svgStyle().y(), styleRef(), SVGLengthMode::Height)),
boundingBoxSize);
// To decide if the stroke contains a point we create two rects which represent the inner and
« no previous file with comments | « Source/core/animation/animatable/AnimatableValueTestHelperTest.cpp ('k') | Source/core/layout/svg/SVGPathData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698