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

Unified Diff: Source/core/rendering/shapes/RasterShape.cpp

Issue 209303002: Revert "[CSS Shapes] clamp RasterShape shapeMargin to reference box size" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/rendering/shapes/RasterShape.h ('k') | Source/core/rendering/shapes/Shape.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/shapes/RasterShape.cpp
diff --git a/Source/core/rendering/shapes/RasterShape.cpp b/Source/core/rendering/shapes/RasterShape.cpp
index 246eb84dd487b5a241ffad00991b4d70088d3a87..996a8b8625ae26012a68583461ec5425aa72ee09 100644
--- a/Source/core/rendering/shapes/RasterShape.cpp
+++ b/Source/core/rendering/shapes/RasterShape.cpp
@@ -255,10 +255,11 @@ const RasterShapeIntervals& RasterShape::marginIntervals() const
if (!shapeMargin())
return *m_intervals;
- int shapeMarginInt = clampToPositiveInteger(ceil(shapeMargin()));
- int maxShapeMarginInt = std::max(m_marginRectSize.width(), m_marginRectSize.height()) * sqrt(2);
- if (!m_marginIntervals)
- m_marginIntervals = m_intervals->computeShapeMarginIntervals(std::min(shapeMarginInt, maxShapeMarginInt));
+ 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);
+ }
return *m_marginIntervals;
}
« no previous file with comments | « Source/core/rendering/shapes/RasterShape.h ('k') | Source/core/rendering/shapes/Shape.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698