| Index: Source/core/rendering/ExclusionPolygon.cpp
|
| diff --git a/Source/core/rendering/ExclusionPolygon.cpp b/Source/core/rendering/ExclusionPolygon.cpp
|
| index 136287ac40f54a90d70754c8defa857add7cc4cd..b3d5884bfcd2575d1501391c5141357e0b1bdd03 100644
|
| --- a/Source/core/rendering/ExclusionPolygon.cpp
|
| +++ b/Source/core/rendering/ExclusionPolygon.cpp
|
| @@ -29,6 +29,7 @@
|
|
|
| #include "config.h"
|
| #include "ExclusionPolygon.h"
|
| +#include "LayoutPoint.h"
|
|
|
| #include <wtf/MathExtras.h>
|
|
|
| @@ -129,6 +130,12 @@ static inline void appendArc(Vector<FloatPoint>& vertices, const FloatPoint& arc
|
| vertices.append(endArcVertex);
|
| }
|
|
|
| +static inline void snapVerticesToLayoutUnitGrid(Vector<FloatPoint>& vertices)
|
| +{
|
| + for (unsigned i = 0; i < vertices.size(); ++i)
|
| + vertices[i] = flooredLayoutPoint(vertices[i]);
|
| +}
|
| +
|
| static inline FloatPolygon* computeShapePaddingBounds(const FloatPolygon& polygon, float padding, WindRule fillRule)
|
| {
|
| Vector<FloatPoint>* paddedVertices = new Vector<FloatPoint>();
|
| @@ -146,6 +153,7 @@ static inline FloatPolygon* computeShapePaddingBounds(const FloatPolygon& polygo
|
| appendArc(*paddedVertices, thisEdge.vertex1(), padding, prevOffsetEdge.vertex2(), thisOffsetEdge.vertex1(), true);
|
| }
|
|
|
| + snapVerticesToLayoutUnitGrid(*paddedVertices);
|
| return new FloatPolygon(adoptPtr(paddedVertices), fillRule);
|
| }
|
|
|
| @@ -166,6 +174,7 @@ static inline FloatPolygon* computeShapeMarginBounds(const FloatPolygon& polygon
|
| appendArc(*marginVertices, thisEdge.vertex1(), margin, prevOffsetEdge.vertex2(), thisOffsetEdge.vertex1(), false);
|
| }
|
|
|
| + snapVerticesToLayoutUnitGrid(*marginVertices);
|
| return new FloatPolygon(adoptPtr(marginVertices), fillRule);
|
| }
|
|
|
|
|