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

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

Issue 510513002: [CSS Shapes] Import and fix polygon shapes reftests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove webkit prefixes Created 6 years, 4 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 | « LayoutTests/fast/shapes/shape-outside-floats/shape-outside-polygon-015-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/shapes/PolygonShape.cpp
diff --git a/Source/core/rendering/shapes/PolygonShape.cpp b/Source/core/rendering/shapes/PolygonShape.cpp
index 02e239a09e50e1222401fa9db359f1c4ed7fcfee..79bd3bdc082f32c1808e6c24521dfd03d70cca0f 100644
--- a/Source/core/rendering/shapes/PolygonShape.cpp
+++ b/Source/core/rendering/shapes/PolygonShape.cpp
@@ -100,7 +100,7 @@ static float circleXIntercept(float y, float radius)
static FloatShapeInterval clippedCircleXRange(const FloatPoint& center, float radius, float y1, float y2)
{
- if (y1 > center.y() + radius || y2 < center.y() - radius)
+ if (y1 >= center.y() + radius || y2 <= center.y() - radius)
return FloatShapeInterval();
if (center.y() >= y1 && center.y() <= y2)
@@ -143,6 +143,7 @@ LineSegment PolygonShape::getExcludedInterval(LayoutUnit logicalTop, LayoutUnit
excludedInterval.unite(OffsetPolygonEdge(edge, outwardEdgeNormal(edge) * shapeMargin()).clippedEdgeXRange(y1, y2));
excludedInterval.unite(OffsetPolygonEdge(edge, inwardEdgeNormal(edge) * shapeMargin()).clippedEdgeXRange(y1, y2));
excludedInterval.unite(clippedCircleXRange(edge.vertex1(), shapeMargin(), y1, y2));
+ excludedInterval.unite(clippedCircleXRange(edge.vertex2(), shapeMargin(), y1, y2));
}
}
« no previous file with comments | « LayoutTests/fast/shapes/shape-outside-floats/shape-outside-polygon-015-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698