Index: Source/core/rendering/shapes/RasterShape.cpp |
diff --git a/Source/core/rendering/shapes/RasterShape.cpp b/Source/core/rendering/shapes/RasterShape.cpp |
index 996a8b8625ae26012a68583461ec5425aa72ee09..da08eedb651c0113b8cd19d7faf1156f465c6392 100644 |
--- a/Source/core/rendering/shapes/RasterShape.cpp |
+++ b/Source/core/rendering/shapes/RasterShape.cpp |
@@ -255,11 +255,10 @@ const RasterShapeIntervals& RasterShape::marginIntervals() const |
if (!shapeMargin()) |
return *m_intervals; |
- int marginBoundaryRadius = std::min(clampToInteger(ceil(shapeMargin())), std::max(m_imageSize.width(), m_imageSize.height())); |
- if (!m_marginIntervals) { |
- ASSERT(marginBoundaryRadius >= 0); |
- m_marginIntervals = m_intervals->computeShapeMarginIntervals(marginBoundaryRadius); |
- } |
+ int shapeMarginInt = clampToPositiveInteger(ceil(shapeMargin())); |
+ int maxShapeMarginInt = std::max(m_marginRectSize.width(), m_marginRectSize.height()) * sqrtf(2); |
+ if (!m_marginIntervals) |
+ m_marginIntervals = m_intervals->computeShapeMarginIntervals(std::min(shapeMarginInt, maxShapeMarginInt)); |
return *m_marginIntervals; |
} |