Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / rendering / shapes / PolygonShape.cpp
index 02e239a..79bd3bd 100644 (file)
@@ -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));
         }
     }