Index: third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp |
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp b/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp |
index 286865386f26266534e6a9856ce79677c5553b93..3feec3e49ff6820c4c105beae6fa851dc2c3ef2c 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp |
+++ b/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp |
@@ -42,6 +42,7 @@ |
#include "core/svg/SVGElement.h" |
#include "platform/geometry/TransformState.h" |
#include "platform/graphics/StrokeData.h" |
+#include "wtf/MathExtras.h" |
namespace blink { |
@@ -509,7 +510,7 @@ float SVGLayoutSupport::calculateScreenFontSizeScalingFactor(const LayoutObject* |
AffineTransform ctm = deprecatedCalculateTransformToLayer(layoutObject) * SubtreeContentTransformScope::currentContentTransformation(); |
ctm.scale(layoutObject->document().frameHost()->deviceScaleFactorDeprecated()); |
- return narrowPrecisionToFloat(sqrt((ctm.xScaleSquared() + ctm.yScaleSquared()) / 2)); |
+ return clampTo<float>(sqrt((ctm.xScaleSquared() + ctm.yScaleSquared()) / 2)); |
} |
static inline bool compareCandidateDistance(const SearchCandidate& r1, const SearchCandidate& r2) |